CDrummond / lms-material

Material skin for LMS (Lyrion Music Server)
MIT License
322 stars 75 forks source link

Sleep timer duration options #36

Closed hctom closed 5 years ago

hctom commented 5 years ago

First of all: Thanks for the work on this great project. Finally a UI that is really usable on mobile devices! ;)

I would like to request two more sleep timer options:

Is this possible? Apparently only the sleep timer duration is send to the server, so it should be possible to calculate it for the current track/playlist.

I'd appreciate to see this feature in a future release.

Thanks in advance

CDrummond commented 5 years ago

Sorry, but sleep can only be specified in seconds. To support what you want would need the server updating. In order for Material to reliably do either of what you suggest, it would need to keep track of the sleep state, and update if a track is added/removed, etc. I could make it do an initial queue length check, and then set the sleep timer. But if the queue is altered, or play/pause activated, then things become out of sync. Leading to an awkward UI experience.

Would be better for the server to support this - then it would be available to all clients.

hctom commented 5 years ago

Yeah you are right, with the changing playlists and play/pause etc. But what I was thinking about is really only getting the duration from the currently playing track/playlist and sending that to the server, no matter if I pause or change the playlist.

E.g. the Squeezer Android app supports this feature for the current track.

Perhaps its only a wording problem and something like this is better:

I'd appreciate your feedback and perhaps this ticket reopened, but if you are still not planning to support this feature, just leave it as is - even though this would be too bad ;)

CDrummond commented 5 years ago

Ah - OK. I guess I can add that easily enough,

CDrummond commented 5 years ago

Implemented for next release.

hctom commented 5 years ago

Hey, thanks a lot! Looking forward to the next release ;)

hctom commented 5 years ago

I installed the new version today to check the new feature. Unfortunately there was a little misunderstanding between the initial idea and the implementation ;) I guess I confused you with the updated wordings.

What I actually would have like to achieve, is that you can listen to a track or playlist - and somewhere inbetween you select the corresponding new sleep timer option. Right now the actual duration of the track/playlist is used, but it should use the duration minus the time already elapsed playing the track/playlist.

As an example: You listen to an audiobook with a length of 45 minutes... after 20 minutes you decide to go to sleep and activate the sleep timer. With the current implementation, the Squeezebox would run 20 minutes to long, but with the new implementation it would be turned off with the end of the track/playlist.

I guess this is no big problem for a track, but after some thinking, I can imagine this could be tricky to get the correct rest duration value for playlists, doesn't it? Or is there a property which tells you the time elapsed playing the whole playlist?

Would you mind reopening the ticket and changing it to this behavior instead?

Thanks a lot in advance and sorry for the confusion! ;)

hctom commented 5 years ago

... and to propose better labels for the reworked options:

What do you think?

CDrummond commented 5 years ago

I did think of that before. The problem is I don't know how much of the queue has been played. There is no status message for this. Can't count duration of tracks, as they might not all be loaded in the queue view, and the queue might be set to shuffle. Perhaps I should just remove these two settings. As a sleep at end of track/queue is what is really wanted - and this should be implemented in the server.

CDrummond commented 5 years ago

I've now removed these options for 0.2.1 Sorry, but they really need server support.

CDrummond commented 5 years ago

Option for remaining track duration added for 0.2.1