spotify library for scripting. Additional classes for playlist management and listening tracking
Go to file
2020-07-28 14:32:27 +01:00
spotframework sort by album artist not track artist 2020-07-28 14:32:27 +01:00
.gitignore added listener, changed env var names 2019-12-23 12:16:03 +00:00
alarm.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
backup.py trim backup script, check artists for uri during export 2020-07-01 10:42:39 +01:00
generate_playlists.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
getaccesstoken.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
listener.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
README.md update README 2020-02-22 18:28:23 +00:00
requirements.txt replace exception error logs with exception method, update model for csv export 2020-07-01 10:30:26 +01:00
sort_playlist.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00

spotframework

scripting framework for interacting with the spotify web api

  • alarm

unused at this point, obsolete since I've replaced the functionality with an iOS shortcut

daily script which finds this months playlist (eg. 'may 19') and starts playback on a specified device id. if the monthly playlist can't be found a fallback spotify uri is used.

the script is conditionally run after receiving a response from a ping sent to a phone's ip so the scipt is only run when i'm at home. as phones won't typically respond to pings unless the screen is on multiple pings are sent and the script is scheduled for the same time as my mobile alarm

  • backup

Script to pull all user created playlists and backup each to a separate csv file at the specified path. Ran on a cron job.

  • generate playlists

obsolete since the creation of Music Tools

My spotify playlists are quite granular for different sub genres, this script takes groups of playlists and genereates one "super-playlist". took inspiriation from my main use of Paul Lamere's smarter playlists.

By default playlists are reverse release date sorted, adding a shuffle tag to the config will do so.

Example config schema:

{
  "playlists": [
    {
      "name": "ELECTRONIC",
      "id": "{spotify playlist id}",
      "playlists": [
        "house",
        "garage",
        "jungle",
        ...
      ]
    },
    {
      "name": "METAL",
      "id": "{spotify playlist id}",
      "shuffle": true,
      "playlists": [
        "metal",
        "death metal",
        "black metal",
        ...
      ]
    },
    ...