<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic API returns queue that loops around even when repeat is disabled in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/API-returns-queue-that-loops-around-even-when-repeat-is-disabled/m-p/5533728#M8636</link>
    <description>&lt;P&gt;When playing an album, requesting the queue through the API returns more songs than will actually be played.&amp;nbsp; For example, if you play an album with tracks One, Two, Three, Four, the API will return "Two, Three, Four, One, Two, Three, Four, ..." (not infinitely; it seems to return about 15-20 results).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code I used to test this:&lt;/P&gt;&lt;PRE&gt;import spotipy&lt;BR /&gt;from spotipy.oauth2 import SpotifyOAuth&lt;BR /&gt;&lt;BR /&gt;sp = spotipy.Spotify(auth_manager=SpotifyOAuth())&lt;BR /&gt;queue = sp.queue()['queue']&lt;BR /&gt;for i, track in enumerate(queue):&lt;BR /&gt;    print(i, track['name'])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I doubt this is a spotipy bug; I originally encountered this using spotify-player, which uses rspotify.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Playback works fine, the tracks aren't actually looped, they only show up this way in the queue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any recommended workaround for this, i.e. some way to know how many tracks will actually be played?&amp;nbsp; Or could this perhaps be corrected?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Apr 2023 11:24:14 GMT</pubDate>
    <dc:creator>jesyspa</dc:creator>
    <dc:date>2023-04-04T11:24:14Z</dc:date>
    <item>
      <title>API returns queue that loops around even when repeat is disabled</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/API-returns-queue-that-loops-around-even-when-repeat-is-disabled/m-p/5533728#M8636</link>
      <description>&lt;P&gt;When playing an album, requesting the queue through the API returns more songs than will actually be played.&amp;nbsp; For example, if you play an album with tracks One, Two, Three, Four, the API will return "Two, Three, Four, One, Two, Three, Four, ..." (not infinitely; it seems to return about 15-20 results).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code I used to test this:&lt;/P&gt;&lt;PRE&gt;import spotipy&lt;BR /&gt;from spotipy.oauth2 import SpotifyOAuth&lt;BR /&gt;&lt;BR /&gt;sp = spotipy.Spotify(auth_manager=SpotifyOAuth())&lt;BR /&gt;queue = sp.queue()['queue']&lt;BR /&gt;for i, track in enumerate(queue):&lt;BR /&gt;    print(i, track['name'])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I doubt this is a spotipy bug; I originally encountered this using spotify-player, which uses rspotify.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Playback works fine, the tracks aren't actually looped, they only show up this way in the queue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any recommended workaround for this, i.e. some way to know how many tracks will actually be played?&amp;nbsp; Or could this perhaps be corrected?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 11:24:14 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/API-returns-queue-that-loops-around-even-when-repeat-is-disabled/m-p/5533728#M8636</guid>
      <dc:creator>jesyspa</dc:creator>
      <dc:date>2023-04-04T11:24:14Z</dc:date>
    </item>
  </channel>
</rss>

