Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Collection folder monitoring does not work over samba (Read 18403 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Collection folder monitoring does not work over samba

I keep all  my music on remote machine which exports folder structure over samba (SMB). The major problem with is that foobar is unable to monitor these folders correctly and never updates collection if I add any new songs. I'd like to ask for option to manually trigger collection updates as foobar used to offer couple of versions ago. As of now I need to delete the whole collection and add it back which, politely speaking, sucks as hell as indexing thousands of files from scratch over the network (even 1Gb) takes too much time.

Collection folder monitoring does not work over samba

Reply #1
As a workaround you can drag folder with your music to temporary playlist.

BTW, which version of foobar2000 do you use? Under Windows or WINE?

Collection folder monitoring does not work over samba

Reply #2
As a workaround you can drag folder with your music to temporary playlist.

BTW, which version of foobar2000 do you use? Under Windows or WINE?


foobar 0.9.6.3, under Windows. Samba server runs linux but it really does
not matter. Thanks for the workaround - I will give it a spin next time, still
a dedicated button is what I really miss, as I often add many folders
in various subfolders so dragging to temp playlist is would take me time.

Collection folder monitoring does not work over samba

Reply #3
I have the same setup and the same problem with the new foobar. I also remember having problems when you move or delete songs (on the server). And if you add these songs again after moving them around, there will be duplicates in the library. Remove Dead Items will not work and you'll have to rescan everything. For these reasons I'm still using version 0.9.5.1 under Windows...

Collection folder monitoring does not work over samba

Reply #4
My media files are located on Linux box, in directory shared via Samba. On Windows box this share is given its drive letter and added to Foobar's Media Library. If share goes offline and online again while Foobar is running, Media Library starts to rescan everything on it!

Steps to reproduce (checked with 0.9.6.5 beta 2):

  • Run foobar2000, make sure that at least one samba share from another computer is added to Media Library and let it finish scanning for media files located there.
  • Shutdown the connection between computers (pull the network plug, reboot the other computer, etc.)
  • Bring the connection up again while foobar2000 is still running, and notice that after a while it starts to rescan every file on reconnected share (in my case I can see console filled with "location not parsable" warnings coming from every cover art jpeg on the share).
  • Optionally you can quit foobar2000 at this moment and run it again to notice that after restart it no longer thinks that such a rescan is necessary.


Collection folder monitoring does not work over samba

Reply #5
It is also rarely possible to cleanly close foobar while the rescan is running. Most of the times interface freezes after clicking "
  • " and all you can do is to kill foobar to stop this insane rescan...

Collection folder monitoring does not work over samba

Reply #6
This is a problem for me also, would be keen to hear what can be done about it.

Collection folder monitoring does not work over samba

Reply #7
Yes, some official info about this issue would be appreciated. Will this be considered as a bug, will there be a fix, when can such fix be expected eventually, etc.

Thank you.

Collection folder monitoring does not work over samba

Reply #8
The problem persists and seems to remain unnoticed or ignored by developers. Sad but true.

This time after the usual "unnecessary rescan / hang while trying to close / kill process" trio my database vanished and I have to rescan everything. I suppose this COULD happen due to abnormal termination, but why it hangs anyways? And why those rescans?

Collection folder monitoring does not work over samba

Reply #9
Clobbering a process is never healthy. Do you kill -9 processes on your precious Linux as well?

In any way, I cannot seem reproduce your issue with my trusty Windows Server 2008 share here. Try mounting a share from a Windows server and see if it still happens. If not, the fault most probably lies with your samba implementation.
Stay sane, exile.

Collection folder monitoring does not work over samba

Reply #10
In any way, I cannot seem reproduce your issue with my trusty Windows Server 2008 share here. Try mounting a share from a Windows server and see if it still happens. If not, the fault most probably lies with your samba implementation.


Yes, I suppose you're right. I've no other Windows box around to check if anything like that happens but then I never told that it does (and I have no reasons to distrust you ). It may be some samba quirk, but linux based NASes aren't that uncommon and foobar (or foobar's media library to be precise) is the first application I've ever seen that have problems with samba.

Also - samba problems aside - it's really bad that foobar hangs if you try to quit while scan is running. This IS foobar's bug.

Collection folder monitoring does not work over samba

Reply #11
What version of Samba are you running?
elevatorladylevitateme

Collection folder monitoring does not work over samba

Reply #12
What version of Samba are you running?


net-fs/samba-3.0.33  USE="cups pam python readline -acl -ads -async -automount -caps -debug -doc -examples -fam -ipv6 -ldap -oav -quotas (-selinux) -swat -syslog -winbind"

Collection folder monitoring does not work over samba

Reply #13
Foobar version 0.9.6.7

