tremc icon indicating copy to clipboard operation
tremc copied to clipboard

`view_file()` does not work with remote servers

Open AlexBocken opened this issue 1 year ago • 1 comments

While setting up my own server and connecting tremc to it's transmission I've noticed how view_file (i.e. pressing enter to view a file) does not work anymore. Having looked into the code the culprit seems to be: https://github.com/tremc/tremc/blob/d8deaa5ac25bb45a2ca3a930309d6ecc74836a54/tremc#L2422-L2432

as os.path.isfile of course checks locally for the file, not on the server side. Is there a way to query transmission for the actual filepath such that we could replace os.path.isfile with this query?

If not, could we maybe create an option flag to parse the view_file command the filename, incompleteDir and downloadDir such that external shell scripts can handle this figuring out? Currently the script will never execute the file_viewer command if it cannot find the files locally.

AlexBocken avatar Jul 03 '23 13:07 AlexBocken

What you suggest is doable in tremc. Please see implementation in my fork and test if it is useful to you.

With cooperation from transmission, it is possible to improve the remote file preview, but I will have to ask over there.

MatanZ avatar Jul 30 '23 16:07 MatanZ