Rename category based on filename

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
colonel-squawk
Newbie
Newbie
Posts: 6
Joined: March 4th, 2014, 1:16 pm

Rename category based on filename

Post by colonel-squawk »

Hello. I use Sickbeard and Sabnzbd together and I love it. However, I am tired of manually moving the downloaded files into the correct folders.

I use it on Ubuntu (12.04 I think) and I have about 10 TV series defined in Sickbeard. I have a category set up for each series in Sabnzbd and those categories ensure the downloaded clip is put into the right folder. BUT, they only work if I manually change the category in Sabnzbd. How can I get the application to read the filename of the NZB and apply a category automatically? I have done quite a few searches for this information, but it appears the categories work off the releaser group, or the newsgroup. I don't think I can reliably know either of these items as its all automatic.

I also saw about the postProcess.py script, but it went over my head.

Am I hoping for too much, or is there something I can do?

Thanks, for any help...

(little bit of tech info - may help)
Sickbeard downloads NZB into blackhole. /home/xxxx/NZB/
Sabnzbd picks up these and downloads into /home/xxxx/Video/TV/
In /home/xxxx/TV/ I have a folder per series.
The categories (when assigned) move the videos into the correct sub folder. All good. Its just not automatic.
Running Sabnzbd 0.7.17Beta3 on Python 2.7.5+
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Rename category based on filename

Post by shypike »

Some indexers use categories too.
If you use an RSS feed from the indexer you can map the indexer's categories on your own.
See Config->Categories.
A few indexers also have category info in their NZB files. The same mapping method applies.
colonel-squawk
Newbie
Newbie
Posts: 6
Joined: March 4th, 2014, 1:16 pm

Re: Rename category based on filename

Post by colonel-squawk »

I don't use any RSS feeds, I use the stock Usenet indexers. I'll try to find an indexer that utilises categories

Thanks
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Rename category based on filename

Post by shypike »

colonel-squawk
Newbie
Newbie
Posts: 6
Joined: March 4th, 2014, 1:16 pm

Re: Rename category based on filename

Post by colonel-squawk »

Yeah, I did look at those, and I tried to implement fastNZB, but I fail to see how the categories work:

http://fastnzb.info/api/?t=search&apikey=[api-key]&q=bates+motel

In the XML results are the items, and here is one:

<item>
<title>Bates.Motel.S02E02.HDTV.Subtitulado.Esp.SC.avi.zip</title>
<guid isPermaLink="true">
http://fastnzb.info/details/ba1ef28d40a ... d7356c4deb
</guid>
<link>
http://fastnzb.info/getnzb/ba1ef28d40a7 ... nzb&i=1275
</link>
<comments>
http://fastnzb.info/details/ba1ef28d40a ... b#comments
</comments>
<pubDate>Thu, 13 Mar 2014 21:59:30 +0100</pubDate>
<category>TV > SD</category>
<description>Bates.Motel.S02E02.HDTV.Subtitulado.Esp.SC.avi.zip</description>
<enclosure url="http://fastnzb.info/getnzb/ba1ef28d40a7 ... nzb&i=1275" length="7331" type="application/x-nzb"/>
<newznab:attr name="category" value="5000"/>
<newznab:attr name="category" value="5030"/>
<newznab:attr name="size" value="7331"/>
</item>

But, the category isn't what I would want to use. I don't have mine split like that. I want a category based on the actual show. So Bates Motel, or Hannibal, or Top Gear, etc... Those categories are what I've used to move the downloaded file into the correct folder on the server...

I have a feeling I can't do it, or I need to post process the download using Python or something to work out the show from the filename and move it accordingly.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Rename category based on filename

Post by shypike »

You can use SABnzbd's Sorting options for show-based organization.
Or use SickBeard for even more sophistication.
colonel-squawk
Newbie
Newbie
Posts: 6
Joined: March 4th, 2014, 1:16 pm

Re: Rename category based on filename

Post by colonel-squawk »

Not seen that before. I will try that shortly.

Thanks for your help
colonel-squawk
Newbie
Newbie
Posts: 6
Joined: March 4th, 2014, 1:16 pm

Re: Rename category based on filename

Post by colonel-squawk »

Brilliant. That worked a treat, thanks so much chap
Post Reply