renaming TV shows with obfuscated filenames

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.
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

renaming TV shows with obfuscated filenames

Post by druftiacto »

Hi,

I'm running SABnzbd 2.3.0 on DSM 6 on a Synology. I've recently discovered on this forum that sorting can be used to rename obfuscated filenames to a sensible filename based on the nzb name. I use this for TV shows now and this covers about 80% of these filenames.

However, some groups insist on naming show nzbs with a date, like "My.Show.2018.0102". So far, these shows are not affected by the sorting. Is this when Date Sorting comes into play? And can that be used in conjunction with TV Sorting? Maybe I'm asking the obvious, but I'm not really sure how this works.

Cheers,
druftiacto

Edit: I run SABnzbd 2.3.1, not 2.3.0
Last edited by druftiacto on March 27th, 2018, 10:46 am, edited 2 times in total.
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

Re: renaming TV shows with obfuscated filenames

Post by druftiacto »

I tried to update my previous post, but the edit got refused: "New users cannot post links". I'm sure I didn't post a link, so I don't know what to do.
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

Re: renaming TV shows with obfuscated filenames

Post by druftiacto »

Update- Looking into it, I really don't understand why some of my shows, named like "My.Show.yyyy.mm.dd" are not renamed. Because I just use "%dn.%ext" as a pattern, so SABnzbd doesn't need to "understand " of what parts the name consists. So I really don't understand why the resultant file is called "a8f97237d6c540c4844d14525166425a.mkv". Or could that have something to do with the fact that there is also a par2 file with the same obfuscated name in that directory? I'm stumped (but still happy that I don't have to manually rename 80 % of the files ).
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

You indeed should use the pattern:
%dn.%ext

But also make sure to enable the specific sorting method for the right category and to enable the sorting in general.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

Re: renaming TV shows with obfuscated filenames

Post by druftiacto »

Thanks, @safihre. I have sorting enabled for TV shows, and it works fine, except for one show of which the episodes are named as "My.Show.yyyy.mm.dd". I don't know if that's a coincidence, but that's the only common denominator i see for failing renames.
(The download is the right category as it gets this from SickRage and the files end up in the TV folder. )

Any idea why the renaming doesn't seem to work for these shows? Or how I can debug this? (I've looked at the log, but so far I don't see a difference between how files are dealt with).
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

Re: renaming TV shows with obfuscated filenames

Post by druftiacto »

Update: i tried to use the same pattern ("%dn.%ext") for Date Sorting. However, now the resulting file is named "09n.mkv". Which makes sense, as %d supposedly stands for the day and this show was, indeed, from the nineth. In the sabnzbd wiki, this pattern, "%dn.%ext", is mentioned under Date Sorting, but could it be that the help is just pasted from TV Sorting? ???

druftiacto
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

You will need a newer version of SABnzbd for this, I think it was at least 2.3.1.
That one should be available from SynoCommunity or from the docker, whichever one you use.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
druftiacto
Newbie
Newbie
Posts: 12
Joined: April 27th, 2015, 6:57 am

Re: renaming TV shows with obfuscated filenames

Post by druftiacto »

Thanks, @safihre. I've been looking at the code for 2.3.2 and I see this problem has now been, uh... sorted (sorry for the wordplay... ;D ).

I DO use sabnzbd 2.3.1 which is, I think, the latest package offered by Synocommunity, but which still has the bug that "%dn" is notinterpreted as the dir name.

I read a message on the Dutch synology forum that package creators have a hard time updating packages for DSM 6.0 and later, so that might be a reason we still have to wait. A pity, considering that your work on this is from last year! Thanks for your great efforts,

Cheers,
druftiacto
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

I am also working with SynoCommunity on the new packages.
It's getting very close to a next release now.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
jrtwynam
Newbie
Newbie
Posts: 6
Joined: December 1st, 2018, 12:38 pm

Re: renaming TV shows with obfuscated filenames

Post by jrtwynam »

Hi,

I'm having a similar problem. Many of the files I download have obfuscated filenames, and I'd like to somehow automatically rename them using the nzb file name. I'm using SAB version 2.3.5 on Windows 7, along with Sonarr and Couch Potato. Sonarr seems to rename stuff fine, but Couch Potato doesn't. No matter what I do, I haven't been able to get its renamer to work, so I'd like to have SABnzbd do it for me. I've read a bunch of stuff that suggests using the Date Renamer, and I have that enabled for my movies category using %dn.%ext as the sort string, but no luck. My other thought was to add something to the end of my post processing script to do the rename, but I'm not sure how that'd work.

Quite often, a download includes multiple files - the actual movie file, maybe an sfv file, maybe a couple of jpg files (cover art, etc), maybe an nfo file, etc. My script deletes everything with certain extensions, so in theory the only remaining file after that's done will be the movie file. I had thought of simply renaming all files to the nzb filename (with the original file extension), but how would that work with direct unpack? It unpacks directly to my movie download folder as it's downloading, and that folder may contain other files that have previously downloaded and I haven't organized yet. So somehow I need to be able to get the script to recognize only the file(s) in the target folder that were actually downloaded by that particular nzb file.

Maybe I'm making this far more complicated than it needs to be. Any help would be appreciated.

Thanks.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

What you want can be done using Deobfuscate.py script that's include in the scripts folder of the sabnzbd installation.
Just set it as a post processing script :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
NZBeaner
Newbie
Newbie
Posts: 15
Joined: December 6th, 2017, 10:25 pm

Re: renaming TV shows with obfuscated filenames

Post by NZBeaner »

safihre wrote: December 2nd, 2018, 1:19 pm What you want can be done using Deobfuscate.py script that's include in the scripts folder of the sabnzbd installation.
Just set it as a post processing script :)
Running 2.3.7. I see Deobfuscate.py in the install folder, but HOW do I "Just set it as a post processing script"???

Also, where can I get some basic info on using Couch Potato, Sonarr (never even heard of that one... ) Sick Beard, etc?

Used to use Newsleecher, SABNZBD is so much better!

Thanks!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

You can set the Script's folder in Config > Folders to be the "scripts" folder inside the install folder. Just use the browse-buttton :)

There's a couple of guides out there to setup Sonarr, and even a couple of Youtube videos.
They probably explain what it does very well :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
NZBeaner
Newbie
Newbie
Posts: 15
Joined: December 6th, 2017, 10:25 pm

Re: renaming TV shows with obfuscated filenames

Post by NZBeaner »

Set the folder containing Deobfuscate.py as the script folder, made no difference at all. File name still obfuscated.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: renaming TV shows with obfuscated filenames

Post by safihre »

And then you need to set the Deobfuscate.py script as your Post-processing script in Config > Categories. For example for your Default category.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply