Comments (11)
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.
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.
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.
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.
@billbo99 Cant you use PlexServer().history()? btw you should look into plexpy for things like this.
from python-plexapi.
@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.
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.
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.
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.
@philipsd6 Are we OK to close this with the solution provided above?
from python-plexapi.
Sure, noone else uses my Plex anymore anyway!
from python-plexapi.
Related Issues (20)
- 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
- "Invalid library sectionID: None" after PlexPartialObject.reload() HOT 5
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.