Page 1 of 1

Rename category based on filename

Posted: March 4th, 2014, 2:37 pm
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+

Re: Rename category based on filename

Posted: March 4th, 2014, 3:56 pm
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.

Re: Rename category based on filename

Posted: March 18th, 2014, 4:37 am
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

Re: Rename category based on filename

Posted: March 19th, 2014, 3:04 am
by shypike

Re: Rename category based on filename

Posted: March 19th, 2014, 7:11 am
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.

Re: Rename category based on filename

Posted: March 19th, 2014, 8:27 am
by shypike
You can use SABnzbd's Sorting options for show-based organization.
Or use SickBeard for even more sophistication.

Re: Rename category based on filename

Posted: March 19th, 2014, 9:56 am
by colonel-squawk
Not seen that before. I will try that shortly.

Thanks for your help

Re: Rename category based on filename

Posted: March 19th, 2014, 12:28 pm
by colonel-squawk
Brilliant. That worked a treat, thanks so much chap