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