From 6a4d9934406933602a8a7ab0dd4ba9a5fd38cacc Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Tue, 22 Jun 2021 18:32:10 +1000 Subject: [PATCH] fixed BUG-36: view details showing all entries -- its a bit crap as its only import dir, but its functional again --- files.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/files.py b/files.py index 528eab7..ff23461 100644 --- a/files.py +++ b/files.py @@ -218,9 +218,17 @@ def GetEntriesInFolderView( cwd, prefix, noo, offset, how_many ): ################################################################################ # /file_list -> show detailed file list of files from import_path(s) ################################################################################ -@app.route("/file_list_ip", methods=["GET"]) +@app.route("/file_list_ip", methods=["GET","POST"]) def file_list_ip(): - return render_template("file_list.html", page_title='View File Details (Import Path)', entry_data=Entry.query.order_by(Entry.name).all()) + noo, grouping, how_many, offset, size, folders, cwd, root = ViewingOptions( request ) + entries=[] + + settings=Settings.query.first() + paths = settings.import_path.split("#") + for path in paths: + prefix = SymlinkName("Import",path,path+'/') + entries+=GetEntriesInFlatView( cwd, prefix, noo, offset, how_many ) + return render_template("file_list.html", page_title='View File Details (Import Path)', entry_data=entries, noo=noo, how_many=how_many, offset=offset ) ################################################################################ # /files -> show thumbnail view of files from import_path(s)