this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

autocreate playlists

+86 -26
+1
chill v2/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2fIt0rCLhnpkkq2QkgTfpU
+1
Alcazar – Gui Boratto/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5fWNo9qXKgNeNetxHkU6Hp
+1
Candidats challenge #1 n7beats/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5vASYzQPMTe9Ofn4jn9Eg3
+1
CharlesTheFirst/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5L722JgeRwtOATG854RmoV
+1
Clip émotion aah music/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3q4esRxR3l5cCV6KBzIQDx
+1
Discover Weekly (2)/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3RG11KYiejP4jK1h0ZrzIH
+1
Eflamm's albums/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2hpitlaBCirI1HgyeUem0g
+1
Everything/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/4r7RSPdZ2FWCI0WL4pUidS
+1
Into The Woods – Tycho/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6HS6TPjN1F3VY2G6iOkOxe
+1
Let the fucking void in/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/1OObK6HVxE24oWJlDOKAFB
+1
Liquid/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5poynocZ0HPpHe7rtqGgzS
+1
Ma Playlist pour plus tard 2023/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6SLFXcdq0Wd03OlxN9PrMg
+1
Ma playlist n° 59/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5qWrxXqt1l7rNMluPyNhyx
+1
Mes titres Shazam/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2byEXNoQ2kYfwgvTE4PK40
+1
Too Much/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6rSb6pGtTFLUo9mJyVc9rj
+37 -1
backup.py
··· 25 25 26 26 tokens = json.loads((here / "secrets.json").read_text()) 27 27 28 - get_all = False 29 28 30 29 # Initial setup 31 30 spotify = Spotify( ··· 100 99 run(["git", "add", target], capture_output=True) 101 100 102 101 102 + # Get playlists defined on Spotify by user 103 + playlists_resp = spotify.current_user_playlists() 104 + playlists = playlists_resp["items"] 105 + while playlists_resp["next"]: 106 + playlists_resp = spotify.next(playlists_resp) 107 + playlists.extend(playlists_resp["items"]) 108 + 109 + # Store IDs of playlists we have to autocreate 110 + autocreate_playlists = set( 111 + [ 112 + playlist["external_urls"]["spotify"] 113 + for playlist in playlists 114 + if playlist["owner"]["id"] == spotify.current_user()["id"] 115 + ] 116 + ) 117 + 118 + 103 119 # Get tracks from API 104 120 results = spotify.current_user_saved_tracks() 105 121 ··· 109 125 definition = yaml.safe_load(playlist_definition_file.read_text()) 110 126 if not definition.get("from", "").startswith("https://open.spotify.com/playlist/"): 111 127 continue 128 + 129 + autocreate_playlists.discard(definition["from"]) 112 130 113 131 results = spotify.playlist_tracks( 114 132 definition["from"], 115 133 limit=100, 116 134 ) 117 135 tracks = results["items"] 136 + get_all = not Path("tracklist.tsv").exists() 137 + get_all = True 118 138 while get_all and results["next"]: 119 139 results = spotify.next(results) 120 140 tracks.extend(results["items"]) ··· 123 143 {"items": tracks}, 124 144 playlist_definition_file.parent / "tracklist.tsv", 125 145 ) 146 + 147 + # Create playlists we have to create 148 + for spotifyurl in autocreate_playlists: 149 + name = next( 150 + playlist["name"] 151 + for playlist in playlists 152 + if playlist["external_urls"]["spotify"] == spotifyurl 153 + ) 154 + print(f"⋆𐙚₊˚⊹♡ Creating playlist [bold][magenta]{name}[reset] ⋆౨ৎ˚⟡˖ ࣪") 155 + try: 156 + Path(here, name).mkdir(exist_ok=True, parents=True) 157 + Path(here, name, "autofill.yaml").write_text(f"from: {spotifyurl}", encoding="utf8") 158 + run(["git", "add", str(Path(here, name))], capture_output=True) 159 + except Exception as e: 160 + print(f"\tCouldn't create playlist: {e}") 161 + 126 162 127 163 # Git add commti and push 128 164 print("⋆𐙚₊˚⊹♡ Beaming up to github ⋆౨ৎ˚⟡˖ ࣪")
+1
bankjasper/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2QNUV3u4geVKBTABuxblfw
+1
bimorphemic/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/27kRWnKtERxhOhfYgsjl4G
+1 -4
bngrs/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/3kbsvHP3P1UVzB2q5oR51r?si=f160afd562814ed6 2 - 3 - tracks: 4 - - [No Mana, Lost Call] 1 + from: https://open.spotify.com/playlist/3kbsvHP3P1UVzB2q5oR51r
+1 -4
calm/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/3MaQHYVOgRxqYCfvH9CG2l?si=fb615bc8c6434ee7 2 - 3 - artists: 4 - - ibi 1 + from: https://open.spotify.com/playlist/3MaQHYVOgRxqYCfvH9CG2l
+1
chillhappy/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6BFWDKvMnkzHmhpWgiSM0m
+1
cover then original/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3tqY4xriXDX7UP3Wh8ane0
+1
dbstp/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/0ou5JwOOZMSfjOBkyiIHxg
+1
dj-sets/chillnice/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/7zetQrdoOllqNjLJ1jX1WM
+1
dj-sets/chillslowburn/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/4JbMZqwv6JFib8Sk96vNtW
+1
dj-sets/hyperpop/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6mSLA4DAWbbaNwgz6bxu6X
+1
djset/com/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/66vBpyzeu0Ct5CTcUhHz71
+1
djsets/105317/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3afSBKVqyYX47U7Ckud6pr
+1
djsets/feur/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5aW36V03ooYwZPbFJBAOJ7
+1
djsets/jaspertyger&co/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5ULHcVPkBAgiU5lIu4mIt9
+1
djsets/mrbrill+ninajirachi/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6pBMB5NCyp0Ubp07jnWCi3
+1
djsets/nomana&co/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2VcHzbMSacqvZBhgs6AOCa
+1
djsets/nomanaxco/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/1yskjVzCHXwcek0pk3PcPB
+1
emtnal/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/5dNTm3jWtixJoDOb6mho5f
+1
euphria/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/587j6I61EhPPn9JITRi9uy
+1 -1
feelgd/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/0dc7PJZjBUDvBM2eIOJR7E?si=ed7c766bbb5246fe 1 + from: https://open.spotify.com/playlist/0dc7PJZjBUDvBM2eIOJR7E
+1
hackr/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3j3wKIgNR1MsVpeRPK6aFT
+1 -9
jazz/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/2aGyMkbRmZXA2C7S8jU2PF?si=1ebe1d4a1e2f47b1 2 - artists: 3 - - Tigran Hamasyan 4 - - GoGo Penguin 5 - - Yaron Herman 6 - - Yaron Herman Trio 7 - - jizue 8 - 9 - remixes: false 1 + from: https://open.spotify.com/playlist/2aGyMkbRmZXA2C7S8jU2PF
+1
mau5mix/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/0KyBcBWX7iQLc1stq2ayqS
+1
mrbillfavs/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/61TD9GYlrpzqVAPEmBnTxZ
+1 -1
orchstral/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/5Q8BXsgCrrwNT0Q1Ev0ZAu?si=5b89dd79c9ed4677 1 + from: https://open.spotify.com/playlist/5Q8BXsgCrrwNT0Q1Ev0ZAu
+1
party, kinda/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/7c4qg6DbkbySPLmrem9Ni3
+1
photau7/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3tHANauQ3bwrpzboPOIPUc
+1
rage/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/0pqKqENx4lKlFX6Ywpk3TQ
+1 -1
rap/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/0RBM27wKeFYmUAQYMgBYdN?si=64c0ce8f799f43e3 1 + from: https://open.spotify.com/playlist/0RBM27wKeFYmUAQYMgBYdN
+1
topianocover/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2aSC2XorBE23bWlUYhUFX3
+1
tuture/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/6eRb3Pe5gNruuIKmeaH9ly
+1
À pianoter/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/2iQ2frOavhJ51FtFqEE43i
+1
Русский/autofill.yaml
··· 1 + from: https://open.spotify.com/playlist/3gqfwmkEFaDqnMhVor7OLr
+1 -5
日本語/autofill.yaml
··· 1 - from: https://open.spotify.com/playlist/7MOlUnHE3vYKo6ryzadPlz?si=afafa2da14b84cc6 2 - name: 日本語 3 - 4 - titles: 5 - contain: {set: japanese characters} 1 + from: https://open.spotify.com/playlist/7MOlUnHE3vYKo6ryzadPlz