Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Auto-Shuffle not working in combination with "folder" Tag Filter
#1
Hi all,

I am running Moode 7.0.1 on a Raspberry Pi 3B and have encountered the following problem with the Auto-Shuffle feature in combination with a "folder" Tag Filter:
  • Auto-Shuffle does not work (stops at the end of the playlist) when shuffling is restricted to a certain folder with a tag filter, i.e. Tag Filter in the Audio Config set to:
    folder "nas/nas-station/music/some-folder"
I have already checked that:
  • Random Play (star symbol) works as expected, indicating that the tag filter itself is working fine.
  • Auto-Shuffle with other tag filters (e.g. genre "Rock") works as well.
So the problem seems to be specifically linked to the combination of Auto Shuffle with a "folder" Tag Filter.

Any ideas, how to solve this issue?

Thanks & Best regards
jenzd


By the way: Thank you for this awesome piece of software. It's fascinating that pretty much everything I dreamed of (and more) is working straight out of the box! :-)
Reply
#2
Hi all,

In the meantime I have solved the problem myself. As usual, the root cause was sitting in front of the screen:
  • The correct Tag Filter for restricting the folder/filename for Auto-Shuffle is called "filename" instead of "folder", so
    filename "nas/nas-station/music/some-folder" works as expected.
  • The reason Random Play was already working is, of course, because it has nothing to do with the Auto-Shuffle Tag Filter option, but uses the Advanced Search Filter from the Library instead (which I had set up in a similar way and where the folder filter is indeed called "Folder").
Everything is working now. Cool 

Best regards

Jens
Reply
#3
Good find regarding "filename". I'll update the (i) help cos that one is not obvious since MPD itself uses just "file".
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Since the contents of the Tag Filter field is internally passed to MPC, it is interestingly even possible to select more than one folder using regular expressions. E.g. the following Tag Filter works:

'(filename =~ "nas/nas-station/music/(some-folder|other-folder)")'

This shuffles all files in "nas/nas-station/music/some-folder" as well as "nas/nas-station/music/other-folder". Really cool. Big Grin

By the way: Is something similar also possible in the Advanced Search of the Library?
Reply
#5
Prolly.

The Library filters interact with MPD directly but we compile it with Perl Regular Expression support.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
Thanks for the hint, Tim!

Indeed it is possible, yet with a trick to circumvent the standard behaviour of the Advanced Search web interface.

The trouble with the current interface is that it puts each search string into a "contains" context. To enable regular expressions, however, it is necessary to use "=~" instead.

Fortunately the interface can be cheated:
  • When you enter <some-string> into the Folder field, it is internally translated into (file contains '<some-string>').
  • Since the contents of <some-string> is not restricted, it is possible to enter
    nas') AND (file =~ 'nas/nas-station/music/(some-folder|other-folder)
  • Which gets translated into
    (file contains 'nas') AND (file =~ 'nas/nas-station/music/(some-folder|other-folder)')
  • Bingo, it works!  Smile 
Not straightforward, though. Idea: Perhaps it is possible to enhance the Advanced Search page with a freeform field in some future version of Moode? This would enable direct access the underlying MPD functionality.

Thanks again & best regards

Jens
Reply


Forum Jump: