Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Sort files given a list of {original path -> target path} #29

Open
philamp opened this issue Jan 19, 2023 · 6 comments
Open

Sort files given a list of {original path -> target path} #29

philamp opened this issue Jan 19, 2023 · 6 comments

Comments

@philamp
Copy link

philamp commented Jan 19, 2023

I'd like to ask for the ability to sort files in folders and subfolders following an editable list of
original paths -> target paths,
/movies/plain-defaut-path/filename.mp4 -> library/strutured/path/to/file.mp4
example:
/shows/tvshow.s02/episodeS02e01.mp4 -> /Library/shows/tvshow/s02/episodeS02e01.mp4

Would it be possible ?

I think it would be in a 4th folder called "SortedLibrary" or something like that, while keeping the 3 others (movies/shows/default)

The purpose is to be able to sort these files following the plex library sorting

Its basically a way to leverage plex sorting to make the folder sorting cleaner for direct file-system browsing (NFS/SMB/ etc...) It could be up to plex (with a plexapi python script for example) or anything else to do the sorting.

Moreover it would allow jellyfin/emby to finally be able to properly sort tv shows

Why ? : Given that realdebrid cloud is read only, it's impossible to move files an organized way in custom folders/subfolders. This improvement would fill the usability gap between a read-only cloud (such as real-debrid) and a writable cloud.

I would be happy to help.

...And thank you for this project ! Amazing stuff!

@itsToggle
Copy link
Owner

itsToggle commented Jan 19, 2023

we could even automatically populate the list using plex_debrid. nice idea, someone on discord is already working on something similar using rclone filtering rather than a built-in method. rclone filtering would be very limited though, as technically you would need to start an instance of rclone for each folder you want to create.

Perhaps I can write the built in method in a way that could use a rclone filtering txt file, so that I dont need to write two methods for plex_debrid.

@itsToggle
Copy link
Owner

another addition to this would be to allow renaming and moving folders from one location to another.
With a list of the edits that were made this would certainly be possible.

@philamp
Copy link
Author

philamp commented Jan 19, 2023

"we could even automatically populate the list using plex_debrid" -> yeap 👍

On my side I still use *arr apps (even though I tested plex_debrid and it's awesome) so I made a Python plexapi script to recreate the folder structure + symlinks ( but the downside is that embedded systems usually don't display symlinks (on SMB or NFS share), for instance the OPPO udp-203 does not display symlinks, maybe Kodi or Android does)

@philamp
Copy link
Author

philamp commented Jan 20, 2023

BTW, I think it would be great if it could refresh the folder structure from the list without having to restart the rclone mount

@itsToggle
Copy link
Owner

Hey, so I've got file renaming and folder renaming+ folder moving working already. If you join our discord server you can check out the progress in the development channel :)

@itsToggle
Copy link
Owner

It's updated in Realtime and connected to the actual "move" and "rename" method used by your OS, so you could even use existing programs to sort your folder structure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants