Comments (4)
+1
from python-plexapi.
Hellowlol -- This seems like two issues here. I filed bug #6 to track logging.
So what is your use case here? What ID are you searching by, and why do you need the result as a dict?
from python-plexapi.
i can see that my requests where written a bit hastily.
- Searching by id
- It would be nice to have as_dict or raw where everything from plex Api is dumped as a list of dicts.
I would like to swap out the custom code in https://github.com/Hellowlol/HTPC-Manager/blob/master2/modules/plex.py and use your package instead
from python-plexapi.
I believe the first item is covered by pull request #5. Not sure the second is worth adding as we'll always be chasing new keys and things added by Plex. This is is also already crudely available by using the dict method on Python objects.
In [2]: from plexapi.server import PlexServer
In [3]: plex = PlexServer()
In [4]: naa = plex.library.section('TV Shows').get('Naked and Afraid')
In [5]: naa.unwatched()[0]
Out[5]: <Episode:Lord.of.the.Rats>
In [6]: naa.unwatched()[0].__dict__
Out[6]:
{'addedAt': datetime.datetime(2015, 6, 1, 1, 5, 5),
'duration': 2553000,
'grandparentTitle': 'Naked and Afraid',
'index': '6',
'initpath': '/library/metadata/2703/allLeaves',
'key': '/library/metadata/17802',
'originallyAvailableAt': datetime.datetime(2015, 5, 31, 0, 0),
'parentIndex': '4',
'parentKey': '/library/metadata/14926',
'player': None,
'ratingKey': '17802',
'server': <PlexServer:localhost:32400>,
'summary': "A workaholic mom and a loner are challenged to survive three weeks in Thailand. Competing with monkeys and rats for food, it's a daily struggle not only to survive, but to understand each other. Will they be able to come together as a team?",
'thumb': '/library/metadata/17802/thumb/1433135136',
'title': 'Lord of the Rats',
'type': 'episode',
'updatedAt': datetime.datetime(2015, 6, 1, 1, 5, 36),
'user': None,
'viewCount': 0,
'viewOffset': 0,
'year': 2015}
from python-plexapi.
Related Issues (20)
- Code Improvement: Organize Project Structure
- Unable to connect to a Plex HTPC client HOT 3
- Add Type Hints to Improve Codebase Readability and Maintainability HOT 1
- Show and Season from the video module use wrong key to get subtitleLanguage attribute
- Add support for track genres in music libraries HOT 1
- feat: python class for available filters HOT 3
- Add support for Plex Profile Watch History and Ratings
- Library section lookup clobbered when multiple libraries have the same title
- editAlbum Missing ... HOT 1
- Unable to find Libraries after using PlexApi based python script. HOT 5
- locations is empty when casting to dict HOT 2
- Add 'merge' method for music albums
- Ability to Modify MovieHistory & EpisodeHistory details HOT 1
- Bad Request response when adding library with default language
- Issues creating `PlexClient` instances from `PlexServer` sessions in 4.15.8 HOT 1
- feat: Endpoint for computing sonic adventure
- Add View History Manually HOT 2
- Streams in MediaParts empty (reload() has no effect)
- `totalSize` of MediaContainer
- createPlaylist does not guard smart=True and non-empty items HOT 2
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 python-plexapi.