Last Whitespace ignored in renaming template

Report & discuss bugs found in 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
Samkook
Newbie
Newbie
Posts: 16
Joined: November 11th, 2008, 2:01 am

Last Whitespace ignored in renaming template

Post by Samkook »

The pattern I use for TV shows in the sorting tab is: %sn/%sn - %0sx%0e - .%ext
but the whitespace before the extension is ignored and the result is "Show Name/Show Name - 01x05 -.avi" instead of "Show Name/Show Name - 01x05 - .avi".

This means that I always have to add a whitespace before pasting the episode name which is slightly annoying.
It worked a while ago, or maybe it only worked on windows, I'm not exactly sure(I really shouldn't have been lazy and reported those as soon as I noticed them).

To circumvent that, I tried %sn/%sn - %0sx%0e -{ }.%ext, but the result is the same.
Using v0.6.9 python source with IPv4 and no firewall on Mepis 11 with the default skin.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Last Whitespace ignored in renaming template

Post by shypike »

These extra spaces are removed because on some OS they cause problems.
Also, it's not what people generally want.
Samkook
Newbie
Newbie
Posts: 16
Joined: November 11th, 2008, 2:01 am

Re: Last Whitespace ignored in renaming template

Post by Samkook »

Ahh, so there's no chance of me being able to have this fixed. I would imagine people would want the template to be what they actually type, but if it cause problem on some os, it's understandable that this behavior got changed.

I guess I'll have to try to find a way to rename them automatically with the episode name then.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Last Whitespace ignored in renaming template

Post by shypike »

You can use the %fn replacement, which will give you the original file name.
That often contains the episode name.
Just curious, where do you get the episode name from?
Samkook
Newbie
Newbie
Posts: 16
Joined: November 11th, 2008, 2:01 am

Re: Last Whitespace ignored in renaming template

Post by Samkook »

The episode name very rarely is in the filename, at least in the feeds I used. I was using tvbinz.net until it closed recently and now I'm temporarily using nzbindex.com until I find a better one since this one often catch the joke name of the series.

I get the episodes name manually from thetvdb.com. I know they have an xml API that would make it possible to fetch the episode name automatically, but it's a bit out of my competence to create a script for this since my programming skills are a bit rusty. I'm kind of surprised nobody else though of making one.
Post Reply