ultrasonic / ultrasonic

Free and open-source music streaming Android client for Subsonic API compatible servers
https://ultrasonic.gitlab.io
GNU General Public License v3.0
312 stars 52 forks source link

Smart Playlist marked as played when synced #172

Closed Offerel closed 6 years ago

Offerel commented 6 years ago

Problem description

I would like to use most of the time the "Smart Playlist" Feature. The server is Ampache, where i build a Smart Playlist with the conditions set to: Play songs, that are never played or when played, then the timestamp should be older than 365 days. The Playlist works on the server and in the webplayer and shows only not played songs or songs that are not played until the last year. When i play a song from this list, the playcounter is raised +1 and the timestamp is set to the current time.

This Smart Playlist shows in Ultrasonic to and i can sync it. However, i want to have this songs all offline, since most time i want to here them with no connection to the internet. But when a song from this list is downloaded, either the Playcount is raised +1 or the played timestamp is set. Whatever goes on here, it results that all songs in the playlist are gone, only by downloading, not playing the song.

Steps to reproduce

Create a Smart Playlist on Ampache Server at least with the condition "Played / False". Sync this Playlist for offline use with Ultrasonic > Played is set now to true on the server for every song which is downloaded but not played yet.

System information

ogarcia commented 6 years ago

This is not a bug. Is the normal operation of app and server.

Take note that you have only one API endpoint to download your songs. This endpont is the same for download and for play. If the server count every call to this API as a play then every song that you donload count as played.

Offerel commented 6 years ago

Do you know, if this is a API Bug? I have no idea, if this is only a problem with the Ampache server, or also a bug in Subsonic or if it is by design of the API itself. If so, then i can track this issue in the repository of Ampache or Subsonic or the API.

Since i didn't have much experience with this, i dont know how this realy works.

ogarcia commented 6 years ago

Not is a bug in any case. Is a Subsonic API limitation. Since you not have any other method to get the music (respecting the downsample settings), if you set that every call to stream API is a play, then a donwload is a play too.