Comments (1)
I'm not going to make a script for this because nobody but you is going to use this. However, I'll help you get the data that you want.
from requests import get
plex_ip = ''
plex_port = ''
plex_api_token = ''
# List of all sessions on the server
sessions = get(
f'http://{plex_ip}:{plex_port}/status/sessions',
headers={'Accept': 'application/json'},
params={'X-Plex-Token': plex_api_token}
).json()['MediaContainer']['Metadata']
# List of all music sessions on the server
music_sessions = list(filter(lambda s: s['type'] == 'track', sessions))
# In music_sessions, all keys can be found that you want:
## "grandparentTitle" -> Name of artist
## "parentTitle" -> Name of album
## "title" -> Name of track
## "thumb" -> track art (same as album art if track is part of album)
## "parentThumb" -> album art
from plex-scripts.
Related Issues (20)
- Season "2020" of daily show breaks plex_exporter_importer.py HOT 5
- plex_exporter_importer.py: Support for continue watching page HOT 1
- Cloning of a Plex Library
- Plex Media Server Version HOT 2
- KeyError: 'Metadata'
- Add timeframe to exporter importer HOT 1
- rolling_tv_channel 'on_deck' flag
- Intro skipper. Unknown client name: {name}
- Delete media based on tag or collection HOT 2
- Force Match
- alternate_ordering_playlist.py: AttributeError: 'NoneType' object has no attribute 'group'
- MKV Chapter to Marker HOT 1
- Keywords to Genre no longer functioning.
- Keywords to Label
- tag_to_collection.py
- user_exporter_importer.py: Support for ratings
- Typo in plex_sync.py script
- Music video playlist based on playlists already created in plex. HOT 2
- Offload Transcode Streams to Secondary Server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plex-scripts.