[0.7.0B3]Error renaming

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
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

[0.7.0B3]Error renaming

Post by Taomyn »

Since upgrading to 0.7.0B3 I've been seeing a lot of "Error renaming" warnings in my log, some examples from the log look like this:

Code: Select all

2012-04-23 19:24:22,209::ERROR::[postproc:389] Error renaming "\\marge\Multimedia\Video\TV\Game of Thrones\_UNPACK_Game of Thrones - 2x04 - Garden of Bones" to "\\marge\Multimedia\Video\TV\Game of Thrones\Game of Thrones - 2x04 - Garden of Bones"

2012-04-24 07:21:38,309::ERROR::[postproc:389] Error renaming "\\marge\Multimedia\Video\TV\Eureka\_UNPACK_Eureka - 5x02 - The Real Thing" to "\\marge\Multimedia\Video\TV\Eureka\Eureka - 5x02 - The Real Thing"

2012-04-24 07:27:46,084::ERROR::[postproc:389] Error renaming "\\marge\Multimedia\Video\TV\Bones\_UNPACK_Bones - 7x10 - The Warrior in the Wuss" to "\\marge\Multimedia\Video\TV\Bones\Bones - 7x10 - The Warrior in the Wuss"

It's almost like the folder may be in use so it can't proceed, but nothing on the remote server is using them as far as I can tell. Anyone else seeing these?

Version: 0.7.0B3
OS: Windows Server 2008 R2 SP1
Install-type: Windows Installer
Skin (if applicable): Plush
Firewall Software: None
Are you using IPV6? No
Is the issue reproducible? No, sometimes all is ok
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

Known problem with Windows, which is completely anal regarding folder renames.
If Windows even suspects that some other process is looking at a folder, you cannot rename it.
Examples of other processes: Windows' own indexing and virus-scanners.
Work-around: Turn off he option "Enable folder rename" in Config->Switches.
Downside: you won't see that a folder is not ready yet or is failed (in the Explorer).
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

shypike wrote:Known problem with Windows, which is completely anal regarding folder renames.
If Windows even suspects that some other process is looking at a folder, you cannot rename it.
Examples of other processes: Windows' own indexing and virus-scanners.
Work-around: Turn off he option "Enable folder rename" in Config->Switches.
Downside: you won't see that a folder is not ready yet or is failed (in the Explorer).
Thanks, I'll give that a shot - strange that it's only started happening since going to 0.7
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

I think I've found the issue - it might be my installation of TwonkyServer that just happens to be scanning whilst the _UNPACKED_ folder exists. If it's holding the main media file open then it will prevent the folder name being changed.

The only two ways I can think of to get around this is 1) place a file called .ignorethis or .nomedia into the folder then remove it after the folder is renamed, 2) find a away to get TwonkyServer to ignore folders with a prefix of "_UNPACKED_".

I don't think Twonky will be able to do 2) and I couldn't seem to get any kind of wildcard to work in it's .ini file, but I'm hoping it wouldn't take much to get SABnzbd to place a file into the folder. Any ideas how?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

Why not simply use the work-around and not rename folders?
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

shypike wrote:Why not simply use the work-around and not rename folders?
I still am, but I'm thinking having a flag file like ".ignorethis" that remains only until the job is done might be useful in other circumstances not just Twonky - I notice sometimes with XBMC I would see items listed twice where it saw the _UNPACKED_ folder then the renamed one a little while later.

I'm fairly certain my original issue is with Twonky as it's the only major change I have made to that server, upgraded from v6 to v7, which I did at the same time as SABnzbd.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

Any standardization here? Is it ".ignore" or ".ignorethis"? (The latter one seems unlikely).
Is any of this documented?
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

A good question. The lines in the Twonky .ini file currently are:

Code: Select all

# content folder will be ignored if it contains any files in this list
ignoredirwithfile=.nomedia,.ignorethis
So anyone can add more if needed, so if you find a "standard" then Twonky can hopefully handle it.

I don't know about ".ignorethis", but ".nomedia" is used by Android to prevent the media scanner including the folder and sub-folders where it's located - something I've had to create many a time when apps are poorly coded and I ended up with their cached icons in my Gallery >:(
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

It's a Twonky-exclusive, so I'm not inclined to add support for it.
Android has a spotty reputation regarding the .nomedia file.

In XBMC, you'd do it like this, in advancedsettings.xml:

Code: Select all

<video>
  <excludefromscan>
    <regexp>__unpack__</regexp>
    <regexp>__failed__</regexp>
  </excludefromscan>
  <excludetvshowsfromscan>
    <regexp>__unpack__</regexp>
    <regexp>__failed__</regexp>
  </excludetvshowsfromscan>
 </video>
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

shypike wrote:It's a Twonky-exclusive, so I'm not inclined to add support for it.
Android has a spotty reputation regarding the .nomedia file.

In XBMC, you'd do it like this, in advancedsettings.xml:

Code: Select all

<video>
  <excludefromscan>
    <regexp>__unpack__</regexp>
    <regexp>__failed__</regexp>
  </excludefromscan>
  <excludetvshowsfromscan>
    <regexp>__unpack__</regexp>
    <regexp>__failed__</regexp>
  </excludetvshowsfromscan>
 </video>
Thanks for the code, though it disappoints me to read your cavalier dismissal of the idea. It's not "Twonky-exclusive" by virtue that XBMC can support the function but is simply more sophisticated, and the problems with ".nomedia" in Android aren't with Android or the media scanner, but with the developers that forget to set the file - it's always worked for me when I add the file manually, then informed the dev to fix their app.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

.nomedia would be an option.
The problem I have is that such features cater to specific features of other apps.
Where does it end?
Even for Twonky it doesn't look like a standard setting, you have to edit it setup files.
Possibly we could add a "special" option, specifying which "special" file should be
temporarily added to a folder in progress.
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

Totally undersand where you're coming from - maybe I can pursuade Twonky devs to support wildcards. BTW aren't/weren't there special settings in SABnzbd as well ;)

When I first discovered that Twonky had this feature I thought I might be able to just script it in SABnzbd but there's little scope for doing this as far as I can see. Would be nice to be able to set up scripts to run at certain stages of a download to cater for things like this. That would be a far less specific but far more useful.
User avatar
zoggy
Release Testers
Release Testers
Posts: 89
Joined: February 8th, 2011, 3:08 pm

Re: [0.7.0B3]Error renaming

Post by zoggy »

feel free to fork sabnzbd and make the changes in your own fork.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: [0.7.0B3]Error renaming

Post by shypike »

I think I can add the .nomedia file without too much trouble.
Maybe I'll make it a "special" option for some flexibility.
User avatar
Taomyn
Full Member
Full Member
Posts: 129
Joined: August 25th, 2008, 3:29 am

Re: [0.7.0B3]Error renaming

Post by Taomyn »

shypike wrote:I think I can add the .nomedia file without too much trouble.
Maybe I'll make it a "special" option for some flexibility.
Cool thanks - if you need it tested do let me know, happy to help
Post Reply