Browse Source

rename instances of folder_contents to file_listing

master
cinnaboot 6 years ago
parent
commit
0ccf58103a
  1. 2
      video_metadata/static/file_listing.js
  2. 0
      video_metadata/templates/file_listing/file_listing.html
  3. 8
      video_metadata/views/file_listing.py

2
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';

0
video_metadata/templates/file_listing/folder_contents.html → video_metadata/templates/file_listing/file_listing.html

8
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/<path:subpath>')
@bp.route('/file_listing_json/')
@bp.route('/file_listing_json/<path:subpath>')
def getFolderJSON(subpath = ''):
video_path = current_app.config['MOVIE_DIR']
full_path = os.path.join(video_path, subpath)

Loading…
Cancel
Save