spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
981 stars 79 forks source link

/v1/me/player/play does not log the playlist context #522

Open bullcrane opened 7 years ago

bullcrane commented 7 years ago

Issue found on May 10, 2017.

Endpoint(s):

Scope(s):

Steps to reproduce:

  1. Use /v1/me/player/play to start playback of a track in a user's playlist
  2. Let two or three songs play

Expected behaviour:

Recently played should know the context of the plays - the playlist name.

Actual behaviour:

In the data returned by call to /v1/me/player/recently-played, these plays have null context. The plays do not know they were from a playlist.

richoakley commented 7 years ago

Having this same issue. Including a 'context_uri' in the request doesn't update that user's context.

hughrawlinson commented 7 years ago

Hey @bullcrane and @richoakley - thanks for submitting the issue. If you don't mind helping us debug, it'd be pretty useful if you could tell us which clients you're seeing this issue on, and whether or not it varies depending on the active client?

richoakley commented 7 years ago

Hey @hughrawlinson! My experience of it is as follows:

I've tried this when the active client is the Mac Desktop client, as well as when it's the iPhone client, and the result is the same.

bullcrane commented 7 years ago

My code is all from windows 10, running either Edge, Chrome, or Firefox. I issue the me/player/play and the me/player and me/player/recently-played commands all in that code. FWIW, after seeing richoakley's comment I have noticed that if if the play command actually initiates play on my Android phone I can see that the context of the play that would normally be showing at the top of the window is blank.

bullcrane commented 7 years ago

oops. I didn't know that button I clicked was going to close the issue. I thought it just meant close the window. reopening now.

richoakley commented 7 years ago

Hi @hughrawlinson. I was just wondering if this bug has been identified and is being worked on?

hughrawlinson commented 7 years ago

Hey @richoakley - can you paste me a context URI that you're seeing this issue for?

richoakley commented 7 years ago

Hi @hughrawlinson

It doesn't seem to make a difference. Here's one I just tried: spotify:user:spotify:playlist:37i9dQZF1DX0s5kDXi1oC5

PUT request to https://api.spotify.com/v1/me/player/play with the following body:

{
  "context_uri": "spotify:user:spotify:playlist:37i9dQZF1DX0s5kDXi1oC5",
  "offset": {
    "position": 0
  }
}

GET request to https://api.spotify.com/v1/me/player returns the following:

{
  "timestamp" : 1498721213703,
  "progress_ms" : 56576,
  "is_playing" : true,
  "item" : {
    "album" : {
      "album_type" : "album",
      "artists" : [ {
        "external_urls" : {
          "spotify" : "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
        },
        "href" : "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
        "id" : "6sFIWsNpZYqfjUpaCgueju",
        "name" : "Carly Rae Jepsen",
        "type" : "artist",
        "uri" : "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
      } ],
      "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IS", "IT", "JP", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "SE", "SG", "SK", "SV", "TR", "TW", "UY" ],
      "external_urls" : {
        "spotify" : "https://open.spotify.com/album/5ht7ItJgpBH7W6vJ5BqpPr"
      },
      "href" : "https://api.spotify.com/v1/albums/5ht7ItJgpBH7W6vJ5BqpPr",
      "id" : "5ht7ItJgpBH7W6vJ5BqpPr",
      "images" : [ {
        "height" : 640,
        "url" : "https://i.scdn.co/image/670f2f9af11a4d1b3c942eac27ea65fb3a3b1ac1",
        "width" : 640
      }, {
        "height" : 300,
        "url" : "https://i.scdn.co/image/61b0a2047c4cba15bc8e4043184c7d061e6b7902",
        "width" : 300
      }, {
        "height" : 64,
        "url" : "https://i.scdn.co/image/a01e76f0500ee1792308eccca64cdacf784ba5bd",
        "width" : 64
      } ],
      "name" : "EMOTION SIDE B",
      "type" : "album",
      "uri" : "spotify:album:5ht7ItJgpBH7W6vJ5BqpPr"
    },
    "artists" : [ {
      "external_urls" : {
        "spotify" : "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju"
      },
      "href" : "https://api.spotify.com/v1/artists/6sFIWsNpZYqfjUpaCgueju",
      "id" : "6sFIWsNpZYqfjUpaCgueju",
      "name" : "Carly Rae Jepsen",
      "type" : "artist",
      "uri" : "spotify:artist:6sFIWsNpZYqfjUpaCgueju"
    } ],
    "available_markets" : [ "AD", "AR", "AT", "AU", "BE", "BG", "BO", "BR", "CH", "CL", "CO", "CR", "CY", "CZ", "DE", "DK", "DO", "EC", "EE", "ES", "FI", "FR", "GB", "GR", "GT", "HK", "HN", "HU", "ID", "IE", "IS", "IT", "JP", "LI", "LT", "LU", "LV", "MC", "MT", "MY", "NI", "NL", "NO", "NZ", "PA", "PE", "PH", "PL", "PT", "PY", "SE", "SG", "SK", "SV", "TR", "TW", "UY" ],
    "disc_number" : 1,
    "duration_ms" : 215800,
    "explicit" : false,
    "external_ids" : {
      "isrc" : "USUM71600805"
    },
    "external_urls" : {
      "spotify" : "https://open.spotify.com/track/0BOevCYSi1sW2slj67GBdv"
    },
    "href" : "https://api.spotify.com/v1/tracks/0BOevCYSi1sW2slj67GBdv",
    "id" : "0BOevCYSi1sW2slj67GBdv",
    "name" : "First Time",
    "popularity" : 43,
    "preview_url" : "https://p.scdn.co/mp3-preview/551a3f4951efee1f7adbdb876016eede19ed2b29?cid=8897482848704f2a8f8d7c79726a70d4",
    "track_number" : 1,
    "type" : "track",
    "uri" : "spotify:track:0BOevCYSi1sW2slj67GBdv"
  },
  "context" : null,
  "device" : {
    "id" : "3e74c5e8b2e6b3a83e4296458c73f928b1a84738",
    "is_active" : true,
    "is_restricted" : false,
    "name" : "MacBook Pro",
    "type" : "Computer",
    "volume_percent" : 100
  },
  "repeat_state" : "off",
  "shuffle_state" : false
}

As you can see, "context" is null.

richoakley commented 7 years ago

Hi @hughrawlinson - just checking in again to see whether you require any further information from my side