|
|
|
@ -21,15 +21,15 @@ class path_entry: |
|
|
|
in_db: bool = False |
|
|
|
in_db: bool = False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route('/folder_contents/') |
|
|
|
@bp.route('/file_listing/') |
|
|
|
def getBaseFolderContents(): |
|
|
|
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 |
|
|
|
# NOTE: return a listing of files and directories in a sub_directory as JSON |
|
|
|
# @param subpath a path relative to config['MOVIE_DIR'] |
|
|
|
# @param subpath a path relative to config['MOVIE_DIR'] |
|
|
|
@bp.route('/folder_contents_json/') |
|
|
|
@bp.route('/file_listing_json/') |
|
|
|
@bp.route('/folder_contents_json/<path:subpath>') |
|
|
|
@bp.route('/file_listing_json/<path:subpath>') |
|
|
|
def getFolderJSON(subpath = ''): |
|
|
|
def getFolderJSON(subpath = ''): |
|
|
|
video_path = current_app.config['MOVIE_DIR'] |
|
|
|
video_path = current_app.config['MOVIE_DIR'] |
|
|
|
full_path = os.path.join(video_path, subpath) |
|
|
|
full_path = os.path.join(video_path, subpath) |
|
|
|
|