When upgrading from 0.9.5.x to 0.9.6.x, I noticed the "Rescan library" option gone.  Release notes say library is auto-managed, but I've had problems with this.  I'm not sure if the problems are due to how I use foobar, but here I go:

Background:

My media library is located on a network file server (Linux running Samba).  Reason: I want music library accessibly by multiple computers running different operating systems.  This scenario also provides cases where the media library may be modified outside of foobar2000; for example, I frequently do basic file operations directly from my linux account.  Or, I may purchase a tune from itunes (on a separate computer) and then manually copy the file from where itunes downloads the file on the network file server so I can access it via foobar2000 (or linux-based media players).  I also have two WinXP systems that run foobar2000, both referencing the same network file share for my music library (one is a desktop the other a laptop).

Problems encountered:

(1) Library does not detect when files are added or removed by external processes.  For example, if I delete files under linux, foobar2000 does not automatically see the changes (even after waiting some time figuring monitoring may have a time delay).  I use the Edit menu's "Remove Dead Items", which appears to work, but only temporarily.  If I go and use the Library menu Album List capability to change what is displayed in the Library Viewer Selection tab, the "dead items" show up again.  It seems that "Remove Dead Items" should permanently remove items no longer present, but it does not.

(2) Trying to call "File Operations|Delete File..." on an item where the underlying file is already removed (see problem [1]), foobar2000 generates an error message, but still keeps the "dead" item in the Library.

(3) Adding new media files from an external process are not seen by foobar2000 (automatically).

I do not know the specifics of how foobar2000 "monitors" the library, but it appears to either be incomplete or limited, especially if library contents are modified by external processes.  In past versions, I used "Rescan library" feature, but it is now gone.  If the "Removed Dead Items" function removed things permanently, that would solve the external deletion problem, but does not address if additions (or modifications) are made to the library by external processes.

Currently, to force a "rescan", I goto "Media Library" preferences, remove my network path folder from "Music Folders" and then add it back in.

A "rescan" function would be more user friendly (for my usage scenario), especially if the rescan can be done on select sub-folders of the media library for cases when a complete rescan is overkill.

Collection folder monitoring does not work over samba

Reply #14
threads merged

Earl: So what version of Samba are you running?
elevatorladylevitateme

Collection folder monitoring does not work over samba

Reply #15
Earl: So what version of Samba are you running?

Samba 3.0.28.

This is the version provided for CentOS 4 (which is just a repackaging of RHEL 4).

BTW, I do not know if this matters since I'm not familiar with foobar2000 internals, but I access the network drive directly vs mounting it to a drive letter.  For example, \\host\user\music

Collection folder monitoring does not work over samba

Reply #16
I do not know the specifics of how foobar2000 "monitors" the library, but it appears to either be incomplete or limited, especially if library contents are modified by external processes.
The truth is that everything works properly on shares provided by Windows systems and the limitation is on the Samba/Linux side. I'm aware that this is not helpful in any way, and there are even some workarounds in fb2k directory watching code for these cases, I'm just reiterating this in case your issue won't get resolved - it's not foobar2000's bug, which just tries to use a handy feature of the platform.
Full-quoting makes you scroll past the same junk over and over.

Collection folder monitoring does not work over samba

Reply #17
the limitation is on the Samba/Linux side. I'm aware that this is not helpful in any way, and there are even some workarounds in fb2k directory watching code for these cases, I'm just reiterating this in case your issue won't get resolved - it's not foobar2000's bug, which just tries to use a handy feature of the platform.

Understood.

At a minimum, fb2k should be smart enough to permanently remove items from the library if "File Operations|Delete File" fails due to file not existing, or at least provide the option to permanently remove the item(s) if underlying files are non-existent.

And, the "Edit|Remove Dead Items" should be permanent instead of just for the current view.  If an item is "dead" why maintain its record in the media library?

Collection folder monitoring does not work over samba

Reply #18
Well everything under Edit menu pertains to active playlist only. There used to be "Remove dead items" and "Rescan" commands under Library menu too - which did what you suggest - but it was removed when automatic folder watching was introduced. I agree it might be a good choice to allow using them manually again for these scenarios, although I'm not sure if there aren't other things depending on folder watching (I can imagine e.g. why would one dispatch a delete notification when you'll get one automatically from the filesystem a split second later anyway?).
Full-quoting makes you scroll past the same junk over and over.

Collection folder monitoring does not work over samba

Reply #19
(the end of the topic's title is "requires a foobar restart" - too bad long titles are truncated)

Hello,

When adding new tracks to my library folders (File Operations > Move to...), foobar library isn't updated : the added tracks do not appear as part of foobar library, so the autoplaylists are not updated, etc.

It takes a foobar restart to make new tracks appear. This behaviour is easily reproductible for me, it just happens all the time. Once foobar is restarted, new tracks appear within 1-2 seconds.

My config :
- foobar 0.9.6.8 with DUI and some usual components
- Unix network file server (Debian, ext3 file system)
- Windows XP SP3 with SMB access to the server

I am willing to perform further testing if needed / helpful. Thanks in advance.

PS : this didn't happen with my previous version (0.9.5.5) : the added tracks used to appear immediately as part of the library, which is I believe the intended behaviour.

Collection folder monitoring does not work over samba

Reply #20
Thanks to both of you, but as you will notice I was already aware of that topic, since I had even posted on it (Apr 29 2009, 10:38).

Unfortunately there wasn't any reply to my post for about a month, so I had stopped watching that topic (a month without any reply is too much time IMO). I thought it was dead and buried.

Now I have seen the latest answers. So it's not foobar's fault, it's Samba/Linux fault. Well, great news. These are my observations then :

1. This topic could be merged with the old, reactivated "Problem with Media Library and Samba share, rescans everything when share is reconnected after network failure" topic.

2. Like Yirkha said in the other topic, "There used to be "Remove dead items" and "Rescan" commands under Library menu too - which did what you suggest - but it was removed when automatic folder watching was introduced. I agree it might be a good choice to allow using them manually again for these scenarios, although I'm not sure if there aren't other things depending on folder watching".

I mean, I'm glad it's not foobar's fault, but we need to remain pragmatic. It would be great if Windows / Samba were 100% bug-free, but (a) it's a utopy, and (b) we won't get Microsoft to work on those issues, unfortunately. So even if it's not the "right way" to do it from the developer's point of view (which I understand perfectly), I guess we need to find a viable workaround for this, be it what Yirkha suggested or anything else.

Because, well, it would be a very sad thing to be forced to say "don't store your precious audio data into Linux servers, because there are Samba problems, and store it in Windows servers instead so that foobar can access it correctly".

Yirkha, more seriously, is this issue being thought about on the developer side, so that a solution can be found soon for all hybrid Linux/Windows users out there ?
And are there other workarounds I could try eventually ?

Thank you.

Collection folder monitoring does not work over samba

Reply #21
[Merged upon thread starter's request]


foorious: What version of Samba are you running?


Half the problem here is that people are using a technology (Linux) that they are unfamiliar/uncomfortable with and therefore unable to update.

Should Samba be updated to include implementations for the necessary folder watching functions, most people will never be able to take advantage of those updates without purchasing new hardware (that has the new version of Samba preloaded), anyways.
elevatorladylevitateme

Collection folder monitoring does not work over samba

Reply #22
Providing workarounds for bugs in inferior products like Samba has rarely ever been a concern in foobar2000 development. foobar2000 is a Windows application, tested on Windows platforms. The same perspective is seen in relation to Wine. If the Samba guys are interested in fixing their bugs, foobar2000 provides several breakages for them to play with. This is not foobar2000's problem. If you want this problem fixed, switch to properly tested software and ditch Samba.

Collection folder monitoring does not work over samba

Reply #23
Thanks shakey, one thread is better than two.  I'll have a look at my Samba version. I can run updates on my home-made Debian server, no problem... provided they are available of course.

BTW, I sometimes get a slightly different behaviour from foobar. Sometimes when adding a new album, only the FIVE first tracks of the albums are added to the library. Not 4, not 6, just 5, regardless of the total number of added tracks. This has happened several times, the number being always 5.

So we have behaviour 1 = we add an album but 0 tracks are added to the library, and behaviour 2 = we add an album but only the first 5 tracks are added to the library.

I don't know if this can help, but it's a funny random behaviour anyway.

@Canar : Like I said I understand your way of seeing things, although I don't agree with it entirely : you would be right only in a perfect world, but our world is far from perfect and everything doesn't work like we'd like to. That's the difference between idealism (pursuing some kind of unreachable perfection) and pragmatism (doing our best with the tools that we get at a given time, instead of simply asking for better tools). One funny example : if you needed to go to the pharmacy store because your mom is sick, but your car is broken, would you decide to go by foot anyway, or would you wait for the car to be fixed in order to do things 'properly' ?  That's just my opinion, but everyone is entitled to make his own mind so I won't comment further on this.

Collection folder monitoring does not work over samba

Reply #24
If the Samba guys are interested in fixing their bugs, foobar2000 provides several breakages for them to play with.

Have Samba developers been notified about all those problems? Foobar seems to be pushing the envelope in using various filesystem related features in Windows and may indeed be interesting for Samba guys.  Simple search for "foobar2000" in Samba's bugzilla yields nothing...

Of course I could file bug report about unspecified "samba issues when using foobar2000", but developers seem to have some insight about nature of said bugs (e.g. workarounds used in foobar's code) and their report would be a lot more useful.