Page 1 of 1

Sorting/Renaming Case Sensitive

Posted: November 5th, 2013, 3:37 am
by keksnase
Hello,

the tv sorting feature seemingly skips renaming if the file is already named correctly.
but this check seems to be case INsensitive.

I'm using "%dn.%ext" as sort string (original folder name + file extension) so that something like "japhson-grimms02e01-720p.mkv" will be "Grimm.S02E01.720p.BluRay.x264-Japhson.mkv" (if the post was named like that (without extension)), but in some cases groups like "2HD" use lower capitalized filenames like "how.i.met.your.mother.s09e08.hdtv.x264-2hd.mkv" instead of "custom short filenames". I just want those to be renamed to "How.I.Met.Your.Mother.S09E08.HDTV.x264-2HD.mkv"

I don't think this should be too hard to implement, and I would be very happy about it :)

greetings
keksnase

Re: Sorting/Renaming Case Sensitive

Posted: November 6th, 2013, 11:13 am
by shypike
I'm not sure I understand your requirement.
SABnzbd cannot do arbitrary casing on sub-elements like 2HD.

Re: Sorting/Renaming Case Sensitive

Posted: November 7th, 2013, 3:45 am
by keksnase
hey,
thanks for answering. sorry if my request wasn't clear.
I'll try it in other words:
If you use the Sorting feature of SabNZBd (regardless which category) there has to be a check before renaming your media file if the name already equals what it should look like. this is theoretically a very good thing because it would be stupid to rename something that is already correctly named.
my problem is that this check seems to be case INsensitive!

there are groups who name their media files inside their rar's exactly like the release tag just with small capitals (2HD was just an example)

for my library I rename all media files to their release tag name because i don't like those custom/short filenames ("japhson-grimms02e01-720p.mkv" -> "Grimm.S02E01.720p.BluRay.x264-Japhson.mkv")
to achieve this with SabNZBd i'm using "%dn.%ext" as sort string which will concatenate the original folder/post-name with the original file-extension.
for the japhson example this works flawlessly.
for rls which are already named like the folder/post SabNZBd will skip the renaming (as I said: theoretically good thing)
but with "How.I.Met.Your.Mother.S09E08.HDTV.x264-2HD" as folder/post-name and "how.i.met.your.mother.s09e08.hdtv.x264-2hd.mkv" as media file name, the renaming will be skipped too, because the check seems to be ignoring capitalization

I hope I could clarify my request :)

Re: Sorting/Renaming Case Sensitive

Posted: November 7th, 2013, 11:01 am
by shypike
OK. Frankly, I wasn't aware that the check was done.
(I didn't write that part of SABnzbd.)

Re: Sorting/Renaming Case Sensitive

Posted: November 11th, 2013, 2:53 pm
by shypike
Can you email an NZB that shows this behaviour to [email protected]?
Please add the URL of this message.

Re: Sorting/Renaming Case Sensitive

Posted: November 11th, 2013, 3:21 pm
by keksnase
You've got mail! :)

thank you for looking at my problem

Re: Sorting/Renaming Case Sensitive

Posted: November 12th, 2013, 2:43 pm
by shypike
The issue is quite simple.
SABnzbd checks whether the new file exists before renaming it.
On case-insensitive file systems (Windows and OSX), the "new" name will already exist,
so SABnzbd will not rename the file.
On most Unix/Linux systems it will work properly.
I'll see if I can fix this without side effects (the check was done for a reason, I assume).

Re: Sorting/Renaming Case Sensitive

Posted: November 12th, 2013, 4:34 pm
by keksnase
[email protected] wrote:Hi,

Fixed now in the code for release 0.7.17

---
On behalf of The SABnzbd Team,
Kind regards from ShyPike.
Many thanks to you :)
I'm really looking forward to the next release :)