Giter Club home page Giter Club logo

itunesrichpresence's Introduction

iTunesRichPresence

Discord ko-fi

Example

Profile Example

Usage

  • Download latest release (iTunesRichPresence.zip) from releases page
  • Extract the zip file
  • Run iTunesRichPresence-Rewrite.exe
  • Start listening to music

Your discord should now display your currently playing music from iTunes

Building

  • Build project using Visual Studio
  • Place a copy of discord-rpc.dll in the same folder as the executable. You can get a copy of this file from here.

Contact

If you would like to contact me, join the Discord server

Note: there are no plans for a Mac version of this software.

itunesrichpresence's People

Contributors

fukujimihoko avatar markgatland avatar missingno123 avatar nint8835 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

itunesrichpresence's Issues

COMException: Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} ...

Sentry Issue: ITUNESRICHPRESENCE-3G

XamlParseException: The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
  Module "MS.Win32.HwndSubclass", line 285, in SubclassWndProc
    IntPtr SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
...
(27 additional frame(s) were not displayed)

COMException: Retrieving the COM class factory for component with CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 181, in .ctor
    Void .ctor(System.String)
  Module "iTunesRichPresence_Rewrite.MainWindow", line 17, in CreateBridge
    Void CreateBridge()
  Module "iTunesRichPresence_Rewrite.MainWindow", line 449, in .ctor
    Void .ctor()
...
(3 additional frame(s) were not displayed)

The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.

Coverart?

Is there plans to have cover art display? That would be amazing :D

InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.

Sentry Issue: ITUNESRICHPRESENCE-4P

XamlParseException: The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
  Module "MS.Win32.HwndSubclass", line 285, in SubclassWndProc
    IntPtr SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
...
(27 additional frame(s) were not displayed)

InvalidOperationException: Cannot load Counter Name data because an invalid index '' was read from the registry.
  Module "iTunesRichPresence_Rewrite.MainWindow", line 682, in .ctor
    Void .ctor()
...
(4 additional frame(s) were not displayed)

The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.

ApiException: Server Error

Sentry Issue: ITUNESRICHPRESENCE-1G

XamlParseException: The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
  Module "MS.Win32.HwndSubclass", line 285, in SubclassWndProc
    IntPtr SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
...
(27 additional frame(s) were not displayed)

AggregateException: One or more errors occurred.
  Module "iTunesRichPresence_Rewrite.MainWindow", line 486, in .ctor
    Void .ctor()

ApiException: Server Error
  Module "Octokit.Connection", line 47, in HandleErrors
    Void HandleErrors(Octokit.IResponse)
  Module "Octokit.Connection", line 305, in RunRequest
    Void MoveNext()
  Module "Octokit.Connection+<Run>d__57`1", line 140, in MoveNext
    Void MoveNext()
  Module "Octokit.ApiConnection+<Get>d__8`1", line 0, in MoveNext
    Void MoveNext()
...
(3 additional frame(s) were not displayed)

The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.

Stop displaying status while paused

Since your app overrides game presence I would like toggle in settings that would allow you to not update presence when music is paused.
for example. I start playing a game. I pause my music. Discord will be able to display game. While being able to keep the app running.

Overides current game playing

Is it possible to lower the priority of this presence somehow so that games begin played will displayed without having to worry about iTunes/your program being open

Start the program in the background, with Windows.

Hi! Me again. Whew.

Currently, the program runs when Windows starts. It would seem excellent to me that it could start in the background, minimized. Do you think this could be possible or is it a good idea?

Thank you for the quick implementation of my Apple Music proposal, it was amazing!
Thanks, great job! Greetings.

EntryPointNotFoundException: Impossible de trouver le point d'entrée 'Discord_ClearPresence' dans la DLL 'discord-rpc'.

https://sentry.io/riley-flynn/itunesrichpresence/issues/576856952/

EntryPointNotFoundException: Impossible de trouver le point d'entrée 'Discord_ClearPresence' dans la DLL 'discord-rpc'.
  Module "iTunesRichPresence_Rewrite.DiscordRpc", in ClearPresence
    Void ClearPresence()
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 13, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
...
(23 additional frame(s) were not displayed)

Impossible de trouver le point d'entrée 'Discord_ClearPresence' dans la DLL 'discord-rpc'.

COMException: Exception from HRESULT: 0xA0040202

Sentry Issue: ITUNESRICHPRESENCE-4

COMException: Exception from HRESULT: 0xA0040202
  Module "iTunesLib.IITTrack", in get_Name
    System.String get_Name()
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 198, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
...
(23 additional frame(s) were not displayed)

Exception from HRESULT: 0xA0040202

COMException: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

https://sentry.io/riley-flynn/itunesrichpresence/issues/577328048/

COMException: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
  Module "iTunesLib.IiTunes", in get_CurrentTrack
    iTunesLib.IITTrack get_CurrentTrack()
  File "D:\Development\iTunesRichPresence-Rewrite\iTunesRichPresence-Rewrite\DiscordBridge.cs", line 86, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
...
(24 additional frame(s) were not displayed)

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Repeating Songs, timer stuck?

I noticed that if a song is set to repeat, the timer doesn't reset and stays on 00:00 until something new plays. It isn't a huge deal, just thought I'd mention something.

Song artwork?

Is it possible to make discord show the song artwork?

Avast supposedly automatically removing software

A user has reported that their Avast is automatically deleting iTunesRichPresence.exe and flagging it as IDP.Generic.

Steps to be taken:

  • Scan release version of software with Avast, ensure this issue is reproducible
  • Submit executable as false positive to Avast
  • Add warning message to readme, notifying users that Avast may delete the software

COMException: Exception de HRESULT : 0xA0040202

Sentry Issue: ITUNESRICHPRESENCE-N

COMException: Exception de HRESULT : 0xA0040202
  Module "iTunesLib.IITTrack", in get_Artist
    System.String get_Artist()
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 266, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
...
(23 additional frame(s) were not displayed)

Exception de HRESULT : 0xA0040202

NullReferenceException: Object reference not set to an instance of an object.

Sentry Issue: ITUNESRICHPRESENCE-B

NullReferenceException: Object reference not set to an instance of an object.
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 169, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
...
(22 additional frame(s) were not displayed)

Object reference not set to an instance of an object.

NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.

Sentry Issue: ITUNESRICHPRESENCE-1C

NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
  Module "iTunesRichPresence_Rewrite.Tokens.TrackToken", line 0, in GetText
    System.String GetText(iTunesLib.IiTunes)
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 22, in RenderString
    System.String RenderString(System.String)
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 387, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
...
(24 additional frame(s) were not displayed)

De objectverwijzing is niet op een exemplaar van een object ingesteld.

AVG Flags New Versions of iTunesRichPresence as Hazardous

When opening iTunesRichPresence version 2.1.0, AVG immediately flags it as a threat and moves it to quarantine unless a specific exception is created for the .exe file.

(Images attached using Imgur)
Upon opening iTunesRichPresence-Rewrite.exe - https://i.imgur.com/5iDYkLJ.png
AVG CyberCapture monitoring the application - https://i.imgur.com/0JU5Nok.png
AVG moving the .exe to quarantine - https://i.imgur.com/imTXRY5.png
AVG attempted identification of the file - https://i.imgur.com/IBYy5fK.png
(Upon selecting 'I trust this file' permission to open iTRP is denied.)

AVG Information:
Internet Security 2018
Version 18.5.3059 (6/20/2018)
Definitions Version 180702-2 (7/2/2018)

ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.

