{"id":13433424,"url":"https://github.com/widget-/spotify-auto-playlist","last_synced_at":"2025-03-17T12:31:46.480Z","repository":{"id":89544591,"uuid":"463342628","full_name":"widget-/spotify-auto-playlist","owner":"widget-","description":"Automatically add any new songs from a list of artists to a given playlist.","archived":false,"fork":false,"pushed_at":"2023-03-31T22:25:04.000Z","size":38,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-28T16:12:14.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/widget-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-25T00:17:17.000Z","updated_at":"2024-10-02T20:17:49.000Z","dependencies_parsed_at":"2023-03-08T22:30:32.769Z","dependency_job_id":null,"html_url":"https://github.com/widget-/spotify-auto-playlist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widget-%2Fspotify-auto-playlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widget-%2Fspotify-auto-playlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widget-%2Fspotify-auto-playlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/widget-%2Fspotify-auto-playlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/widget-","download_url":"https://codeload.github.com/widget-/spotify-auto-playlist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244033826,"owners_count":20387010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:25.598Z","updated_at":"2025-03-17T12:31:46.178Z","avatar_url":"https://github.com/widget-.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Scripts for managing spotify playlists\n\nUtilities for managing spotify playlists.\n\n## Motivation\n\nIn the olden days, Spotify used to have a \"notification\" list of sorts for when any artists you follow release _any_ new\ntracks at all.\n\nSince then they've replaced it with \"Release Radar\", which is 40 new tracks by artists you follow or listen to a lot per\nweek. Anything not in those 40 tracks is effectively undiscoverable by you unless you unless you check all the artists\nmanually.\n\nUnlike Spotify's UX team, I like to actually keep up with a large multitude of artists across many genres. I tend to\npersonally sort them by genre in more playlists (I have over 100 personal playlists sorted in multiple folders).\n\nMy \"solution\" is to have one big giant playlist that I can automatically add new tracks to as they come out. From that\nplaylist, I sort the ones that were recently appended at the end while leaving any that were added in the playlist.\nTracks that don't fit the giant playlist still stay in the giant playlist so that they aren't re-added, but instead\nappropriate tracks are moved to different playlists that I will actually listen to.\n\nFor the time being, I only use this for managing Japanese hardcore music, which is otherwise incredibly difficult to\nkeep up with as someone who can't follow Japanese-language music sites very well.\n\n## Included scripts\n\n| Name                            | Description                                                                                                                           |\n| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| autoAddTracksToPlaylist.js      | Given a list of artists (by Spotify ID), add any releases within a specific date range to another playlist while avoiding duplicates. |\n| removeDuplicatesFromPlaylist.js | Remove suspiciously similar tracks that look like duplicates from a playlist, even if they're on different albums.                    |\n| getArtistIDsFromPlaylist.js     | Get the most common artists in a playlist and output them in a format that can be pasted into `config.js`.                            |\n\n## Usage\n\nFor now, everything is in `config.js`. Eventually I'll add command-line parameters, and make the config hold multiple\nplaylists with associated artists, but that's not done yet.\n\nTo begin with, you need to make\na [third-party Spotify developer account and an application](https://developer.spotify.com/dashboard/applications) that\ncan be used for all the API calls.\n\nFrom the application's page, go to the \"Users and Settings\" tab, and add an a user with the email of your regular\nSpotify account. On the same page, show the client secret and put both the Client ID and Client Secret in `config.js`\n\nAfter that, click \"Edit Settings\" next to the tabs and add `http://localhost:8081/auth` as a Redirect URI. If you want\nto change the port that the script listens on, change the port here as well.\n\nTo actually run the scripts, you'll need a recent-ish version of Node.js installed. I'd suggest the latest LTS version,\nalthough one version behind might still work, and anything newer will work fine as well.\n\nRun `npm install` in the folder you put the scripts into. It'll install a wrapper for the Spotify Web API and also the\nneeded files to run a web server that the scripts need to use to handle authentication. The web server only runs while\nwaiting for an authentication response, then closes.\n\nEdit `config.js` with the settings you want. Change the date range using any format that Javascript's `new Date()`\nconstructor can handle. Make sure your client ID and secret are correct.\n\nSet the playlist ID for the playlist that you want to dump all your songs into (you can get it by right-clicking a\nplaylist, then selecting Share \u003e Copy link to playlist.) Keep only the part after `/playlist/` and before the `?` if\nthat's there. For example, `https://open.spotify.com/playlist/2XMCpIaTaFpVBgSloyeIPG?si=2f3bde71896e49f8` turns into\njust `2XMCpIaTaFpVBgSloyeIPG`.\n\nThen, set your list of artist IDs to have automatically added. I'll add a separate script to generate these based off of\nexisting playlists soon, but you can get the IDs the same way you do with playlists share links.\n\nIf you get timeouts or HTTP 500 errors, you can increase how long the script waits between each action in\nthe `waitDurations` object. `waitDurations.addTracksToPlaylist` can safely be shortened to 1000ms but tracks may be\nadded out of order on Spotify's side. Personally I would rather wait longer and make sure albums are ordered together\ncorrectly but you may disagree. Deleting tracks has a very long delay because their servers appear to take longer to\nresolve those calls correctly, and often result in 500 errors.\n\n## License\n\nGNU GPL v2. See [LICENSE.md](LICENSE.md) for complete text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwidget-%2Fspotify-auto-playlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwidget-%2Fspotify-auto-playlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwidget-%2Fspotify-auto-playlist/lists"}