Giter Site home page Giter Site logo

plex-rich-presence's Introduction

Warning

Status of the project This project in in maintenance only-mode. As I'm not a PLEX user anymore, I won't be working on new features for this project. However, I will still review and integrate contributions, feel free to send a PR if you want to develop a specific feature.

Plex Rich Presence

Plex Rich Presence is a multiplatform .NET 6 GUI App that allows you to display your current PLEX session in your Discord Rich presence status.

New features from version 2.0 :

  • Supports non-admin users
  • Supports choosing a server
  • CLI version
  • PLEX SSO Login

Release Version

Releases for windows and linux can be found here

Screenshots

screenshots

screenshots

screenshots

Build & Run form sources

Requires .NET 6+ SDK

cd src/PlexRichPresence.UI.Avalonia
dotnet run

Libraries used

  • AvaloniaUI
  • .NET MVVM Toolkit
  • Microsoft DI
  • Moq
  • PlexApi
  • Discord RPC .NET
  • FluentAssertions

Special Thanks

[@GrandKhan] for the logo

Thanks to Discord and PLEX Media Server

plex-rich-presence's People

Contributors

dependabot[bot] avatar favna avatar gabor7d2 avatar janniqz avatar mjedal avatar ombrelin avatar soitora avatar supersnellehenk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plex-rich-presence's Issues

Tidal Integration

Is it possible to pull Tidal info via Plex? These streams normally don't show in the Plex Account Dashboard.

Failed to find any plex servers

Was using the program in windows successfully. Today I re-launched it and after authentication I got the error "Obtain Plex Server", "failed to find any plex servers".
In the same general timespan I upgraded Plex to version 1.22.2.4282 and started using Tautulli. Not sure if one of those is related.

Mutliple PLEX servers

Authentication failed : org.simpleframework.xml.core.PersistenceException: Element 'Server' is already used with @org.simpleframework.xml.Element(name=Server, type=class fr.arsenelapostolet.plexrichpresence.model.Server, data=false, required=false) on field 'Server' private fr.arsenelapostolet.plexrichpresence.model.Server fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server at line 4

User-templated text for rich presence caption

Ability to change the long and short text in discord

eg. "▶MyArtist" could be changed to "Artist: MyArtist" by allowing the user to use custom text with variables "Artist: {@artist}"

Changing 01x04 to {@disk}x{@track} or something?

and perhaps being able to toggle between time done and time remaining?

Session not being detected

Hello,
I downloaded the release (.exe version) and after installing and running it opens a window. asking for a login. i guessed this is my plex login so i entered the info and after i got this:

Logging in as myemail... Authentication failed : org.simpleframework.xml.core.PersistenceException: Element 'Server' is already used with @org.simpleframework.xml.Element(name=Server, type=class fr.arsenelapostolet.plexrichpresence.model.Server, data=false, required=false) on field 'Server' private fr.arsenelapostolet.plexrichpresence.model.Server fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server at line 4

Multiple Streams from Single User

Currently if there are two streams going to multiple devices only one seems to be detected.

In my situation a Chromecast is playing media and the local computer that the .jar runs on also has the Plex for Windows app playing media. The Chromecast stream is what shows up in the Discord presence for some reason.

Option to choose specific device "machine_id" only.

Currently all the client devices playing media from a specific plex server and user is being detected.
In my case, i share my main plex account with friends and family for various reasons.
So whatever they play is being detected too.

Would love for an option to whitelist only specific devices to being detected.

400 Bad Request

When I try to log in to Plex I get a popup saying "Error getting sessions HTTP 400 Bad Request".

Linux x64

Hangs on "Stream Detected" after using the Plexamp app.

When accessing music on the server through the Plexamp app afterwards it takes Discords Rich Presence hostage thinking the stream is still going. It just keeps acquiring the stream. I appreciate you getting back to me when is most convenient for you and I look forward to helping out.

Support 2FA

