dave 4a28090c76 | ||
---|---|---|
mediaweb | ||
templates | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
README.md | ||
requirements.txt | ||
setup.py |
README.md
mediasort
Webapp for quick or automatic media sorting and integration with the Deluge torrent client.
configuration
Basic flags
flag | meaning | example |
---|---|---|
--server | deluge rpc uri | deluge://username:password@host:port |
--port | 8081 | http port to listen on |
Mediasort has several options to tune how it sorts your media.
First, --library
should be set to your media library's path. The media library must contain top level directories for
each show, appropriately name. The name of the directory will be used to determine what show to put in it. In each show
directory, there should be season dirs (such as "Season 6" or "2019") within which the actual media files are placed.
If needed, --pathmap
can be set to translate paths when sorting files. This would be needed if your torrent client has
a different view of the filesystem than mediasort
does, e.g. if they're running in docker containers. Consider these
two paths:
/media/storage/mylibrary/myshow/Season 5/episode.mkv
/data/torrents/Complete/myshow.mkv
The first is the destination path in your media library as seen by mediasort. The second is the path Deluge sees.
Setting --pathmap
to /data/torrents/:/media/storage/torrents/
gives mediasort the info it needs to resolve these
paths - it translates the Deluge path by simply replacing the prefix obtained from the left half of the --pathmap
with
the right.
Finally, --ui-movedests
provides a list of pre-filled destinations that Deluge may move files to after they're sorted.
These paths are passed directly to deluge and should be pathed from that perspective.
After a torrent is sorted into your library, the torrent will be moved to the "stash" dir, simply to the completed
downloads directory sparse. The --stashprefix
flag controls what directory the files are moved into. Within the stash
directory the torrents are placed in a subdirectory matching the hostname of the torrent's tracker, optionally
translated to another name with the values specified in --trackermap
. Passing "foo.com:foo" would cause the "foo.com"
tracker directory to be named "foo" instead.
todo
- support re-labeling sorted torrents
- more options than just hard linking (soft link, copy)
- support sorting season torrents
- support multiple deluge instances - need a pathmap per instance
- make UI pretty
- support post-sort webhooks e.g. to tell plex to rescan when we add something