Bugzilla – Bug 17983
TinyLMS need robust and flexible way to exclude directories on attached storage
Last modified: 2012-06-23 12:20:03 UTC
A big difference of TinyLMS (Touch embedded server), compare to LMS on a real server, is that it scan the whole disk, instead of only a directory. Because of that, it's impossible to control which files are scanned and which are ignored, because everything is scanned. I've just had that problem biting me. I have a hard drive with both music and a large directory of pictures. The scanner failed (the server stopped), of course without telling me where. As the disk was ext3, I try to "chmod 000" various directories to try to identify the culprit. To my surprise, even with read and write disabled on all directories, I could see that the scanner was still scanning files in those directories. And anyway, if the file system had been FAT or NTFS, I would not have been able to tweak permissions. The only solution was to blindly remove files. I've read about the ignoreRE directive, but IMHO that's not a good solution. http://forums.slimdevices.com/showthread.php?66427-How-to-Exclude-Directories First, it's not flexible, you need to encode all those directories in a RegExp, that would become tedious pretty quickly with a large number of directories, and those permission on TinyLMS are not exactly easy to change for the common mortal. Second, it's not robust because the pref is attached with the player, not the collection (and the collection may move around), and those prefs may be blown away by a reset. What I propose instead is that the scanner check the presence of a pseudo file in the directory to decide if the directory need to be scanned or not. For example, of the directory contains a file called ".lms.ignore", scanning should skip that directory and subdirectory. That's the most simple, easy and effective solution I can think about. Thanks in advance ! Jean