Suport two factor authentication login. Currently it partially works by entering the 2FA code at the end of the password (As outlined here under "Old Third-Party Apps & Tools". However when the session/user info is requested it returns unauthorised.

Possibly support newer authentication method outlined here? Using this newer auth method requires a lot of code to be changed. I'm not too experienced with the way http requests are handled in this program so I cant really implement it my self (unless you can point me in the right direction).

Authentication error?

Application starts with an authentication error. I try to log in with Plex username(or email)/password, error repeats.

Authentication failed : org.simpleframework.xml.core.PersistenceException: Element 'Server' is already used with @org.simpleframework.xml.Element(name=Server, type=class fr.arsenelapostolet.plexrichpresence.model.Server, data=false, required=false) on field 'Server' private fr.arsenelapostolet.plexrichpresence.model.Server fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server at line 4

I'm on Windows 10, used the installer.

Invalid URL host: ""

Hello! I have two Plex servers and two users linked to one account on my home server.
After logging in, the error Initialization failed : Invalid URL host: "" appears, any ideas why?

image

[Enhancement] Attempt reconnects if Plex Server is restarting/down

I wanted to switch to this version of the rich presence from a python script I've been using, but the main issue I was trying to resolve is not working here either. Plex servers sometimes restart (to install updates for example), and that fatally kills these tools. Ideally, the application should keep attempt reconnecting when running, maybe to at least some sane degree to handle restarts. Some people may run Plex in docker, where the container spin-up can take some time as well, so the timeout should not be too agressive.

It seems this tool dies instantly when Plex is shut down.

Auto Login not working

Whenever I launch the application, I see
image

If I enable Auto Login before I log in, I still get this screen each time I relaunch and have to manually log in again.

Include the name of the played movie or series in the status

Would it be possible to show the played movie or tv-show directly in the status message?
Instead of "Playing Plex" it would be "is watching 'The Office'".
This way, people who are to lazy to click on the status (or don't know this is an option) will know what is being played.

Discord added the option so set a custom status some time ago but does the API allow applications to change it?

Partial Rich Presence Display

image
Not sure what is going on here, the logs show the correct track is being detected (music) but the rich presence only shows a time tracker...

~also, subsequent tracks are not being picked up by the app

BUILD FAILURE

every time I start this project this error comes out:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.076 s
[INFO] Finished at: 2021-01-24T18:14:49+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/danil/Dokumente/Programme/Other/PRP). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

Can someone help me pls. I dont use maven and I dont know how to fix that issue!

Initialization Error

image
image
Both errors pop up after logging in.
Happens with both exe and jar. W10

EDIT: log

INFO  - Obtaining Plex servers...
ERROR - Obtain plex server failed : org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=Server, data=false, inline=true, name=, type=class fr.arsenelapostolet.plexrichpresence.model.Server, required=true, empty=true) on field 'Server' private java.util.List fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server for class fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer at line 2
ERROR - Initialization failed : org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=Server, data=false, inline=true, name=, type=class fr.arsenelapostolet.plexrichpresence.model.Server, required=true, empty=true) on field 'Server' private java.util.List fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server for class fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer at line 2
INFO  - Logging in
ERROR - Initialization failed : org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=Server, data=false, inline=true, name=, type=class fr.arsenelapostolet.plexrichpresence.model.Server, required=true, empty=true) on field 'Server' private java.util.List fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server for class fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer at line 2
INFO  - Logging in
ERROR - Initialization failed : org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=Server, data=false, inline=true, name=, type=class fr.arsenelapostolet.plexrichpresence.model.Server, required=true, empty=true) on field 'Server' private java.util.List fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server for class fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer at line 2
INFO  - Logging in
ERROR - Initialization failed : org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(entry=Server, data=false, inline=true, name=, type=class fr.arsenelapostolet.plexrichpresence.model.Server, required=true, empty=true) on field 'Server' private java.util.List fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server for class fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer at line 2

Login fails when not setting server manually

