Page 1 of 1

Renaming to (null)

Posted: January 5th, 2014, 3:48 pm
by splitter
So....

i have a list of old show (earth final conflict, to be precise) which i have on dvd.
but i can't be bothered to convert it, so i'm looking to download it.

what i'm noticing now is that, when it gets added to sabnzbd it is completely correct: the details give the right filename and all that,
and it downloads without problems.
however, when it start downloading, the information changes to have the filename be (null), which is the eventual filename it ends up with...

so: downloading "earth.final.conflict.s04e05.dvdrip.xvid-vf" will show, before it gets downloaded, to have a filename of "earth.final.conflict.s04e05.dvdrip.xvid-vf.avi",
but when it starts downloading, the same information now states the filename to be "(null)".
it downloads, and actually saves it as (null), but renaming it manually makes it work flawlessly.
obviously, i can't sit and do this all the time, so i was wondering how this is happening?
i can't seem to find any reason in the logfiles, and other downloads do not seem to share this problem.

Re: Renaming to (null)

Posted: January 5th, 2014, 4:16 pm
by sander
I can confirm what you describe: SAB downloads the NZB, and the resulting file is:

-rw-r--r-- 1 sander sander 367159296 jan 5 22:07 (null)

which - strangely enough - is playable in VLC.

I think the problem is in the post itself: when it's in the download queue, and you click on it, there are no par or rar files, just one "null" file. That is also what binsearch shows.

So I would say: bad post.

Re: Renaming to (null)

Posted: January 5th, 2014, 4:23 pm
by splitter
so, the entire season is bad ?

but what i'm wondering is, why does it show the actual filename (with .avi) when in the queue (but not yet starting to download),
and then changes it to (null) when starting the download?

i've currently changed SAB to download it into folders (so the null files wont override each other) and will manually change them afterwards,
but this is far from being the best solution...

is there no way to change SAB's behaviour, that when the filename is (null) it changes the filename to the description? (which would still leave out .avi, but thats just a minor thing)

Re: Renaming to (null)

Posted: January 5th, 2014, 4:37 pm
by sander
In the main window, SAB shows the name of the NZB-name, not of any files.

While in the download queue, when you click on the download, another window will open, which will shows the (intermediate) files in the post. Normally you will see a list of rar and par files, but this post just show one file "(null)". So: bad post.

You could maybe write a SAB script to do the renaming for you. Use $2 (or %2 on Windows) for that. See http://wiki.sabnzbd.org/user-scripts

Re: Renaming to (null)

Posted: January 5th, 2014, 4:56 pm
by splitter
Sander, see this screenshot, it's from one of the files that has to start downloading a while down the queue.
However (and i checked this with all previous ones, as well), as soon as it starts to work on this one, that same screen will indeed show (null)

http://picpaste.com/Screenshot_from_201 ... rRQrzJ.png

about the user scripts, i'll be looking into that, thank you.

Re: Renaming to (null)

Posted: January 5th, 2014, 5:03 pm
by sander
Yes, there is something strange going on.

I'm having a look at the .NZB itself ... because there is "...s04e07.dvdrip.xvid-vf.avi" (thus: avi filename) in there. Maybe there are characters/formatting in that line of the .NZB that are illegal ... ?

Re: Renaming to (null)

Posted: January 5th, 2014, 5:20 pm
by sander
Even after cleaning up the .NZB I still get the (null) file.

But, good news: I have an ugly script (I hate shell programming with quotes and escape symbols) that does the renaming:

Code: Select all

#!/bin/bash
cd "$1"
mv * "$2".avi
exit 0
On which platform is your SABnzbd running?

Re: Renaming to (null)

Posted: January 5th, 2014, 5:24 pm
by splitter
i'm running it on openmediavault, a debian based distro.
i've just made a script to start off with the parameters SAB passes, and am now trying to figure out what it gives me,
because again i don't want to keep checking this out manually, so i want to apply it to the entire queue.
though your script does give me a quick fix (and i love quick fixes), but in the end i'll have to have something that checks if its (null),
and if so rename and put where it has to be.

still don't get why it's doing this though?

Re: Renaming to (null)

Posted: January 5th, 2014, 5:30 pm
by sander
I agree with you, but I can't find/repair the fault in the .NZB

Here's a more secure script:

Code: Select all

#!/bin/bash

cd "$1"
pwd
ls -al
mv "(null)" "$2".avi
ls -al
exit 0
You have to create a separate .NZB for each episode ... :P

HTH

Re: Renaming to (null)

Posted: January 5th, 2014, 5:57 pm
by splitter
thanks for the help sander!

i've made this script, which, for now, will do what i need.
in the next days i'll try to modify it to check out what to do for all categories and stuff,
so that if nzb's from other files/categories have the same problem, they can be handled as needed.

Code: Select all

#!/bin/bash
LOCATION=$1
NAME=$2
CLEAN=$3
echo "Time: $(/bin/date)" >> /SABnzbd/logs/nullname.log
echo "Show information:" >> /SABnzbd/logs/nullname.log
echo "Location: $LOCATION" >> /SABnzbd/logs/nullname.log
echo "Name: $NAME"  >> /SABnzbd/logs/nullname.log
echo "Clean info: $CLEAN"  >> /SABnzbd/logs/nullname.log
cd "$1"
echo "Currently working from: $(pwd)" >> /SABnzbd/logs/nullname.log
mv "(null)" $CLEAN.avi
echo "----------------------------" >> /SABnzbd/logs/nullname.log
echo "Processed and logged in nullname.log"
exit 0