jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
418 stars 65 forks source link

Almost DOS like behavior when one has lots of "genres", doesn't respect config #267

Closed mfeif closed 4 years ago

mfeif commented 4 years ago

myMPD version: 6.4.0

Describe the bug

My files have lots of genre tags in them, (which I'm not happy about, but cleaning them is a separate job I guess) apparently, and when making Smart playlists, it took like an hour to make them. It seems like it's taking "title" and so on as a genre tag, too. Literally everything seems to be a playlist!

Anyway, the client never got past the "Fetch MPD settings" message. I edited /etc/mympd.conf to disable with smartpls = false and generateplstags = Artist but when I set debug logging and watch, it's still making/remaking genre playlists.

It seems that there are lots of settings that are ignored. Here's my relevant settings:

taglist = AlbumArtist, Album, Title, Track, Date
searchtaglist = Artist, AlbumArtist, Album, Title
browsetaglist = AlbumArtist, Album
smartpls = false
# only update 'smart' playlists once a day
smartplsinterval = 86400
generateplstags = Artist

And from the log, here's what it's sending the client on startup:

{"jsonrpc":"2.0","id":0,"method":"MYMPD_API_SETTINGS_SET","params":{"jukeboxMode":0,"jukeboxPlaylist":"Database","jukeboxQueueLength":1,"jukeboxLastPlayed":24,"jukeboxUniqueTag":"Title","autoPlay":false,"coverimage":true,"coverimageName":"folder, cover","bookletName":"booklet.pdf","love":false,"loveChannel":"","loveMessage":"love","taglist":"Artist, Album, AlbumArtist, Title, Track, Genre, Date","searchtaglist":"Artist, Album, AlbumArtist, Title, Genre","browsetaglist":"Artist, Album, AlbumArtist, Genre","stickers":true,"smartpls":true,"smartplsSort":"","smartplsPrefix":"myMPDsmart","smartplsInterval":14400,"generatePlsTags":"Genre","mpdHost":"/run/mpd/socket","mpdPass":"","mpdPort":6600,"lastPlayedCount":20,"maxElementsPerPage":100,"musicDirectory":"auto"}}

So I've never gotten past "Fetch MPD settings" in the client, and am assuming it is getting stuck making playlists. It's also ignoring my searchtaglist, taglist and so on. debug.log

So I tried to

To Reproduce

I haven't got past the startup screen, it's all console, and listed above.

Expected behavior

MyMPD respects setting in conf file.

Server plattform (please complete the following information):

Client plattform (please complete the following information):

Debug logs (please attach if it can be usefull)

debug.log

Configuration (please attach if it can be usefull)

mympd.conf.txt

Additional context

Add any other context about the problem here.

mfeif commented 4 years ago

A little more. I poked around, disabled the service and got manual. I tried mympd reset_state and then mympd /etc/mympd.conf dump_config.

It's attached here. It seems like most of my settings are getting ignored. What's weird is that I can connect on port 8002, as per my config, though the dumped config doesn't reflect that.

dump_config.conf.txt

mfeif commented 4 years ago

Ok, after letting it cook a while longer, The UI has come up.

Maybe the "reset_state" helped.

mfeif commented 4 years ago

Just want to say that now that it's running, it's super impressive. Thanks for your work, and for sharing it with all of us!

jcorporation commented 4 years ago

1) myMPD uses most settings from the config file only if there is no appropriated state file: https://github.com/jcorporation/myMPD/wiki/Configuration. reset_state deletes this files. At first startup of myMPD these files are recreated.

2) The dump_config dumps config defaults not your configuration.

3) Smart playlist generation is done within the main MPD connection. Thats why your web ui sticks with "fetching MPD settings". Generating the playlists in an extra thread with a own MPD connection could resolve this issue.

mfeif commented 4 years ago
  1. So it ignores /etc/mympd.conf even if it's been changed? That seems unexpected.

  2. Ok.

  3. I understand.

mfeif commented 4 years ago

Well, I'd say that this isn't a bug, then... I just have bad luck with the tags that taggers have inserted into my many files.

jcorporation commented 4 years ago
  1. So it ignores /etc/mympd.conf even if it's been changed? That seems unexpected.

Yes, Web UI settings have always precedence.