I tried to login to plex but it failed with the following error messages:
Error Message Number 1
Error Message Number 2
When setting the servers address and port manually it works.

If needed I can send a log but I don't know how to access it.

Plex Server Version 1.23.1.4528
Plex Rich Presence Version 1.6

[HANDSHAKE] [WinError 2] The system cannot find the file specified

This issue has suddenly sprung up after updating Discord. Perhaps Discord updated how Rich Presence works?

Opening Discord IPC Pipe

[HANDSHAKE] [WinError 2] The system cannot find the file specified

Closing Discord IPC Pipe

After that, all it requests is for clients to check connection.

Attempt to reconnect after network connection lost.

  • When network connection is lost, it will show error and user will need to login again. Implement a way to make it reconnect and not show the error message. This is particularly useful when the application is minimised to tray.
  • Additional enhancment - clear logs after a specified amount of lines. This is so that the memory will not increase overtime.

Discord RPC not working but there are no errors

I don't have any errors to show as it gives me nothing, and everything seems to be setup correctly on my end. I've tried running both the jar file and the windows installer but neither seem to work.

no errors going on
javaw_4k0TlMr9HU

the program is in my authorized devices
brave_c308K8o7vL

im actually playing something
brave_oMpV5LtMGw

game activity is on
Discord_dVKjKd5z1T

but its not detecting it
Discord_L3mqfIFmLK

CLI Version

Hi, there are a cli version for plex-rich-presence ?
Because I would like to create a docker container to run the software h24.

Detect Shared Servers

Hello!

I use Plex with a Media Server shared by a friend, but it looks like the application can't detect it. (Searching for servers as owner only, I suppose)

Is there any way to detect them?

Otherwise, seems like you made a good job on this, well done!

No RPC shown even though it detects streams

Hello ! I've been trying to use the app (using windows installer) and the RPC isn't showing.

image

image
(can't scroll down nor resize the log popup btw, but I think this is gonna be fixed in the next pull request).

image

My RPC isn't shown at boot like #34.

Change Image dynamically

I don't now if the discord api have this possibility,

but it's would by very nice if the image is dynamically (ex if i watch a movie the logo rich on discord is the movie poster )

image

Failed to find any plex servers

So I installed this software this afternoon, and I keep getting the error message "Failed to find any plex servers". I have some attachments with the logs and the error message in question. Hope someone can help me with this because I have no idea.
javaw_2021-03-31_22-36-44
javaw_2021-03-31_22-36-55

Edit: Running an older JAR file based version seems to have fixed it.

Not showing media name

Running the latest version (Github releases says 1.7, but it installs 1.6). Discord just says playing Plex and a timer that doesn't seem to match up with what's playing.

Error on line 4

Each time that I log in it gives me an error on line 4

Authentication failed : org.simpleframework.xml.core.PersistenceException: Element 'Server' is already used with @org.simpleframework.xml.Element(name=Server, type=class fr.arsenelapostolet.plexrichpresence.model.Server, data=false, required=false) on field 'Server' private fr.arsenelapostolet.plexrichpresence.model.Server fr.arsenelapostolet.plexrichpresence.model.MediaContainerServer.Server at line 4

Not changing shows or movies

So when you do a fresh boot of the app ti works but after a few switching the app will lose track of where u were so it will just say you have 0 seconds on the item your watching or not even say your watching the correct thing

Don't show Discord status when idling

As the title suggest, this would be much nicer if the Discord status wasn't shown while idling

Otherwise, great work! I'm currently experimenting locally with some string changes to make it look nicer

Not detecting media server/plex activity

I am able to log in, but it seems that the program does not detect the media server I use. No activity shown in discord, no server connection confirmation in the logs.

https://i.imgur.com/dz7bUmp.png
This is while a show on plex is running in the background.

I am not the owner of the media server, could this be an issue?

Show Album Titles

Would it be possible to display album titles in addition to artist and track?
Would also be nice if there was a way to customize whats shown (ex remove the time remaining)

Anyway thanks and good work

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.