Sentry Issue: ITUNESRICHPRESENCE-1

ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
  Module "iTunesRichPresence_Rewrite.DiscordRpc+RichPresence", line 34, in StrClampBytes
    System.String StrClampBytes(System.String, Int32)
  Module "iTunesRichPresence_Rewrite.DiscordRpc+RichPresence", line 72, in StrToPtr
    IntPtr StrToPtr(System.String, Int32)
  Module "iTunesRichPresence_Rewrite.DiscordRpc+RichPresence", line 20, in GetStruct
    RichPresenceStruct GetStruct()
  Module "iTunesRichPresence_Rewrite.DiscordRpc", line 0, in UpdatePresence
    Void UpdatePresence(RichPresence)
  Module "iTunesRichPresence_Rewrite.DiscordBridge", line 518, in Timer_OnTick
    Void Timer_OnTick(System.Object, System.EventArgs)
...
(1 additional frame(s) were not displayed)

Destination array was not long enough. Check destIndex and length, and the array's lower bounds.

Songs with long artist names crashes the program.

This seems like a rare case, but I tried playing a song with very long artist text, the the program crashes.
here's the crash log:

************** Exception Text **************

System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at iTunesRichPresence.DiscordRPC.RichPresence.StrClampBytes(String toclamp, Int32 maxbytes)
at iTunesRichPresence.DiscordRPC.RichPresence.StrToPtr(String input, Int32 maxbytes)
at iTunesRichPresence.DiscordRPC.RichPresence.GetStruct()
at iTunesRichPresence.DiscordRPC.UpdatePresence(RichPresence presence)
at iTunesRichPresence.MainForm.UpdatePresence()
at iTunesRichPresence.MainForm.pollTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Add theme selector UI

Currently the app uses a hardcoded theme (in rewrite) of light theme with orange accents. Add a theme selector UI to allow the user to change the theme and accent colours.

Status Refresh time

The application take approximately 11 sec to respond to any change happened in the itunes like pause or skiping the song , i hope you take in the consideration the immediate refresh of any change happing.

Album Artwork

Love this application! I was just wondering if it would be possible to display album artwork on the rich presence panel when you click on someone's name instead of just the iTunes icon.

I know that there is a way to set a custom image for this, but I'm not so sure about how to do this dynamically. There must be a way though seeing as though when you play a game like League of Legends it actually displays the Champion you're playing as in the picture. For the native Spotify integration they are able to do this as well.

So, with all that being said, I wonder if that would be possible to do with this iTunes version.
Thanks for the amazing work on this fun little application. 👍

Latest Update once minimized, can't open it back up

On the latest update in the Releases tab.

Once app is opened and I go to minimize the app, the app minimizes but I am unable to double click on the minimized icon to open the program back up in order to exit the program or to change the settings around.

If I want to close the app I have to go into Task Manager and end the process.

WebException: The remote name could not be resolved: 'api.github.com'

Sentry Issue: ITUNESRICHPRESENCE-1E

XamlParseException: The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
  Module "MS.Win32.HwndSubclass", line 285, in SubclassWndProc
    IntPtr SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
...
(27 additional frame(s) were not displayed)

AggregateException: One or more errors occurred.
  Module "iTunesRichPresence_Rewrite.MainWindow", line 486, in .ctor
    Void .ctor()

HttpRequestException: An error occurred while sending the request.
  Module "Octokit.Internal.HttpClientAdapter", line 266, in SendAsync
    Void MoveNext()
  Module "Octokit.Internal.HttpClientAdapter", line 185, in Send
    Void MoveNext()
  Module "Octokit.Connection", line 277, in RunRequest
    Void MoveNext()
  Module "Octokit.Connection+<Run>d__57`1", line 140, in MoveNext
    Void MoveNext()
  Module "Octokit.ApiConnection+<Get>d__8`1", line 0, in MoveNext
    Void MoveNext()
...
(10 additional frame(s) were not displayed)

WebException: The remote name could not be resolved: 'api.github.com'
  Module "System.Net.HttpWebRequest", line 273, in EndGetResponse
    System.Net.WebResponse EndGetResponse(System.IAsyncResult)
  Module "System.Net.Http.HttpClientHandler", line 12, in GetResponseCallback
    Void GetResponseCallback(System.IAsyncResult)

