Polochon-street / blissify-rs

bliss bindings for MPD.
29 stars 6 forks source link

Feature request: dry-run mode #60

Closed jcorporation closed 3 months ago

jcorporation commented 3 months ago

After my MPD database is now indexed by blissify, I want to integrate it in the myMPD jukebox function.

It will be cool if blissify provides a dry run mode.

I can use the dry-run mode to fill the myMPD jukebox queue with songs blissify selects and it should be useful for others too.

Polochon-street commented 3 months ago

Hi,

Just to make sure I understand correctly - that would be something like:

$ blissify playlist --dry-run --song path/to/song
/path/to/first/song
/path/to/second/song

etc?

You would directly parse the output of that command?

jcorporation commented 3 months ago

Correct. I want to specify the path for the reference song and blissify should output the song that would be added to the queue.

I will parse the output and it to a internal queue of myMPD.

Polochon-street commented 3 months ago

I gave it a go here https://github.com/Polochon-street/blissify-rs/pull/62, tell me what you think before I merge :)

I'm still unsure whether the path should be relative to MPD_BASE_PATH or not, or whether I should even have a flag for that...

jcorporation commented 3 months ago

Great! I will test it soon. ~I would prefer a relative path for the output.~

jcorporation commented 3 months ago

I tested it and it works as expected. As the --from-song expects the full path the output should be also with the full path to be consistent.

Thanks for the super fast implementation of this nice feature.

For reference the integration script for myMPD: https://github.com/jcorporation/mympd-scripts/blob/main/Jukebox/JukeboxBlissify.lua

Polochon-street commented 3 months ago

Nice that it works. It should accept paths both from the full path but also from the MPD :)

Hope it'll work as expected for myMPD!

Polochon-street commented 3 months ago

hi @jcorporation, I've finally merged https://github.com/Polochon-street/blissify-rs/pull/62 after making some slight modifications to it (I put most of it in the README), tell me if it still works for you - if it does, I'll release a new version :)

jcorporation commented 3 months ago

It works as expected, thanks for implementing this feature.