Serranya / deadbeef-mpris2-plugin

A rewrite of the seemingly orphaned deadbeef-mpris-plugin originally written by HuangCongyu
GNU General Public License v2.0
65 stars 8 forks source link

Fix duration #20

Closed saivert closed 7 years ago

saivert commented 7 years ago

Since deadbeef->pl_get_item_duration() can return negative values (i.e for radio streams) we need to clip this to 0..inf

Serranya commented 7 years ago

Hmm I might have merged this one too fast. Seems like the right way to handle this is to remove the length field from the metadata.

If the length of the track is known, it should be provided in the metadata property with the "mpris:length" key.

https://specifications.freedesktop.org/mpris-spec/latest/Track_List_Interface.html#Mapping:Metadata_Map

Implemented in 35f1881c0c3d6c85271e2e2508263eea6539764e