genie-toolkit icon indicating copy to clipboard operation
genie-toolkit copied to clipboard

(Staging) "play" should resume playback in Spotify after pause

Open tonyespinoza1 opened this issue 2 years ago • 4 comments

This is a simple one.

play thriller

I played Thriller on Spotify. pause

I paused playback. play

Sorry, music is already paused.

====
# main/d536f7d0-7a9c-4220-a705-ad0c308efe06
#! timestamp: 2021-07-18T03:08:06.521Z
U: play thriller
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-source.playable() filter id =~ "thriller" => @org.thingpedia.media-player.play(playable=id);
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: (@org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter id =~ "thriller")[1] => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:7azo4rpSUh8nXgtonC6Pkq"^^org.thingpedia.media-source:playable("Thriller"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]];
#! timestamp: 2021-07-18T03:08:07.693Z
A: I played Thriller on Spotify.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! timestamp: 2021-07-18T03:08:18.795Z
U: pause
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-player.player_pause();
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: (@org.thingpedia.media-source(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter id =~ "thriller")[1] => @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=id)
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:track:7azo4rpSUh8nXgtonC6Pkq"^^org.thingpedia.media-source:playable("Thriller"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]];
C: @org.thingpedia.media-player(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).player_pause()
C: #[results=[]];
#! timestamp: 2021-07-18T03:08:19.192Z
A: I paused playback.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! timestamp: 2021-07-18T03:08:24.567Z
U: play
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.media-player.player_pause();
====

tonyespinoza1 avatar Jul 18 '21 03:07 tonyespinoza1

checking this one... the desired behavior between the sequence of "pause" followed by "play" would ideally maintain the playhead/timeline position. currently restarts the song.

tonyespinoza1 avatar Jul 31 '21 01:07 tonyespinoza1

"play" is currently treated the same as "play some music", which will pick some popular music to play and reset the queue. It is not the same as "resume playback", which will resume playback from whatever it was before.

If we want the exact word "play" to mean "resume", I think this issue will go together with #704 where we introduce generic "play" / "pause" / "next" / "previous" commands similar to "stop", independent of the normal training.

gcampax avatar Jul 31 '21 01:07 gcampax

simplest fix for now: it would help if Genie said that they "stopped" the music rather than "paused playback."

tonyespinoza1 avatar Jul 31 '21 02:07 tonyespinoza1

Workaround is now merged, it should be deployed in a couple hours.

gcampax avatar Jul 31 '21 03:07 gcampax