[Request] Plugin to rename all files in a torrent.

Suggest, post, or discuss plugins for Deluge
Hiram
Member
Member
Posts: 16
Joined: Thu Jan 20, 2011 7:34 am

[Request] Plugin to rename all files in a torrent.

Post 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.
Barrasmara
New User
New User
Posts: 8
Joined: Sat Jan 22, 2011 9:31 am

Re: Plugin to rename all files in a torrent.

Post by Barrasmara »

I have the same issues, I'd welcome such a feature.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Plugin to rename all files in a torrent.

Post by Cas »

you could use flexget to download from rss and have it rename them.
CSB
Leecher
Leecher
Posts: 66
Joined: Fri Dec 03, 2010 1:55 am

Re: Plugin to rename all files in a torrent.

Post 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.
Hiram
Member
Member
Posts: 16
Joined: Thu Jan 20, 2011 7:34 am

Re: Plugin to rename all files in a torrent.

Post 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.
paranoidi

Re: Plugin to rename all files in a torrent.

Post 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 :)
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Plugin to rename all files in a torrent.

Post 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")
Hiram
Member
Member
Posts: 16
Joined: Thu Jan 20, 2011 7:34 am

Re: Plugin to rename all files in a torrent.

Post 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!
Barrasmara
New User
New User
Posts: 8
Joined: Sat Jan 22, 2011 9:31 am

Re: [Request] Plugin to rename all files in a torrent.

Post 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.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: [Request] Plugin to rename all files in a torrent.

Post 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
Post Reply