Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findadd/searchadd not functioning, mppopmd reporting invalid utf-8 sequence #11

Open
khaytsus opened this issue Jan 23, 2024 · 0 comments

Comments

@khaytsus
Copy link

khaytsus commented Jan 23, 2024

I can't get findadd or searchadd to work and I'm seeing an error in the verbose logs when I try to do so. Installed on Fedora 38 using cargo install mpdpopm

Server is running

mppopmd -c /home/wally/.config/mppopmd/config -d -F

Config file (to match my sticker database tags that are already populated)

((log . "/home/wally/.config/mppopmd/mppopmd.log")
 (host . "192.168.0.7")
 (port . 6600)
 (local_music_dir . "/var/lib/mpd/music")
 (playcount_sticker . "playCount")
 (lastplayed_sticker . "lastPlayed")
 (played_thresh . 0.6)
 (poll_interval_ms . 5000)
 (commands_chan . "unwoundstack.com:commands")
 (rating_sticker . "rating"))

get-rating seems to work fine

mppopm -v -c /home/wally/.config/mppopmd/config  get-rating 
Connected 0.23.5.
Sent message `sticker get song "Rock/Evanescence/Fallen/11 Evanescence - Fallen - 11 - Whisper.mp3" rating'; got `sticker: rating=6
OK
'
6

But findadd does not (rating value does not matter here, 1, 5, 6, etc, should have really used >5 in this example to match above, just FYI)

mppopm -v -c /home/wally/.config/mppopmd/config findadd "(rating > 6)"

Connected 0.23.5.
findadd: got ``(rating > 6)'', quoted to ``"(rating > 6)"''.
Sent `sendmessage unwoundstack.com:commands "findadd \"(rating > 6)\""'; got `OK
'.

On server side:

[2024-01-23T18:35:07.626923641-05:00][mpdpopm::clients] Sent idle message; got `changed: message
OK
'.
[2024-01-23T18:35:07.626948750-05:00][mpdpopm] subsystem Message changed
[2024-01-23T18:35:07.627076738-05:00][mpdpopm::clients] Sent readmessages; got `channel: unwoundstack.com:commands
message: findadd "(rating > 6)"
OK
'.
[2024-01-23T18:35:07.627102091-05:00][mpdpopm::messages] findadd arguments: [
    "(rating > 6)",
]
matched token: ``6''.
matched binary condition: ``(rating, GreaterThan, Uint(
    6,
))''
matched parenthesized term: ``(BinaryCondition(
    Rating,
    GreaterThan,
    Uint(
        6,
    ),
))''
[2024-01-23T18:35:07.630708751-05:00][mpdpopm::messages] ast: Simple(
    BinaryCondition(
        Rating,
        GreaterThan,
        Uint(
            6,
        ),
    ),
)
[2024-01-23T18:35:07.656523072-05:00][mpdpopm] Error while processing messages: Filter error: Client error: Encoding error: invalid utf-8 sequence of 1 bytes from index 103274
[2024-01-23T18:35:07.656568127-05:00][mpdpopm] selecting...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant