An application that automatically maintains multiple SRF Virus playlists on Spotify.
There are following playlists this application maintains:
Read more below.
This playlist consists of current trending songs that are played on the SRF Virus radio channel.
The application adds songs to the playlist that are played at least three times within a week. If a song is not played at least three times during the following week, it will be removed from the playlist.
This playlist consists of current top 100 most played songs on the SRF Virus radio channel.
The application increments the count of a song every time it's played. Then it sorts the songs by count and those in the top 100 that aren't in the playlist yet are added. Every song beyond the top 100 is removed, if it's in the playlist. Also, if a song is not played anymore within two weeks, it's removed as well.
This playlist consists of current songs that are played on the SRF Virus radio channel during the "Night Out" program. The "Night Out" songs are played on Saturday between 20:00 and 23:59 (CET).
The application adds songs to the playlist that are played at least once within three weeks. If a song is not played at least once during the next three weeks, it will be removed from the playlist.
The application is scheduled to run every 15min and uses the SRGSSR Audio API to retrieve played songs on the SRF Virus radio channel as well as the Spotify Web API to maintain the playlist itself.
The application follows these steps:
- Get songs from the SRGSSR Audio API
- Filter out songs received from the SRGSSR Audio API that are redundant from the last request
- Search filtered songs on Spotify to get URI (song identifier)
- Add songs if they meet the criteria for the respective playlist
- Remove songs that don't meet the criteria anymore
This application is not affiliated with SRG SSR or Spotify and is not an official application of one of these companies. The application was developed independently and uses publicly available data in accordance with its terms of use.