The invocation of the constructor on type 'iTunesRichPresence_Rewrite.MainWindow' that matches the specified binding constraints threw an exception.

Feature Request: Minimize to tray, and disengage from Discord when no song is playing

Dunno if this is the right place to post this, but I had 2 requests for this dope app.

  1. It would be amazing if the app could minimize to the system tray rather than taking up space in the task bar.

  2. It would also be awesome if the app could clear itself from Discord when no track is playing in iTunes. I don't mean detecting pauses cause thats a bit more tricky due to iTunes' shite API (or the lack of one), but if it would just not show in my Discord when no music is playing.

Cheers!

Option to display "Listening To" instead of "Playing"

So discord has this Listening To game statue, my suggestion is to add an option to the tray icon to change the game statue from Playing iTunes to something like Listening To iTunes or Listening To SONG_NAME (or it comes by default like that), it looks better in my opinion, and has a better description of what i'm actually doing.

Although, i'm not sure if Discord's rich presence allow such thing, but it should be allowed i guess, since they have their own Spotify rpc where it's using Listening To

SocketException: Uma tentativa de conexão falhou porque o componente conectado não respondeu

Sentry Issue: ITUNESRICHPRESENCE-27

XamlParseException: A invocação do construtor no tipo 'iTunesRichPresence_Rewrite.MainWindow' que corresponde às restrições de associação especificadas iniciou uma exceção.
  Module "MS.Internal.CulturePreservingExecutionContext", line 27, in CallbackWrapper
    Void CallbackWrapper(System.Object)
  Module "MS.Internal.CulturePreservingExecutionContext", line 0, in Run
    Void Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
  Module "MS.Win32.HwndWrapper", line 48, in WndProc
    IntPtr WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
  Module "MS.Win32.HwndSubclass", line 54, in DispatcherCallbackOperation
    System.Object DispatcherCallbackOperation(System.Object)
  Module "MS.Win32.HwndSubclass", line 285, in SubclassWndProc
    IntPtr SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
...
(27 additional frame(s) were not displayed)

AggregateException: Um ou mais erros.
  Module "iTunesRichPresence_Rewrite.MainWindow", line 512, in .ctor
    Void .ctor()

HttpRequestException: Ocorreu um erro ao enviar a solicitação.
  Module "Octokit.Internal.HttpClientAdapter", line 266, in SendAsync
    Void MoveNext()
  Module "Octokit.Internal.HttpClientAdapter", line 185, in Send
    Void MoveNext()
  Module "Octokit.Connection", line 277, in RunRequest
    Void MoveNext()
  Module "Octokit.Connection+<Run>d__57`1", line 140, in MoveNext
    Void MoveNext()
  Module "Octokit.ApiConnection+<Get>d__8`1", line 0, in MoveNext
    Void MoveNext()
...
(10 additional frame(s) were not displayed)

WebException: Impossível conectar-se ao servidor remoto
  Module "System.Net.HttpWebRequest", line 273, in EndGetResponse
    System.Net.WebResponse EndGetResponse(System.IAsyncResult)
  Module "System.Net.Http.HttpClientHandler", line 12, in GetResponseCallback
    Void GetResponseCallback(System.IAsyncResult)

SocketException: Uma tentativa de conexão falhou porque o componente conectado não respondeu
corretamente após um período de tempo ou a conexão estabelecida falhou
porque o host conectado não respondeu 192.30.253.116:443
  Module "System.Net.Sockets.Socket", line 0, in InternalEndConnect
    Void InternalEndConnect(System.IAsyncResult)
  Module "System.Net.Sockets.Socket", line 27, in EndConnect
    Void EndConnect(System.IAsyncResult)
  Module "System.Net.ServicePoint", line 145, in ConnectSocketInternal
    System.Net.WebExceptionStatus ConnectSocketInternal(Boolean, System.Net.Sockets.Socket, System.Net.Sockets.Socket, System.Net.Sockets.Socket ByRef, System.Net.IPAddress ByRef, ConnectSocketState, System.IAsyncResult, System.Exception ByRef)

A invocação do construtor no tipo 'iTunesRichPresence_Rewrite.MainWindow' que corresponde às restrições de associação especificadas iniciou uma exceção.

Add diagnostic information

User has reported receiving no error messages, but the app and Discord are both configured correctly and no status is being displayed. Add diagnostic information (current detected iTunes info, last Discord push, etc.) to try and track down this issue.

Exception Info: System.InvalidCastException

When I try to run the latest release the following errors appear. I know enough to be dangerous at gathering logs but not enough to get much further at this point so I have no idea if this is an issue with the app or with my PC but I figured I'd let you know in case it wasn't something on my end. If I find information that it is I'll update this post.

Log Name:      Application
Source:        Application Error
Date:          3/25/2019 10:03:43 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      YUGA-SUNDOWN
Description:
Faulting application name: iTunesRichPresence-Rewrite.exe, version: 2.4.1.0, time stamp: 0x5c96f6f6
Faulting module name: KERNELBASE.dll, version: 10.0.17763.348, time stamp: 0x53015794
Exception code: 0xe0434352
Fault offset: 0x0011c632
Faulting process id: 0x5d88
Faulting application start time: 0x01d4e3781f04edcc
Faulting application path: C:\Program Files (x86)\iTunesRichPresence\iTunesRichPresence-Rewrite.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 08bf3216-a373-4ad4-8c84-9b9112f26af2
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-03-26T02:03:43.952773600Z" />
    <EventRecordID>20754</EventRecordID>
    <Channel>Application</Channel>
    <Computer>YUGA-SUNDOWN</Computer>
    <Security />
  </System>
  <EventData>
    <Data>iTunesRichPresence-Rewrite.exe</Data>
    <Data>2.4.1.0</Data>
    <Data>5c96f6f6</Data>
    <Data>KERNELBASE.dll</Data>
    <Data>10.0.17763.348</Data>
    <Data>53015794</Data>
    <Data>e0434352</Data>
    <Data>0011c632</Data>
    <Data>5d88</Data>
    <Data>01d4e3781f04edcc</Data>
    <Data>C:\Program Files (x86)\iTunesRichPresence\iTunesRichPresence-Rewrite.exe</Data>
    <Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>
    <Data>08bf3216-a373-4ad4-8c84-9b9112f26af2</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

Log Name:      Application
Source:        .NET Runtime
Date:          3/25/2019 10:03:43 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      YUGA-SUNDOWN
Description:
Application: iTunesRichPresence-Rewrite.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException
   at iTunesRichPresence_Rewrite.DiscordBridge..ctor(System.String)
   at iTunesRichPresence_Rewrite.MainWindow.CreateBridge()
   at iTunesRichPresence_Rewrite.MainWindow..ctor()

Exception Info: System.Windows.Markup.XamlParseException
   at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   at System.Windows.Application.LoadComponent(System.Uri, Boolean)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__1_0(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at iTunesRichPresence_Rewrite.App.Main()


Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name=".NET Runtime" />
    <EventID Qualifiers="0">1026</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-03-26T02:03:43.849852400Z" />
    <EventRecordID>20753</EventRecordID>
    <Channel>Application</Channel>
    <Computer>YUGA-SUNDOWN</Computer>
    <Security />
  </System>
  <EventData>
    <Data>Application: iTunesRichPresence-Rewrite.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException
   at iTunesRichPresence_Rewrite.DiscordBridge..ctor(System.String)
   at iTunesRichPresence_Rewrite.MainWindow.CreateBridge()
   at iTunesRichPresence_Rewrite.MainWindow..ctor()

Exception Info: System.Windows.Markup.XamlParseException
   at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
   at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
   at System.Windows.Application.LoadComponent(System.Uri, Boolean)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.&lt;.ctor&gt;b__1_0(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at iTunesRichPresence_Rewrite.App.Main()

</Data>
  </EventData>
</Event>

Build Error building the latest source. DiscordBridge.cs line 117. Missing ;

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS1002	; expected	iTunesRichPresence-Rewrite	D:\Desktop_Stuff\Github_Clones\C#\iTunesRichPresense\iTunesRichPresence\DiscordBridge.cs	117	Active

Here

            catch (EntryPointNotFoundException) {
                var newPresence = new DiscordRpc.RichPresence {
                    largeImageKey = "itunes_logo_big",
                    details = "No song playing",
                    state = "Re-install iTunesRichPresence to clear this message"
                }
            }

Adding a semi colon after the ending curly bracket let's the project build successfully.

Redesign UI

Move from WinForms to WPF and make the interface less hideous

Pausing a song makes title of the song disappear

Hello,

In these images I'm listening to a artist called Ja Mezz.
As you can see I have put artist first and second the song title.
And the time under it of course.

But the problem is when i pause the song the ''paused'' replaces the song title instead of just the time under it.

Not sure if it's a bug or not but it just looks weird if a artist is paused haha ;)

Thanks in advance.

Jeremy

eeefefef
wdadawdawdawdawd

I want to reverse title and artist name.

I want to reverse title and artist in setting.
Now [artist] - [title] is displayed, but I'd like to display it as [title] - [artist].
I hope these can be changed by setting
Thank you for your consideration.

When playing a song of a long artist, a crash message will be displayed.

A System.ArgumentException occurs when playing a song with a long artist name.

System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at iTunesRichPresence.DiscordRPC.RichPresence.StrClampBytes(String toclamp, Int32 maxbytes)
   at iTunesRichPresence.DiscordRPC.RichPresence.StrToPtr(String input, Int32 maxbytes)
   at iTunesRichPresence.DiscordRPC.RichPresence.GetStruct()
   at iTunesRichPresence.DiscordRPC.UpdatePresence(RichPresence presence)
   at iTunesRichPresence.MainForm.UpdatePresence()
   at iTunesRichPresence.MainForm.pollTimer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The corresponding song is below.

  • Title: うまるん体操
    • Artist: 妹S(シスターズ)[土間うまる(CV:田中あいみ)/海老名菜々(CV:影山 灯)/本場切絵(CV:白石晴香)/橘・シルフィンフォード(CV:古川由利奈)]
    • Album: TVアニメ「干物妹!うまるちゃんR」EDテーマ「うまるん体操」 - EP
  • TItle: メモワール・ミルフィーユ
    • Artist: キュアホイップ (美山加恋), キュアカスタード (福原遥), キュアジェラート (村中知), キュアマカロン (藤田咲), キュアショコラ (森なな子), キュアパルフェ (水瀬いのり)
    • Album: 映画 キラキラ☆プリキュアアラモード パリッと! 想い出のミルフィーユ! 主題歌シングル

ApplicationVersion: v1.2.2 (Latest release)

I like this application very much and using it. Thank you for your consideration.

Name "Playing iTunes" to "Apple Music"

Hi!

Personally I would like to see Apple Music in the place of iTunes in "Playing", is where I listen to my music.
Can you change this according to the user or predefine this or do you think it would be a good idea?

Awesome work! Thanks for everything :D

"Playing iTunes/Apple Music" depending on what's playing

Not sure how feasible this could be, but it would be nice to change the PLAYING A GAME iTunes or PLAYING A GAME Apple Music depending on if you're listening to a song on Apple Music or just a local copy through iTunes.

Files are either determined as "iCloud status Apple Music" or "iCloud Status Uploaded", so I'm not sure if you could use this to determine whether they're apple music or local.

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.