Giter Club home page Giter Club logo

Comments (4)

simonwjackson avatar simonwjackson commented on May 5, 2024

+1

from python-plexapi.

pkkid avatar pkkid commented on May 5, 2024

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.

Hellowlol avatar Hellowlol commented on May 5, 2024

i can see that my requests where written a bit hastily.

  1. Searching by id
  2. 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.

pkkid avatar pkkid commented on May 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.