dmix icon indicating copy to clipboard operation
dmix copied to clipboard

Added a favorites feature to remember and easily access favorite albums.

Open tobag90 opened this issue 9 years ago • 8 comments

Added a feature to remember an easily access favorite albums. Especially useful for people with huge libraries.

tobag90 avatar Feb 14 '16 19:02 tobag90

I'm for it. Does it auto clean if the user deleted the album?

abarisain avatar Feb 14 '16 19:02 abarisain

Good point, not yet. I will look into that.

tobag90 avatar Feb 14 '16 19:02 tobag90

It's possible that it's not an issue anyway, and thinking about it, the user might not want it to be cleared if he uses multiple servers.

I'llleave the rest to avuton. This feature would of course be better server side, but I don't know how it can be done, if it can Le 14 févr. 2016 20:51, "tobag90" [email protected] a écrit :

Good point, not yet. I will look into that.

— Reply to this email directly or view it on GitHub https://github.com/abarisain/dmix/pull/799#issuecomment-183964294.

abarisain avatar Feb 14 '16 19:02 abarisain

Hello!

First of all, thank you for the time you took to create this functionality.

With that said, I don't mind the goal of this patch, but right now I disagree with the implementation.

I believe this could and should be implemented using the Sticker subsystem.

Keeping in mind that the concept of an 'album' does not actually exist via the MPD protocol, it only really exists in our Album item abstraction, I might implement it something like this (via the protocol):

command_list_begin
sticker set song "first-song-from-album1.flac" albumfav {unixtime or precidence? Anything useful could go here}
sticker set song "second-song-from-album1.flac" albumfav {unixtime or precidence? Anything useful could go here}
...
command_list_end

There is also the

sticker find {TYPE} {URI} {NAME} = {VALUE}

command which is not yet implemented in the Sticker.java class, but I could whip up pretty swiftly, and will likely implement soon just for fun.

Then when it was time to query:

sticker find song / albumfav

There will likely be duplicated information sent and received, but it's a limitation of the protocol; The MPD protocol has many limitations, but efforts should be made to implement functionality server side when possible.

With all this said, not all parts of the Sticker.java class is not well tested. If you find the Sticker.java class to be buggy, feel free to shoot me a message via hangouts or an email and I'll get a fix in for it straight away.

avuton avatar Feb 16 '16 10:02 avuton

A slight error above, the Sticker.java class is not compatible with command lists. Not a huge problem, but, this functionality could be added in the future.

avuton avatar Feb 16 '16 10:02 avuton

Thanks for the review and insights about the API

Le 16 févr. 2016 à 11:28, Avuton Olrich [email protected] a écrit :

A slight error above, the Sticker.java class is not compatible with command lists. Not a huge problem, but, this functionality could be added in the future.

— Reply to this email directly or view it on GitHub.

abarisain avatar Feb 16 '16 11:02 abarisain

As long as the album/artist combination respects album artists I see no problem with that concept and it has far less overhead than the sticker method.

hurzl avatar Feb 17 '16 12:02 hurzl

Pull request #831 extends the favorites feature to use MPD stickers.

sludgefeast avatar Jan 08 '17 21:01 sludgefeast