Giter Club home page Giter Club logo

Comments (11)

blacktwin avatar blacktwin commented on May 5, 2024 1

PlexPy/Tautulli might be the better option for handling this but you can access the watched statuses of other users via PlexAPI.

plex = PlexServer(PLEX_URL, PLEX_TOKEN)
account = plex.myPlexAccount()
user_acct = account.user('USERNAME')
user_plex = PlexServer(PLEX_URL, user_acct.get_token(plex.machineIdentifier))

Because the user_plex is a server object you can do most of the same things you would be able to in the admin's server object (create, update, or delete playlists, mark watched or unwatched, etc.)

movies = user_plex.library.section('Movies')
for video in movies.search(unwatched=True):
    print(video.title)

from python-plexapi.

pkkid avatar pkkid commented on May 5, 2024

Hey philipsd6 -- Sorry I haven't looked at this yet; I have been meaning to. Just wanted to update you that it's still on my mind and hope to get back to plexapi work shortly.

Unless I'm mistaken, I don't think there is a way to see the watched status of another user without logging in as that user (Home or Shared). But I never looked deeply into it yet. I'll google a bit to see if other people found a solution to this.

from python-plexapi.

philipsd6 avatar philipsd6 commented on May 5, 2024

Maybe I've got this wrong, but I can't seem to log into my plex instance using another user account in my Home:

In [10]: account = MyPlexAccount.signin('[email protected]', 'joessekrit')
In [11]: account.resources()
Out[11]: [<MyPlexResource:myplexsvr>, <MyPlexResource:My FireTV>]
In [12]: myplexsvr = account.resource('myplexsvr')
In [13]: myplexsvr.connections
Out[13]: [<ResourceConnection:https://IP-ADDRESS.UUID.plex.direct:32400>]
In [14]: plex = myplexsvr.connect()
---------------------------------------------------------------------------
NotFound                                  Traceback (most recent call last)
<ipython-input-26-f888b543793a> in <module>()
----> 1 plex = myplexsvr.connect()

/usr/local/lib/python2.7/site-packages/plexapi/myplex.pyc in connect(self, ssl)
    155         results = list(filter(None, [r[2] for r in results if r]))
    156         if not results:
--> 157             raise NotFound('Unable to connect to resource: %s' % self.name)
    158         log.info('Connecting to server: %s?X-Plex-Token=%s', results[0].baseurl, results[0].token)
    159         return results[0]

NotFound: Unable to connect to resource: myplexsvr

If I use my primary account instead of the Home user account, the above code works fine.

from python-plexapi.

billbo99 avatar billbo99 commented on May 5, 2024

Any progress on this ? I would like to run some logic myself, archive shows that have been watch by both myself and wife. But as above I can't see anything obvious in the API to list episode statuses by User.

from python-plexapi.

Hellowlol avatar Hellowlol commented on May 5, 2024

@billbo99 Cant you use PlexServer().history()? btw you should look into plexpy for things like this.

from python-plexapi.

Technifocal avatar Technifocal commented on May 5, 2024

@Hellowlol Issue with PlexPy is it only detects history, not watch status, meaning if I watch a show via some other means and mark it as watched on Plex, PlexPy doesn't seem to be able to pick this up, unless I'm missing something.

from python-plexapi.

pkkid avatar pkkid commented on May 5, 2024

I think you need access to the backend database directly to see the watched status of other users. At least the Plex Web Client does not show you that information. If that's the case it would be something we are not setting out to support with this library.

from python-plexapi.

Hellowlol avatar Hellowlol commented on May 5, 2024

It cant pick it up if you have seen vis other means (VLC, kodi) but can use use plexapi for your self then plexpy for other users.

from python-plexapi.

Hellowlol avatar Hellowlol commented on May 5, 2024

It cant pick it up if you have seen vis other means (VLC, kodi) but can use use plexapi for your self then plexpy for other users.

from python-plexapi.

blacktwin avatar blacktwin commented on May 5, 2024

@philipsd6 Are we OK to close this with the solution provided above?

from python-plexapi.

philipsd6 avatar philipsd6 commented on May 5, 2024

Sure, noone else uses my Plex anymore anyway!

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.