Support and General Use > Plugins/Viewers
Random folder custom directories
Mmmm:
--- Quote from: PaulJam on April 25, 2007, 06:13:28 AM ---Hi,
nice feature.
I was wondering if this could be extended to also be able to specify folders that should not be included in the folderlist. For example in my music directory i have a folder "various artists" that i don't want to be played in random folder mode. With your patch i still have to delete this one manually from the folderlist.
--- End quote ---
Ok, it's done....
To exclude a directory and all its subdirectories type -/DIRNAME as a line in the file "folder_advance_dir.txt"
eg:
--- Code: ----/Cds
--- End code ---
If you want to include the subdirectories, you will need two lines
--- Code: ---CDs
-/CDs
--- End code ---
So from the previous example (in the first post),
--- Code: ---CDs
CDs/favourites
downloads/a-m
-/CDs
-/CDs/a-m
--- End code ---
This would result in a biased favourites folder, /downloads/a-m and all sub dirs, and everything in CDs not including CDs itself and CDs/a-m and its subdirs.
Does that make sense?
EDIT: oh I forgot to say, you can have a max of 10 "removed" dirs (easily increased if that is too few). I've done it this way so that every entry doesn't have to be compared with the whole file, meaning it should be quicker.
PaulJam:
Hi,
it works great now.
Thank you very much.
Btw. without a little modification of the patch, hunk 1 fails.
See http://svn.rockbox.org/viewvc.cgi/trunk/apps/plugins/random_folder_advance_config.c?r1=13232&r2=13233
Mmmm:
Ok ta, that's fixed now (I should update more often :D)
JdGordon:
hmm... youve gone about it in an odd way,
why not have a seperate whitelist and blacklist file?
load the whitelist, recursivly add each folder from that, then load the blacklist and remove each folder in that list?
Mmmm:
Because
i) you'd need two files (bit messy?)
ii) actually removing each dir after they have been inserted means that it would be slower than the way it is now (ie not entering them in the first place)
iii) if you wanted to exclude a whole tree you would have to remove each seperately (ie lots of entries) - although it would be possible to do this recursivly too but that would slow things down even more.
See...there is method in my madness :D, What do you think?
Navigation
[0] Message Index
[*] Previous page
Go to full version