Code Monkey home page Code Monkey logo

plexamprpc's Introduction

PlexampRPC

PlexampRPC displays currently playing Plex music as Discord Rich Presence, while using the proper Album Art.
Despite using the name Plexamp, it works regardless of the client used.

Features

  • Proper Album Art for your Music
  • Uses Track Artist instead of Album Artist if available
  • Start PlexampRPC on Windows startup
  • Customize Template
  • Minimize to tray
  • Self contained single .exe

Options & Template

Click the gear icon on the top right to open the Settings window. Here you can change different options, change the template, and easily see the current version of PlexampRPC.

image

The config file, aswell as the thumbnail cache and the stored auth token, are stored in %AppData%\PlexampRPC\. Press F12 in the app to automatically open this folder.

FAQ

Q: How do I change the Bold "Plexamp" text?

A: You must make a new application here and set the Name you desire. Then open the config.json file in %AppData%\PlexampRPC\ and paste the Application ID in.

Q: How do I see a debug log?

A: Press F5, you can also press Ctrl+C to copy the log into the clipboard.

Q: I can't run this

A: This requires .NET 7 Desktop Runtime and is Windows Only.

Donate

Donate-Kofi

plexamprpc's People

Contributors

alyssadev avatar dyvinia 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

Watchers

 avatar  avatar  avatar  avatar

Forkers

alyssadev

plexamprpc's Issues

Nothing showing in Discord

Plex connected just fine, log starts fine

[14:50:14] Connected to roxaloxa's Discord Client
[14:50:14] StatusCode: OK. Request Uri: https://plex.tv/api/v2/user.json/
[14:50:15] StatusCode: OK. Request Uri: https://plex.tv/pms/servers.xml/

then shows this on every interval:

[14:50:17] WARN: Unable to get current session: No connection could be made because the target machine actively refused it. (157.211.239.241:28665) System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)

Latest Discord, Windows 10, latest PlexampRPC release.

Connection Issue

I am getting the following error when trying to use...

`A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (203.86.204.220:20388)

System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)

at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Plex.ServerApi.Api.PlexRequestsHttpClient.SendAsync(HttpRequestMessage request)
at Plex.ServerApi.Api.ApiService.InvokeApiAsync[T](ApiRequest request)
at Plex.ServerApi.Clients.PlexServerClient.FetchWithWrapper[T](String baseUrl, String endpoint, String authToken, HttpMethod method, Dictionary2 queryParams) at Plex.ServerApi.Clients.PlexServerClient.GetSessionsAsync(String authToken, String plexServerHost) at PlexampRPC.MainWindow.GetCurrentSession() in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 104 at PlexampRPC.MainWindow.StartPolling() in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 87 at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Unauthorized Session

[03:03:15] WARN: Unable to get current session: Response status code does not indicate success: 401 (Unauthorized).
[03:03:15] Connected to Redstoneguy129's Discord Client
[03:03:20] WARN: Unable to get current session: Response status code does not indicate success: 401 (Unauthorized).
[03:03:25] WARN: Unable to get current session: Response status code does not indicate success: 401 (Unauthorized).
[03:03:30] WARN: Unable to get current session: Response status code does not indicate success: 401 (Unauthorized).

Access to the path '*\AppData\Roaming\PlexampRPC\auth' is denied.

*When running the .exe it doesn't create the \AppData\Roaming\PlexampRPC\auth directory, so I manually created the directory and received this error:

Access to the path '*\AppData\Roaming\PlexampRPC\auth' is denied.


at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)

at [Microsoft.Win32.SafeHandles.SafeFileHandle.Open](https://microsoft.win32.safehandles.safefilehandle.open/)(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable\1 unixCreateMode)`

at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)

at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)

at PlexampRPC.App.PlexSignIn(Boolean resignIn) in D:\Development\repos\PlexampRPC\App.xaml.cs:line 93

at PlexampRPC.App.OnStartup(StartupEventArgs e) in D:\Development\repos\PlexampRPC\App.xaml.cs:line 75

at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)

at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Feature: server address box, or "use local address" box, in settings

This app wasn't getting my listening status from Plex until I manually set the server address and token in the configuration directory. The debug log showed "400 Bad Request" with no further information. It might just be a problem with my setup, double nat or something. A checkbox to indicate that the plex server local address is preferred would help a great deal. Thank you for this very slick app.

PlexampRPC freezes on startup.

Unfortunately, I could not get the logs for why this is happening since the app freezes at startup and I cannot hit Ctrl+C or F5 to show the logs. When the app starts up and I hit F5 it says PlexampRPC has crashed and as usual the app is frozen.

This issue is persistent in version 1.4.0 and above. Version 1.3.2 seems stable but not sure what's causing this issue.

Not to confuse you but I also found something strange when I use a proxy software in version 1.4.0 and above for PlexampRPC it starts up the application just fine. Any idea if this could be some sort of networking issue?

Failing to get this opperational

Spent a while trying to find some help online as to where I have things set up wrong, but having come up empty handed, I'm hoping to get some help here.

The app has my plex profile, and I select my server, but when I play music the preview section never populates with anything, just stays as the default info as when it first launches, with the plex logo for the album art.

It also never displays anything within my discord. I'm running it on the same PC as my Plex Media Server runs on. Is there any additional steps I need to take to get this all functional that I might have missed somewhere?

Sorry I can't provide better info, but I'm not even sure where things are going wrong. I'm running the latest version. Have plexpass, and am listening to my music via the windows version of PlexAmp.

Thank you to anyone that can help me. :)

PlexampRPC struggling with album name having lesser than 2 characters.

The title should pretty much explain the issue. I found this out after trying out an album with only one character. PlexampRPC wasn't reflecting the album and song on Discord after which the Debug console gave more insight as to what could be potentially causing the issue.

[21:29:32] ERR : Error received from the RPC
[21:29:32] ERR : Server responded with an error message: (InvalidPayload) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
[21:29:44] ERR : Error received from the RPC
[21:29:44] ERR : Server responded with an error message: (InvalidPayload) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
[21:30:03] ERR : Error received from the RPC
[21:30:03] ERR : Server responded with an error message: (InvalidPayload) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
[21:30:11] ERR : Error received from the RPC
[21:30:11] ERR : Server responded with an error message: (InvalidPayload) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
[21:30:23] Cleared Presence
[21:30:29] ERR : Error received from the RPC
[21:30:29] ERR : Server responded with an error message: (InvalidPayload) child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]
[21:30:31] Updated Presence to [中山新 - 幻想万華鏡~霊夢暗殺計画の章~オリジナル・サウンドトラック | 衝撃の真紅]
[21:30:39] Cleared Presence

App crashes (possibly because artist name is too long?)

I'm getting this error. Not sure why, but the artist name is significantly long - 58 Japanese characters, so it could be that?

Artist name is ガヴリール(CV:富田美憂)、ヴィーネ(CV:大西沙織)、サターニャ(CV:大空直美)、ラフィエル(CV:花澤香菜), song name is ハレルヤ☆エッサイム (instrumental), album name is ハレルヤ☆エッサイム

However, it works fine with a different song with artist name as サターニャ(CV:大空直美)、ラフィエル(CV:花澤香菜)

State

   at DiscordRPC.BaseRichPresence.set_State(String value)
   at PlexampRPC.MainWindow.SetPresence(PresenceData presence) in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 176
   at PlexampRPC.MainWindow.StartPolling() in D:\Development\repos\PlexampRPC\Windows\MainWindow.xaml.cs:line 118
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

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.