Author Topic: Ignore folder and next random track  (Read 867 times)

gurie

  • Newbie
  • *
  • Posts: 1
    • View Profile
Ignore folder and next random track
« on: April 18, 2016, 20:20:09 »
Hi,

I have two suggestions for new features. For both of them I came up with some workarounds, maybe an expert could comment on them too:

1.  When scanning folders, I would like to ignore the folder AND all subfolders IF there is a file (e.g. ".ignoregm") in the folder. My somewhat ugly solution is to change the ScanFolder routine in gmusicbrowser.pl:
Code: [Select]
...
my $ignore_file = any { $_ eq ".ignoregm" } @files;
if(!$ignore_file)
{
for my $file (@files)
...

While this seem to work, I don't really understand the routine (I don't know perl...) and don't know if this does anything bad.  Any comments or plans for the future?

2. Some other player (foobar2000?) had the option for "Next random song". I would like to jump to a random track from my library without changing the normal order. At the moment, I use the following dbus commands:


dbus-send --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.RunCommand string:ToggleRandom
dbus-send --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.RunCommand string:NextSong
dbus-send --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.RunCommand string:ToggleRandom


Works really well, but a built-in command may be nicer...


P.S. Thanks for the great work, I love gmusicbrowser!