Commit f519bbe

xxwhirlpool  ·  2026-04-05 21:58:58 -0400 EDT
parent 062790b
more on plex_playlist.py
3 files changed,  +17, -4
+1, -0
......@@ -36,3 +36,4 @@ config/.local/bin/quote
3636 config/.local/bin/quoterandom
3737 config/.config/plexclip/config.toml
3838 config/.local/bin/discord_timest
39+scripts/Scripts/plex/playlists/*
+15, -0
......@@ -0,0 +1,15 @@
1+# plex server management
2+
3+tracking my plex library & stuff
4+
5+## plex_playlists.py
6+
7+- exports to ~/Scripts/plex/playlists
8+- each filename is the title of the playlist + `.txt`
9+- each track is formatted as "Artist - Song"
10+- only works for music playlists
11+- no track numbers; add them with `cat -n [FILENAME]`
12+
13+### usage
14+
15+`plex_playlist.py [TOKEN IN QUOTES]`
R config/.local/bin/plex_playlist.py => scripts/Scripts/plex/plex_playlist.py
+1, -4
......@@ -10,7 +10,6 @@
1010 # this is such script kiddie shit idk python
1111
1212 from plexapi.server import PlexServer
13-from plexapi.playlist import Playlist
1413 from os import sys
1514
1615 SERVER_URL = "http://192.168.1.219:32400"
......@@ -18,12 +17,10 @@ TOKEN = sys.argv[1]
1817
1918 plex = PlexServer(SERVER_URL, TOKEN)
2019
21-print("title, album, artist" + "\n")
22-
2320 for list in plex.playlists(playlistType="audio"):
2421 listTitle = list.title
2522 items = list.items()
26- pl_file = open(listTitle, "w")
23+ pl_file = open("playlists/" + listTitle + ".txt", "w")
2724 for i in items:
2825 title = i.title
2926 artist = i.originalTitle