diff --git a/video_metadata/static/file_listing.js b/video_metadata/static/file_listing.js index ec349ce..43d7cc0 100644 --- a/video_metadata/static/file_listing.js +++ b/video_metadata/static/file_listing.js @@ -1,6 +1,6 @@ // TODO: could get path constants from DOM in jinja template -const FOLDER_CONTENTS_PATH = '/pvdb/file_listing/folder_contents_json/'; +const FOLDER_CONTENTS_PATH = '/pvdb/file_listing/file_listing_json/'; const QUERY_PATH = '/pvdb/tmdb/query_media_json'; const CREATE_MAPPING_PATH = '/pvdb/tmdb/create_path_mapping'; const PATH_PATH = '/pvdb/tmdb/query_path_json'; diff --git a/video_metadata/templates/file_listing/folder_contents.html b/video_metadata/templates/file_listing/file_listing.html similarity index 100% rename from video_metadata/templates/file_listing/folder_contents.html rename to video_metadata/templates/file_listing/file_listing.html diff --git a/video_metadata/views/file_listing.py b/video_metadata/views/file_listing.py index 52ad580..55552e6 100644 --- a/video_metadata/views/file_listing.py +++ b/video_metadata/views/file_listing.py @@ -21,15 +21,15 @@ class path_entry: in_db: bool = False -@bp.route('/folder_contents/') +@bp.route('/file_listing/') def getBaseFolderContents(): - return render_template('file_listing/folder_contents.html') + return render_template('file_listing/file_listing.html') # NOTE: return a listing of files and directories in a sub_directory as JSON # @param subpath a path relative to config['MOVIE_DIR'] -@bp.route('/folder_contents_json/') -@bp.route('/folder_contents_json/') +@bp.route('/file_listing_json/') +@bp.route('/file_listing_json/') def getFolderJSON(subpath = ''): video_path = current_app.config['MOVIE_DIR'] full_path = os.path.join(video_path, subpath)