-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plex Media Player support #115
Comments
Since this is low-priority, we might as well wait for Plex Media Player to replace Plex Home Theater. |
Is there something that can be added media.xml for a temp solution until it is fully implemented into the application? |
I've noticed that trackma (https://github.com/z411/trackma) is able to track anime watched through Plex. It seems to get the information through http://ip:port/status/sessions |
if it reads from |
Trackma asks for 'myPlex login' in setting, and in http://ip:port/status/sessions it has 'title="Username"', as I'm the only person that uses my Plex server currently, I can't confirm whether this is the client username or the server username, but I'd imagine it is the client username. If it isn't, I'm sure there is a way of reading which user is accessing a show, as under status in Plex it has "USERNAME started playing SERIES - EPISODE NAME on DEVICE" |
I have a working implementation with my detection library, but I haven't implemented it in my applications yet. This should give you a good idea of how it works. |
Sorry for bothering you, but I was wondering if there's been any progress, as this hasn't been mentioned in several months. Thank you for everything you do! |
^ I'd also like to throw in my support for this to be possible. I only watch my anime through Plex now (hosted on my Synology NAS but I have another computer in the network that's on 24/7) and the ability to update my watched anime automatically on MAL would be really handy! Fingers crossed this can be done. |
Any new info on this? @erengy |
While it's not nearly as good as Taiga support for Plex, I came across this, which adds shows and updates watch count from Plex to MAL and won't lower your watch count if Plex says you've seen less than MAL says. https://github.com/RickDB/PlexMALSync |
Any updates on this one? Would really appreciate PLEX detection built in Taiga. |
Support for Plex Media Player doesn't even have to really be baked in, just support for plex.tv |
Throwing in my support for this! |
Would also love this - I just discovered Taiga, and figured I'd give it a try, since, while PMP wasn't on the supported player list, mpv was, which AFAIK is what PMP uses for core playback/rendering (Emby Theater too, although it has other options as well - only recently moved to Plex). But I guess using mpv as a playback engine doesn't provide the same output necessary for detection as using the full player itself :-/ |
AFTER FURTHER DIGGING, I found a far cleaner form of all the necessary data (and more) on what is currently playing in PMP is available in XML form here: Where the X-Plex-Token is an authentication token that can be easily found using the instructions here. Here is an example of the XML data returned: <MediaContainer size="1">
<Video addedAt="1525740768" art="/library/metadata/59824/art/1526071754" chapterSource="media" contentRating="TV-14" duration="1420002" grandparentArt="/library/metadata/59824/art/1526071754" grandparentKey="/library/metadata/59824" grandparentRatingKey="59824" grandparentThumb="/library/metadata/59824/thumb/1526071754" grandparentTitle="Sword Art Online" guid="com.plexapp.agents.hama://anidb-8692/1/21?lang=en" index="21" key="/library/metadata/59846" lastViewedAt="1533929818" librarySectionID="1" librarySectionKey="/library/sections/1" librarySectionTitle="Anime" originallyAvailableAt="2012-11-25" parentIndex="1" parentKey="/library/metadata/59825" parentRatingKey="59825" parentThumb="/library/metadata/59825/thumb/1526071754" parentTitle="Season 1" rating="5.0" ratingKey="59846" sessionKey="64" skipParent="1" summary="Kirito and Leafa reach Arun, the capital of Alfheim, located directly beneath the world tree. However a sudden announcement of an emergency shutdown for server maintenance prompt the two to find a nearby inn and log out. The next day, Suguha accompanies Kirito to visit Asuna at the hospital. Meanwhile, in the World Tree, Asuna stumbles upon a room where experiments are being made with the brains of the other SAO players trapped in ALO. She then attempts to log out of the game by using the GM console inside the room, but is captured by two of Sugou's assistants. However, she manages to snatch a key card before being thrown back to her cell. Back in the real world, Suguha gets heartbroken upon seeing Kazuto tending to Asuna, and is comforted by Kirito after she logs back as Leafa on ALO, still unaware that both him and her brother are the same person. Later as the pair approach the World Tree, Yui suddenly detects Asuna's presence, prompting Kirito to fly ahead leaving Leafa behind. " thumb="/library/metadata/59846/thumb/1526071754" title="The Truth of Alfheim" titleSort="Truth of Alfheim" type="episode" updatedAt="1526071754" viewOffset="1120000" year="2012">
<Media aspectRatio="1.78" audioChannels="2" audioCodec="flac" bitrate="5544" container="mkv" duration="1420002" height="1080" id="71268" videoCodec="h264" videoFrameRate="24p" videoProfile="high 10" videoResolution="1080" width="1920" selected="1">
<Part container="mkv" duration="1420002" file="P:\Media\Anime\Sword Art Online [Coalgirls] [BD, 1080p]\Sword Art Online - 21v2 [Coalgirls] [BD, 1080p, FLAC] [A07A254A].mkv" id="71727" key="/library/parts/71727/1372602011/file.mkv" size="984018401" videoProfile="high 10" decision="directplay" selected="1">
<Stream bitDepth="10" bitrate="5544" chromaLocation="left" chromaSubsampling="4:2:0" codec="h264" default="1" displayTitle="[H264] (日本語)" frameRate="23.976" hasScalingMatrix="0" height="1080" id="198044" index="0" language="日本語" languageCode="jpn" level="51" profile="high 10" refFrames="15" scanType="progressive" streamType="1" title="[H264]" width="1920" location="direct"/>
<Stream audioChannelLayout="stereo" bitDepth="16" channels="2" codec="flac" default="1" displayTitle="[FLAC 2.0] (日本語)" id="198045" index="1" language="日本語" languageCode="jpn" samplingRate="48000" selected="1" streamType="2" title="[FLAC 2.0]" location="direct"/>
<Stream codec="ass" default="1" displayTitle="[ASS] (English)" id="198046" index="2" language="English" languageCode="eng" selected="1" streamType="3" title="[ASS]" decision="ignore"/>
</Part>
</Media>
<Director filter="director=16663" id="16663" tag="Kawakami Tetsuya"/>
<Director filter="director=16487" id="16487" tag="Itou Tomohiko"/>
<Director filter="director=16831" id="16831" tag="Adachi Shingo"/>
<Writer filter="writer=15816" id="15816" tag="Kawahara Reki"/>
<User id="1" thumb="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" title="purposelycryptic"/>
<Player address="127.0.0.1" device="Windows" machineIdentifier="XXXXXXXXXXXXXXXX" model="8.1" platform="Konvergo" platformVersion="XXXXXXXXXXXX" product="Plex Media Player" profile="Konvergo" remotePublicAddress="127.0.0.1" state="paused" title="XXXXXXXXXX" vendor="" version="XXXXXXX" local="0" userID="1"/>
<Session id="XXXXXXXXXXXXXXX" bandwidth="6979" location="lan"/>
</Video>
</MediaContainer> All of the individual elements can also be directly pulled using the Plex API (Which is unofficially documented here). But, looking over Taiga's (Or rather, Anisthesia's) code (And, admittedly, I haven't really touched C++ in over a decade), it looks like almost all of the data on media playing comes from either a function of the player process, the process' Window Title or, in the case of a webapp/streaming site, the browser Tab Title. My understanding is far from perfect, but as far as I can tell, it doesn't appear that any of the existing methods can be readily adapted to read/monitor the XML data this way or use the API. But I could very well be wrong, or, if not, maybe this information may still prove to be of some use regardless. I do hope Taiga will eventually work with Plex Media Player, as it is a great app, but at present I can only use it in conjunction with trackma handling the scrobbling. |
@erengy - Sorry to be a bother, but as this feature request has been around for quite some time, and the last response was in 2016, I was hoping you might be able to give an update on where things currently stand in regard to PMP support. I completely understand that you may have all sorts of other priorities, and am not trying to get you to change them, just any sort of information would really be great (Is it something you're working on? If yes, how is it coming, if no, do you think you will eventually? Is there a vague time-frame, i.e. "Next Week", or "Probably by 2087", or is it something just floating out there that will likely never get touched?). Thanks in advance for your time and consideration. |
Again, if you have the server claimed by signing up and logging into plex.tv, the currently playing status can be grabbed from there, so you only have to sign in to your plex account through taiga. As opposed to grabbing token, grabbing ip, making sure the IP is always correct (not everyone uses static local IPs!) |
To clarify, this request concerns Anisthesia rather than Taiga itself. Taiga cannot support Plex Media Player until Anisthesia is able to detect it.
This is indeed the case. Anisthesia doesn't have the capabilities to communicate over HTTP, parse JSON/XML documents, etc. C++'s standard library doesn't come with those, embedding them into the library is a bad idea, and I'd rather avoid introducing third-party dependencies... I'll likely end up doing the latter, but that's not possible for the time being.
I'm afraid this feature is low-priority at the moment. A vague time-frame would be "probably not this year". |
That's a shame, but thank you for communicating in detail regarding the support and why it can't be done at the moment. |
@erengy - Sad to hear it, I really like Taiga's setup. Thanks for letting us know though, it is appreciated - guess I'll check back on Taiga sometime next year. Edit: Whenever you do decide to look into it, this looks like a good place to start: Edit 2: Also, FYI, Plex also supports webhooks (either natively for Plex Pass holders, or through Tautulli); that might make for a simpler implementation than accessing the API directly. |
@erengy - So, I attempted to create a very basic kind of middleware that would put Plex's play data in a format and location Anisthesia could read, in the form of a self-hosted html page running a script that pulls the data on current Plex activity from the server and puts it in the page header as well as the page itself, but that is as far as I got (this was last October, then I shattered a finger and was forced to spend the rest of the year away from the keyboard). I haven't had much of a chance to mess with it since (and have been sick with Pneumonia for the last several weeks - no luck lately), but finally got around to at least putting it up on GH today. There's not much to it, if it weren't for the CSS and graphic files, it would literally just be a short HTML file, so if you feel like taking a look, maybe have a better idea for what the output format should be like, you can find it here. It isn't exactly pretty in its current state (I only had the logo complete before I had to stop), but it be pulling and displaying all the data needed, just not in the way it needs to be. I figured since Taiga can pick up on the Plex Web Interface Player's activity, putting the play activity of the server itself (regardless of whether it is playing to PMP locally, a Roku in the next room, or an Android TV box across the country) on a webpage would make it independent of any player changes, and open up Taiga to a lot of viewing platforms at once, rather than just the current Plex Media Player. The test screenshots in the readme, for example, are showing play activity from my Android TV box in my bedroom. |
Looks promising, I'll look into if I can improve the output format |
Trackma has Plex Media Server support. |
@jacobmix The detection code is not in the main app, but in a library/framework. (Plex detection are on Lines 348-472) (Plex Auth) |
Shame that this issue is ongoing for 4 years. Taiga looked really promising too. Guess I'm not going to be using this software since I exclusively watch anime through Plex app on Windows. I do not use the web application since I want hardware decoding. But AniList is user friendly enough, i'm fine keeping things updated myself. |
Maybe just add something like: https://github.com/Phineas05/discord-rich-presence-plex |
Are there any updates on this? |
any updates? |
updates for this would be nice ngl, plex desktop app sync would be nice |
Any updates on this? Surely we have a solution by now. |
Tbh I gave up and migrated to AniList recently. Seems like a much better alternative, plus the PlexAniSync docker does exactly what I wanted from this thread and automatically syncs my watched anime episodes to my profile. |
I have had a working Plex Theater support by using the HTTP API since it uses the same JSON RPC APIs as Kodi. All you need to do is send a post request with the following JSON input to http://localhost:3005/jsonrpc (assuming that Plex Theater runs on the same machine as Taiga)
which will output:
All you need to do is get the filename from the JSON output and parse the file name, which shouldn't be too difficult.
The text was updated successfully, but these errors were encountered: