Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    Spotty - 'stalled' stream

    > Spotty never checks if a song is playable. In this case the song is not
    > playable due to market restrictions.


    It usually does, but it indeed does not in this particular case.

    > $params->{fields} = 'next,items(track(uri*,restrictions*))' if


    Hmm... I never see any restrictions. Would you have an example playlist
    which would return this for you? I've also looked into "is_playable".
    Would that give you the same expected result?

  2. #12
    Junior Member
    Join Date
    Nov 2010
    Posts
    10
    > Would you have an example playlist
    The playlist 5oPKSs2zPrrzQTIp2lliIP shows several tracks with a restriction on market NL.

    > I've also looked into "is_playable". Would that give you the same expected result?
    That was the first I tried. I checked this in the web console of Spotify.

    The result was promising:
    {
    "items": [
    {
    "track": {
    "is_playable": true,
    "uri": "spotify:track:6lFmtdoWhYyD5A8uPRUEZE"
    }
    },
    {
    "track": {
    "is_playable": false,
    "uri": "spotify:track:63rTTYYRQUMK2JZIJ6pwXz"
    }
    },
    {
    "track": {
    "is_playable": true,
    "uri": "spotify:track:2tcOzta2GXqSOu1uK8Cvfp"
    }
    }
    ],
    "next": "https://api.spotify.com/v1/playlists/5oPKSs2zPrrzQTIp2lliIP/tracks?offset=81&limit=3&fields=next,items(track(u ri,is_playable))&market=NL"
    }

    However, after changing this in Sync.pm I got
    {
    track => { is_playable => 'fix', uri => "spotify:track:6lFmtdoWhYyD5A8uPRUEZE" },
    },
    {
    track => { is_playable => 'fix', uri => "spotify:track:63rTTYYRQUMK2JZIJ6pwXz" },
    },
    {
    track => { is_playable => 'fix', uri => "spotify:track:2tcOzta2GXqSOu1uK8Cvfp" },
    },

    Notice that for all tracks is_playable is fix. So this was a no go. When using restrictions you get

    {
    "items": [
    {
    "track": {
    "uri": "spotify:track:6lFmtdoWhYyD5A8uPRUEZE"
    }
    },
    {
    "track": {
    "restrictions": {
    "reason": "market"
    },
    "uri": "spotify:track:63rTTYYRQUMK2JZIJ6pwXz"
    }
    },
    {
    "track": {
    "uri": "spotify:track:2tcOzta2GXqSOu1uK8Cvfp"
    }
    },

    After changing this in Sync.pm the result was

    { track => { uri => "spotify:track:6lFmtdoWhYyD5A8uPRUEZE" } },
    {
    track => {
    restrictions => { reason => "market" },
    uri => "spotify:track:63rTTYYRQUMK2JZIJ6pwXz",
    },
    },
    { track => { uri => "spotify:track:2tcOzta2GXqSOu1uK8Cvfp" } },


    This will do for filtering all non playable tracks.
    Last edited by jepege; 2021-04-08 at 00:16.

  3. #13
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    Spotty - 'stalled' stream

    > The playlist 5oPKSs2zPrrzQTIp2lliIP shows several tracks with a
    > restriction on market NL.


    Thanks, that's very helpful!

    > However, after changing this in Sync.pm I got
    > {
    > track => { is_playable => 'fix', uri =>
    > "spotify:track:6lFmtdoWhYyD5A8uPRUEZE" },
    > },
    > {
    > track => { is_playable => 'fix', uri =>
    > "spotify:track:63rTTYYRQUMK2JZIJ6pwXz" },
    > },
    >
    > Notice that for both tracks is_playable is fix. So this was a no go.


    That "fix" isn't the actual value, but only a hint to tell you to look
    at the bottom, where it would explain what "fix" was pointing to what
    actual value. It's a feature of Data:ump. In the case of a boolean
    these references don't make much sense. But if the value was another
    data structure, this can save a lot of noise.

    What I like about the restriction vs. is_playable is that the former
    would only be given for items where there are restrictions. is_playable
    OTOH is returned for each value, adding much more data to be downloaded
    and processed (I have playlists with thousands of tracks, where this can
    make a difference). Thanks for the pointer! I'll give that a try.

    --

  4. #14
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,530

    Spotty - 'stalled' stream

    > This will do for filtering all non playable tracks.

    v4.4.9 with this change is on its way. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •