stanford-oval / thingpedia-common-devices

Thingpedia interface code for commonly used devices
Other
38 stars 28 forks source link

(Staging) "Unexpected error with your command" and unexpected behavior of "favorites" keyword in Spotify #381

Closed tonyespinoza1 closed 3 years ago

tonyespinoza1 commented 3 years ago

2 issues here.

1) Genie responded to "play my favorites" by playing a J-Pop band called "MY FAVORITES" so 2 bugs here.

Desired behavior: Play songs I've "liked" from Spotify via the auto-generated playlist called "Liked Songs".

"play my liked songs" or "play liked songs"should work the same way as "play my favorites" or "play favorites"

2) see error below

Hello! How can I help you? play music

What song do you want to play? play my favorites

I played MY FAVORITES on Spotify. play madonna

Sorry, there was an unexpected error with your command. Please try again later or report this issue to my developers.

====
# web-b1d96c59
#! timestamp: 2021-07-18T00:19:44.301Z
U: play music
UT: @com.spotify.play();
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play();
#! timestamp: 2021-07-18T00:19:45.184Z
A: What song do you want to play?
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_slot_fill(playable);
AT: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play();
#! timestamp: 2021-07-18T00:19:57.455Z
U: play my favorites
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable=null^^com.spotify:playable("my favorites"));
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"))
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]];
#! timestamp: 2021-07-18T00:19:59.233Z
A: I played MY FAVORITES on Spotify.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_success;
#! vote: down
#! timestamp: 2021-07-18T00:20:33.318Z
U: play madonna
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, null^^com.spotify:artist("madonna")) => @com.spotify.play(playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"));
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"))
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]];
C: @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).playable() filter contains(artists, "spotify:artist:6tbjWDEIzxoDsBA1FuhfPW"^^com.spotify:artist("Madonna")) => @com.spotify(id="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza")).play(playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"))
C: #[results=[
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") },
C:   { value="2faa93e1b2b45b85b02b90b497d311c37e7659e7", display="Soundworks’s Mac Pro", playable="spotify:album:6SMTJ4NcKqFmvJgfrQQ0iH"^^com.spotify:playable("MY FAVORITES"), __device="com.spotify-126743886"^^tt:device_id("Spotify Account of Tony Espinoza") }
C: ]]
C: #[count=35]
C: #[error="too many ids requested"];
#! timestamp: 2021-07-18T00:20:34.186Z
A: Sorry, there was an unexpected error with your command. Please try again later or report this issue to my developers.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_action_error;
gcampax commented 3 years ago

This is a missing feature: we don't have yet support for playing from the library (liked songs). See also https://github.com/stanford-oval/thingpedia-common-devices/issues/183

Moving this to thingpedia-common-devices

jmhw0123 commented 3 years ago

There is already a get_user_top_tracks interface that also gets users' favorite songs or top tracks. We might need to define a clear scope for that so it won't cause confusion with playing from users' libraries/favorites.

gcampax commented 3 years ago

@tonyespinoza1 do you have any opinion here? Currently, get_user_top_tracks returns the tracks most played by the user (auto curated list from Spotify). Those are arguably the "favorites", but they are not under the user's control. I think we have the following options:

tonyespinoza1 commented 3 years ago

@gcampax

"play (my) favorites" or "play (my) liked songs" should play the Liked Songs list.

i do not see "top tracks" as an easily accessible aspect of the current UI so will not prioritize mapping commands to it at this time.

@jmhw0123

let me know if you need more clarification on the desired experience. i do think easy access to the Liked Songs playlist is valuable.

tonyespinoza1 commented 3 years ago

@jmhw0123 not sure if there's a problem on my end, but not seeing this work here:

image

jmhw0123 commented 3 years ago

I think we need to add annotated data for the model to learn.

tonyespinoza1 commented 3 years ago

it's possible we don't have your code in our build on staging right now as well... @nrser is trying to work it out now. @kevintangzero: could you work with @jmhw0123 and figure out if we need to add annotations?