idlesign / torrt

Automates torrent updates for you
https://github.com/idlesign/torrt
BSD 3-Clause "New" or "Revised" License
112 stars 19 forks source link

torrt doesn't download just incremental files but all of them once again #21

Open GentleHoneyLover opened 6 years ago

GentleHoneyLover commented 6 years ago

Hello,

Thx for the great app — it works great so far! One minor annoyance, though (and I'm not sure if this is by design or a bug).

I use Deluge and Filebot plugin with it. Upon download competition, Filebot (via Deluge plugin) renames files and moves them from my Downloads folder to TV Shows folder.

When torrt performs a walk, it removes the existing torrent from deluge and adds an updated one — but it doesn't instruct deluge to download only the new file — it downloads everything again. If files downloaded from original torrent were not renamed and moved that would not be an issue — deluge would detect existing files. But in my case, because original files were moved, deluge (naturally) downloads everything again.

Is there any way around my issue? Can support for such scenario be implemented in the next torrt release?

Thx in advance!

ALTracer commented 6 years ago

@pavstor , why would you want to rename torrent content files? I suggest leaving media intact, downloading directly into storage folder, and then simply re-checking hashes upon updating. If you want deluged to use renamed files, consider reading Filebot plugin documentation. This is hardly doable and would require weird hooks.

idlesign commented 6 years ago

Hi, @pavstor. Thank you. Just as @ALTracer said: torrt supports only relocation (i.e. moving from one folder to another should be fine) but not renaming, since there's no way to reliably determine from torrt which file was renamed into what outside of it.

GentleHoneyLover commented 6 years ago

Hi @ALTracer, @idlesign, thx for the additional context!

The way Filebot plugin seems to be working is that it renames and moves files (per pre-defined rules) and reports it back to Deluge — Deluge knows new location and naming of the files and keeps seeding as it normally would.

A screenshot below is a good example:

image

This is a completed torrent that has been processed by Filebot (through Deluge plugin). The first 4 files are not renamed because they were not downloaded. The last one was renamed and moved from /Downloads/ to /TV Shows/Fear the Walking Dead/Season 4/. The new path and names were updated from within the torrent in Deluge and it keeps seeding as if no renaming/moving happened.

Is it possible to make torrt read the new path and filenames from the existing torrent during the walk and then set the same path and filenames for already downloaded files in the updated torrent?

idlesign commented 6 years ago

Is it possible to make torrt read the new path and filenames from the existing torrent during the walk and then set the same path and filenames for already downloaded files in the updated torrent?

With something like https://github.com/idlesign/deluge-updatorr it would be possible, since being a plugin it has an access to Deluge data; otherwise hard to say, needs investigation. Per file download location may even be unsupported in some clients not to mention client API abilities.

GentleHoneyLover commented 6 years ago

Maybe could be implemented via a plugin :)

Thx for looking into this! Would be great if this capability could be implemented at some point. This is the last mile that doesn't allow me to achieve a fully automated home media center setup :)

ALTracer commented 6 years ago

@pavstor, have you been to @Laharah/deluge-FileBotTool repo? Weirdly they never filed issues with ongoing updating torrents (like TV Series).

For now you may want to drop a script in crontab to

add, off-topic: So you want to download into a separate /media/Download folder and then move into /media/TVSeries/$soap/$season and seed from there? What's the point? deluged allows to append .part file extension to non-ready media, and all modern Home media centers I know (thanks, Kodi!) run a db and process all sorts of filenames just so end-user/watcher never sees them.

idlesign commented 6 years ago

call torrt walk --dry-run (do we have this, [...]

Nope, we have none. It's hard to elaborate on an actual degree of dryness that should be implemented.

GentleHoneyLover commented 6 years ago

@ALTracer, thx for the tip! Didn't know Filebot was capable of rolling renaming back based on history — I will look into this. Maybe I'll find a use for that. However, the workflow you laid out seems overly complex. I was hoping to find more of a plug-n-play solution :)

Not sure I get your off-topic comment, though. I keep my media organized in a specific folder structure (movies, tv shows, music videos, etc.) in order for Plex to pick everything up correctly and reflect in various media libraries. I also rename files themselves to minimize the risk of Plex not recognizing them (sometimes downloaded files have very weird naming). I found a way to automate this via Filebot (using a plugin for Deluge).

alexlitvinenko commented 5 years ago

Hi, Let me share my solution: I do not rename files but use symbolic links with name understandable by plex. My Plex Media server is pointed to directory with symbolic links. I've written script that creates all symbolic links on "Torrent Complete" event.