Last active
January 10, 2022 21:25
-
-
Save kissgyorgy/d1528eefb1ba7f68401fbdd2336a5510 to your computer and use it in GitHub Desktop.
List movies from Plex database
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sqlite3 | |
from urllib.parse import unquote, parse_qs | |
PLEX_DB = '/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db' | |
conn = sqlite3.connect(PLEX_DB) | |
res = conn.execute('SELECT hints FROM media_items WHERE library_section_id = 1;') | |
for row, in res: | |
qs = parse_qs(row) | |
name = qs['name'][0] | |
print(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment