Page 1 of 2
[Request] Plugin to rename all files in a torrent.
Posted: Thu Jan 20, 2011 7:55 am
by Hiram
Hi guys, I'm wondering if there's a plugin to rename all files in a torrent?
The situation for me is, if I download an entire series, sometimes the files have mangled names that won't get picked up by XBMC, like "TVShow Ep1" Rather than "TV Show S01E01".
Obviously, the solution is to use a batch renamer, but that won't let me keep seeding the files, so my current solution is to rename each file, manually, through the GTK interface.
If no plugin of this type exists, I may look into writing one myself.
Thanks.
Re: Plugin to rename all files in a torrent.
Posted: Sat Jan 22, 2011 9:45 am
by Barrasmara
I have the same issues, I'd welcome such a feature.
Re: Plugin to rename all files in a torrent.
Posted: Sun Jan 23, 2011 5:20 pm
by Cas
you could use flexget to download from rss and have it rename them.
Re: Plugin to rename all files in a torrent.
Posted: Sun Jan 23, 2011 7:56 pm
by CSB
Sorry, but it looks like flexget won't let you rename files inside a torrent... unless there is some functionality I don't see.
Re: Plugin to rename all files in a torrent.
Posted: Mon Jan 24, 2011 5:14 am
by Hiram
Flexget does have functionality to rename files inside a torrent, but as stated here:
http://flexget.com/wiki/Plugins/deluge#ContentRenaming, "It will only rename a file if it finds that 1 file in the torrent is larger than 90% of the total torrent content" which makes it useless for batch torrents.
I may look into writing this then if it's currently not possible.
Edit: I've looked into this, and no offense to the developers but the documentation for developing a plugin is a tad poor. I looked at the Label plugin for adding a MenuItem to the popup menu when you right click on a torrent, and when I put that same code in mine, it doesn't work.
Actually, nothing works. Spamming the console with 20 prints of "Hello" doesn't work, and neither does log.debug("hello") x 20 either. It's like my plugin isn't being enabled at all.
Re: Plugin to rename all files in a torrent.
Posted: Mon Jan 24, 2011 3:26 pm
by paranoidi
Unfortunately it's not possible to modify filenames in a torrent since it will mess up hashes. At least it was my conclusion after looking into it with FlexGet. However the movedone in deluge is brilliant for allowing to rename them in client (in most relevant cases), I wish other clients would support same kind of API

Re: Plugin to rename all files in a torrent.
Posted: Mon Jan 24, 2011 5:12 pm
by Cas
Documentation is quite thin and could use some community input. You could start another thread asking for help from the other plugin developers.
Hiram wrote:Spamming the console with 20 prints of "Hello" doesn't work, and neither does log.debug("hello") x 20 either. It's like my plugin isn't being enabled at all.
Print statements will not work but using log.info worked fine for me. You need to run Deluge with logging enabled 'deluge-gtk -L info'
Snippet from core.py
Code: Select all
from deluge.log import LOG as log
...
class Core(CorePluginBase):
def enable(self):
...
log.info("Plugin Enabled")
Re: Plugin to rename all files in a torrent.
Posted: Mon Jan 24, 2011 10:38 pm
by Hiram
I've created another thread to deal with my plugin issues. I've looked into it further, the problem I'm having is to do with the GTK part of my plugin not being pulled in. But anyway, that's for the the other thread!
Re: [Request] Plugin to rename all files in a torrent.
Posted: Tue Feb 01, 2011 8:26 am
by Barrasmara
Flexget is great for what it is and it is perfect for keeping me up to date with mainstream stuff, but if you are downloading things outside the rss feed (rarities, private torrent sites, one off documentaries, really old series) then batch torrents can be much easier. They're also frustrating because they have inconsistent naming and can't be scraped by XBMC and the like. Batch renaming would definitely be a very useful tool for staying on top of it all.
Re: [Request] Plugin to rename all files in a torrent.
Posted: Tue Feb 01, 2011 1:57 pm
by Cas
Barrasmara wrote:if you are downloading things outside the rss feed (rarities, private torrent sites, one off documentaries, really old series) then batch torrents can be much easier.
Not tried it myself yet but have you seen this:
http://flexget.com/wiki/Plugins/--inject