<?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 Programmatically detect if Spotify is playing in Spotify for Developers</title>
    <link>https://community.spotify.com/t5/Spotify-for-Developers/Programmatically-detect-if-Spotify-is-playing/m-p/5457841#M7041</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;USA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, I'm a noob.&amp;nbsp; I would like to run a script on my Windows PC if Spotify (the service, not the Windows app, as the Windows app may not be running) is playing a song.&amp;nbsp; To put it into psuedo-code,&lt;BR /&gt;if SpotifyPlaying = True then ExecuteThisScript.bat&lt;BR /&gt;My script changes the output device of my PC to a ghetto whole-house speaker system I made.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Bonus points (but absolutely not required) if the script can tell WHICH device is playing Spotify.&lt;BR /&gt;&lt;BR /&gt;I found this guide,&amp;nbsp;&lt;A href="https://developer.spotify.com/console/get-users-currently-playing-track/" target="_blank" rel="noopener"&gt;https://developer.spotify.com/console/get-users-currently-playing-track/&lt;/A&gt;&amp;nbsp;, and I can use it to generate a token to use CURL to output to&amp;nbsp; a .txt file with my WSL installation.&amp;nbsp; The text file tells me if something is playing, but I don't know how to connect this to an automation.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance to anyone who can help me!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 04:44:09 GMT</pubDate>
    <dc:creator>dhess83</dc:creator>
    <dc:date>2022-11-15T04:44:09Z</dc:date>
    <item>
      <title>Programmatically detect if Spotify is playing</title>
      <link>https://community.spotify.com/t5/Spotify-for-Developers/Programmatically-detect-if-Spotify-is-playing/m-p/5457841#M7041</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Plan&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Premium&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;USA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Device&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Operating System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Question or Issue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So, I'm a noob.&amp;nbsp; I would like to run a script on my Windows PC if Spotify (the service, not the Windows app, as the Windows app may not be running) is playing a song.&amp;nbsp; To put it into psuedo-code,&lt;BR /&gt;if SpotifyPlaying = True then ExecuteThisScript.bat&lt;BR /&gt;My script changes the output device of my PC to a ghetto whole-house speaker system I made.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Bonus points (but absolutely not required) if the script can tell WHICH device is playing Spotify.&lt;BR /&gt;&lt;BR /&gt;I found this guide,&amp;nbsp;&lt;A href="https://developer.spotify.com/console/get-users-currently-playing-track/" target="_blank" rel="noopener"&gt;https://developer.spotify.com/console/get-users-currently-playing-track/&lt;/A&gt;&amp;nbsp;, and I can use it to generate a token to use CURL to output to&amp;nbsp; a .txt file with my WSL installation.&amp;nbsp; The text file tells me if something is playing, but I don't know how to connect this to an automation.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance to anyone who can help me!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 04:44:09 GMT</pubDate>
      <guid>https://community.spotify.com/t5/Spotify-for-Developers/Programmatically-detect-if-Spotify-is-playing/m-p/5457841#M7041</guid>
      <dc:creator>dhess83</dc:creator>
      <dc:date>2022-11-15T04:44:09Z</dc:date>
    </item>
  </channel>
</rss>

