sll552 / DiscordBee

MusicBee plugin that updates your Discord status with the currently playing track
Apache License 2.0
421 stars 31 forks source link

Implement new cover art method #117

Closed NyakoFox closed 2 years ago

NyakoFox commented 2 years ago

Discord now allows you to use any arbitrary URL as an image for rich presence by passing in a URL instead of an asset name. There are multiple ways I could see this being allowed:

The current method is pretty odd and I'd much rather this method be used, so this being implemented would be very cool.

sll552 commented 2 years ago

This will definitely be the future method for handling covers.

There are still a few caveats though.

HeartbeatingForCenturies commented 2 years ago

All my songs have artwork url's embedded into the metadata, you can just set discordbee to read it and display the url

FluffyDiscord commented 2 years ago

Option to add your own cover art provider would be nice. I would like to use my own hosting service for it, so adding an option to enter your own URL and use some basic API would be nice, like sending file hash or path or so.

Ancyker commented 2 years ago

Could use last.fm's API:

https://www.last.fm/api/show/album.getInfo

Example output for /2.0/?method=album.getinfo&api_key=YOUR_API_KEY&artist=Cher&album=Believe&format=json

{
  "album": {
    "artist": "Cher",
    "mbid": "03c91c40-49a6-44a7-90e7-a700edf97a62",
    "tags": {
      "tag": [
        {
          "url": "https://www.last.fm/tag/pop",
          "name": "pop"
        },
        {
          "url": "https://www.last.fm/tag/dance",
          "name": "dance"
        },
        {
          "url": "https://www.last.fm/tag/90s",
          "name": "90s"
        },
        {
          "url": "https://www.last.fm/tag/1998",
          "name": "1998"
        },
        {
          "url": "https://www.last.fm/tag/cher",
          "name": "cher"
        }
      ]
    },
    "playcount": "3799145",
    "image": [
      {
        "size": "small",
        "#text": "https://lastfm.freetls.fastly.net/i/u/34s/3b54885952161aaea4ce2965b2db1638.png"
      },
      {
        "size": "medium",
        "#text": "https://lastfm.freetls.fastly.net/i/u/64s/3b54885952161aaea4ce2965b2db1638.png"
      },
      {
        "size": "large",
        "#text": "https://lastfm.freetls.fastly.net/i/u/174s/3b54885952161aaea4ce2965b2db1638.png"
      },
      {
        "size": "extralarge",
        "#text": "https://lastfm.freetls.fastly.net/i/u/300x300/3b54885952161aaea4ce2965b2db1638.png"
      },
      {
        "size": "mega",
        "#text": "https://lastfm.freetls.fastly.net/i/u/300x300/3b54885952161aaea4ce2965b2db1638.png"
      },
      {
        "size": "",
        "#text": "https://lastfm.freetls.fastly.net/i/u/300x300/3b54885952161aaea4ce2965b2db1638.png"
      }
    ]
    ...
  }
}
sll552 commented 2 years ago

Could use last.fm's API:

I came across this and thought about it, the problem would be that it might not be the cover that the user chose in musicbee which might cause confusion.

Ancyker commented 2 years ago

which might cause confusion.

Offer both methods? Could still fall back to the current method for music that isn't on last.fm.

sll552 commented 2 years ago

The current method will go away for good, its cumbersome to set up and does not work reliably.

Still lastfm could be used e.g. if the rate limit for imgur (or whatever hosting service) is reached. While this would be most likely a good thing, it is more complex to implement and I haven't even started to implement the most basic version of this feature. But this is more like a personal constraint than a technical one.

Svarr commented 2 years ago

Would having the user create a git repository be an option? Though, unless they preupload everything to a public repo, there is the issue of authentification and authorisation. And even then a user-friendly way has to be found to uniquely identify the correct cover art without having to go through a tedious process while uploading manually.

I believe using SSH keys is the way to go to enable automatic uploading of (embedded) cover art, although this would probably disadvantage the average user... The plugin should be able to take care of almost everything (including SSH key generation), so that the user only has to create the repository, set its path (maybe with a base folder) in the config and adding the key from the plugin to the repo settings. All we need for this is the path to the git binaries if it isn't already included in PATH.

This way would certainly remove any concerns about up-/download rates and persistence.

sll552 commented 2 years ago

Actually I never thought about it because I don't know much about how github pages works and its limitations (ToS wise or if there are limits to updates/bandwith etc.). I will take a look when I got time for that.

But it could be a nice solution, it could even be possible to use one repo for everyone. The major concern would be that the repo has to be public and so all files are public and I am not sure about the legal implications about that (hosting cover art etc.). The most user friendly way to use github would be API keys so you don't need to fiddle around with ssh keys or installing git. You would just need to create an api token and the plugin would use the HTTP api of github.

Slyyxp commented 2 years ago

Seems very counter-intuitive to upload 10,000+ if not 100,000+ images to a github repo when these files can be obtained from existing sources online. A solution which removes the need to upload files entirely should be opted for in my opinion.

Calling the LastFM API seems ideal.

Using LastFM you will occasionally get a response with no artwork, a placeholder image can be used in this case. You may also get a variation of the artwork, for example a 'Deluxe Edition' variation.

Both of these things are preferable to having the plugin take a noticable toll on the users network.

Rings4 commented 2 years ago

Seems very counter-intuitive to upload 10,000+ if not 100,000+ images to a github repo when these files can be obtained from existing sources online. A solution which removes the need to upload files entirely should be opted for in my opinion.

Calling the LastFM API seems ideal.

Using LastFM you will occasionally get a response with no artwork, a placeholder image can be used in this case. You may also get a variation of the artwork, for example a 'Deluxe Edition' variation.

Both of these things are preferable to having the plugin take a noticable toll on the users network.

Last.FM barely has any artwork. 75% of the music I listen to has none. So I'm not sure how feasible last.fm would be here.

Gimzie commented 2 years ago

I agree, Last.FM isn't a great source for accurate cover art. Often times, the cover art they do have is a poor scan.

sll552 commented 2 years ago

There are alternatives like fanart.tv so it's basically a decision if its ok to accept possibly missing/wrong/different artwork by using an external service or having to implement some other solution using image hosting and uploading exactly the artwork thats present in musicbee.

Rings4 commented 2 years ago

I use many custom artwork in my library so I'd only be able to use a method that uploads my own assets to a server.

VelocityRa commented 2 years ago

Fwiw I'd also prefer uploading over last.fm or whatever.

Obviously a combination is best, but that's more work and I'd much rather have the feature sooner with only custom upload, especially considering it has broken entirely with Discord's newest update.

I also don't care about having to do some work to set up a local server or register on some hosting site for it.

ghost commented 2 years ago

I saw that the problem was in general and for a moment I thought it was me. The alternative of using fanart.tv is a good option, as is last.fm. All the music I listen to has covers, but I've noticed that they all have different sizes from 300px to covers reaching 1600px.

thekirbykid20067 commented 2 years ago

In my opinion, last.fm really does seem like the best option. For anyone who's saying things like "My music doesn't have covers on last.fm" or "They can be low quality scans", that is because anyone can upload covers to last.fm. Just upload it yourself lol

Rings4 commented 2 years ago

In my opinion, last.fm really does seem like the best option. For anyone who's saying things like "My music doesn't have covers on last.fm" or "They can be low quality scans", that is because anyone can upload covers to last.fm. Just upload it yourself lol

Oh yeah, let me just upload tens of thousands of artwork to last.fm, that's not going to be tedious at all LOL

FluffyDiscord commented 2 years ago

As far as I can see, there is no last.fm API to add your song and/or image so doing it manually for thousands of songs I personally own and are mostly not there is not realistic.

thekirbykid20067 commented 2 years ago

From my experience like 90% of music already has covers on last.fm, unless you're listening to like, your buddy's album that's been downloaded 3 times it'll most likely have a cover already uploaded. Plus, would most likely wouldn't need to upload artwork for "thousands of songs you personally own", as last.fm artwork is uploaded based on albums, not individual tracks

Rings4 commented 2 years ago

From my experience like 90% of music already has covers on last.fm, unless you're listening to like, your buddy's album that's been downloaded 3 times it'll most likely have a cover already uploaded. Plus, would most likely wouldn't need to upload artwork for "thousands of songs you personally own", as last.fm artwork is uploaded based on albums, not individual tracks

It's just not not feasible. I have 10s of thousands of albums.

telumletiferum commented 2 years ago

What about using the musicbrainz db for covers?

Gimzie commented 2 years ago

Anything that doesn't use the covers you see in MusicBee probably isn't a great solution.

If you're listening to popular albums, they sure have covers uploaded to Last.FM and elsewhere. But if you listen to anything more obscure/dated, or especially in areas like video game/anime/movie/TV soundtracks, you're not going to find good quality covers uploaded the majority of the time.

Relying on services like Last.FM might be a decent fallback option, but it definitely shouldn't be the primary source.

moyevka commented 2 years ago

Might I suggest just using Discord itself as an imagehost? Have images uploaded to a private server/channel and have the plugin grab links from said server/channel. I'm not sure if it's possible to automate this process, but I do know that Discord works well as an imagehost (especially for a plugin built for it) and doesn't have a lot of limitations in that regard.

VelocityRa commented 2 years ago

That's a violation of Discord's ToS, they've banned servers/accounts for this before.

moyevka commented 2 years ago

Yeah, that makes sense, silly suggestion in hindsight.

I do agree with the rest that using a music database wouldn't be the best solution, I do often hunt for better quality cover arts or even make custom art for my library. Hope to see a solution to this soon.

Rings4 commented 2 years ago

I think imgur or other image hosting sites that allow for private uploads is still a good idea. Assuming ofc this doesn't break their TOS.

excelkobayashi commented 2 years ago

+1 for not having an external provider as the primary source. If all I listened to was the American pop music available on Last.FM, I'd be on Spotify not MusicBee.

At least half of my artwork is stuff for which none of the 4 built-in art providers in MusicBee could find anything. On top of that, at least half of the time they do find something it ends up being wrong and I have to manually correct it. So it's only correct about 1/4th of the time.

Also, personally I feel like setting up a port forward for the app to host the images directly would be less work than having to jump through hoops to setup an API key for Imgur or whatever, and then also having to deal with whatever limitations they impose.

sll552 commented 2 years ago

I am definitely aiming to preserve custom cover arts. I guess port forwarding would work but I don't really like to require that much setup hassle from the user and if there are problems they are much harder to debug as there are so much variables that come into play (router, firewall - local and router, ipv6 vs ipv4).

My current favorite is still using the imgur API even with its limits. If handled I suspect that the impact even if those limits are hit should be minimal. It's also a trustworthy site that enables easy login using major social sites so making an account is easy.

Unfortunately I am still quite busy and don't really have much time for coding. If someone wants to take a shot at implementing it I am happy to discuss my ideas and doing a review.

PaulMcleary commented 2 years ago

https://github.com/PvtTyphoon/lfm-rich-presence this app seems to have utilized the last.fm api method. In my testing it seems to work pretty well. I believe it doesn't update frequently, maybe every couple minutes, just pulls the whole album list and goes down the tracklist until it eventually hard updates. Pretty good for full album listeners but single track listeners are probably not going to like it.

fawni commented 2 years ago

Maybe you can add a text box to put the token yourself in the plugin settings as a temporary solution. It's definitely less secure than how it was being done before, but since we still don't know the next step, let alone implementing it, I believe most/some people are willing to accept this temporarily. This is definitely better than uploading it manually like https://github.com/sll552/DiscordBee/issues/100#issuecomment-1013757465 which seems to be a workaround that a lot of people are taking even though it is exhaustive and unintuitive.

TrevTV commented 2 years ago

For those who don't mind using Last.fm as a source, I made this version that uses it instead of the asset uploading method. I'm sure it's implementation isn't the greatest, but it's the best I've been able to do for right now. (You can also add custom URLs but it's not properly implemented, involves manually modifying the cache, and doesn't fix it being really tedious)

wmbt02 commented 2 years ago

For those who don't mind using Last.fm as a source, I made this version that uses it instead of the asset uploading method. I'm sure it's implementation isn't the greatest, but it's the best I've been able to do for right now. (You can also add custom URLs but it's not properly implemented, involves manually modifying the cache, and doesn't fix it being really tedious)

I didn't get it working, got an error like this:

MusicBee v3.5.8150.17011D  (Win10.0), 25 May 2022 16:13:

System.ArgumentOutOfRangeException: The value needs to be either -1 (signifying an infinite timeout), 0 or a positive integer.
Parameter name: millisecondsDelay
   at System.Threading.Tasks.Task.Delay(Int32 millisecondsDelay, CancellationToken cancellationToken)
   at MusicBeePlugin.DiscordTools.DiscordClient.<AttemptUpdateAsset>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
TrevTV commented 2 years ago

Hm, I'm not entire sure what would cause that, but this build should at least bypass that for now DiscordBee-Release-v2.2.0.zip

wmbt02 commented 2 years ago

Hm, I'm not entire sure what would cause that, but this build should at least bypass that for now DiscordBee-Release-v2.2.0.zip

Works, thanks!

VelocityRa commented 2 years ago

In case anyone else finds this useful, I've been using some code that I modified taken from https://github.com/PvtTyphoon/lfm-rich-presence.

Code: https://gist.github.com/VelocityRa/895316d6d49034df510137fe870a68e5 you can optionally comment out the code that asks for a username and keep the line with your own so you don't need to enter it every time (see lines 31-34).

Install the dependencies and run with node lfm-rich-presence-headless.js. I run it from a batch file that just calls it in a loop because it fails sometimes.

It's honestly great for now because since it's Last.fm it doesn't just sync MusicBee, it syncs stuff that I watch on Youtube, or even on my phone. The downside is no custom album art and not as much metadata (ie. genres, year released) but eh.

HeartbeatingForCenturies commented 2 years ago

Hm, I'm not entire sure what would cause that, but this build should at least bypass that for now DiscordBee-Release-v2.2.0.zip

cool stuff, couple issues. if a song isnt apart of an album it throws exception along with skipping a song too fast after another.

TrevTV commented 2 years ago

I knew about the skipping issue, I've tried a couple different fixes but none of them seem to be 100% functional. For the album issue, I just forgot that was a possibility since all my tracks have that tag. I'll try to make a release soon to at least mostly address the first and fix the second.

Edit: It's released now

thunderbreak11 commented 2 years ago

I knew about the skipping issue, I've tried a couple different fixes but none of them seem to be 100% functional. For the album issue, I just forgot that was a possibility since all my tracks have that tag. I'll try to make a release soon to at least mostly address the first and fix the second.

Edit: It's released now

No album fix works for me. Skipping fix works for all times except once, but I'm not too sure if that was the issue or not fn. Getting an issue where the following errors pop up in quick selection when the player plays certain files, these seem to be ones I downloaded off youtube or made myself with custom album names and everything.

MusicBee v3.4.8033.18564D  (Win10.0), 29 May 2022 23:48:

System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MusicBeePlugin.DiscordTools.AssetManager.<GetLastFMAlbumInfo>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

MusicBee v3.4.8033.18564D  (Win10.0), 29 May 2022 23:48:

System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MusicBeePlugin.DiscordTools.AssetManager.<GetLastFMAlbumInfo>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
sll552 commented 2 years ago

Just to give you all a quick update, I plan to start to work on this next week. Plan is still to use Imgur, so if you want to keep using your custom album arts you will need an account.

As there seems to be a mostly working implementation for lastfm from @TrevTV I will try to implement it in a way so that it is easy to let people choose what they want to use. And hopefully get it merged if thats ok with the author.

TrevTV commented 2 years ago

Getting an issue where the following errors pop up in quick selection when the player plays certain files, these seem to be ones I downloaded off youtube or made myself with custom album names and everything.

Hm, that's odd. Normally Last.fm's API responds with a JSON body containing Album not found. This may just be a weird case with the characters used in the Artist or Album data.

I will try to implement it in a way so that it is easy to let people choose what they want to use. And hopefully get it merged if thats ok with the author.

That's fine with me, though I'd recommend checking over the implementation first since I could be missing some things.

noiverre commented 2 years ago

I knew about the skipping issue, I've tried a couple different fixes but none of them seem to be 100% functional. For the album issue, I just forgot that was a possibility since all my tracks have that tag. I'll try to make a release soon to at least mostly address the first and fix the second.

Edit: It's released now

There seems to be an issue which crashes MusicBee when you are not connected to any network whilist playing song that doesn't have complete metadata, here's the error log:

MusicBee v3.4.8033.18564D  (Win10.0), 5 Jun 2022 1:57:

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'ws.audioscrobbler.com'
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MusicBeePlugin.DiscordTools.AssetManager.<GetLastFMAlbumInfo>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
mianmur commented 2 years ago

Getting an issue where the following errors pop up in quick selection when the player plays certain files, these seem to be ones I downloaded off youtube or made myself with custom album names and everything.

Hm, that's odd. Normally Last.fm's API responds with a JSON body containing Album not found. This may just be a weird case with the characters used in the Artist or Album data.

I will try to implement it in a way so that it is easy to let people choose what they want to use. And hopefully get it merged if thats ok with the author.

That's fine with me, though I'd recommend checking over the implementation first since I could be missing some things.

MusicBee v3.5.8167.33754P  (Win10.0), 8 Jun 2022 1:45:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Http.HttpClient'.
   at System.Net.Http.HttpClient.CheckDisposed()
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetContentAsync[T](Uri requestUri, HttpCompletionOption completionOption, T defaultValue, Func`2 readAs)
   at System.Net.Http.HttpClient.GetStringAsync(Uri requestUri)
   at MusicBeePlugin.DiscordTools.AssetManager.<GetLastFMAlbumInfo>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
TrevTV commented 2 years ago

There seems to be an issue which crashes MusicBee when you are not connected to any network whilist playing song that doesn't have complete metadata, here's the error log

That's just something I forgot to add a check for, I'll do that soon.

System.ObjectDisposedException: Cannot access a disposed object.

That's related to the rich presence being updating too often and so Discord kills the client that then breaks the plugin. I may be able to at least bypass that error, but you'd still have to restart MusicBee if Discord kills it for it to reappear.

Also, I've enabled issues on my fork, so if you have issues please post them there so we don't continue to fill up this one.

Edit: A release with both of those fixes has been uploaded

sll552 commented 2 years ago

I have finished a beta version of the new upload. Everyone is welcome to test. Just install https://ci.appveyor.com/api/buildjobs/4qdp0ksptmgs9n3r/artifacts/DiscordBee-Release--247.zip Please take a look at the Readme https://github.com/sll552/DiscordBee/blob/cover_upload/README.md

FluffyDiscord commented 2 years ago

are there any limits with the imgur ?

FluffyDiscord commented 2 years ago

@sll552 just a small thing - would you mind making the whole settings page background pinkish as the top ? I cant see the text

obrazek

FluffyDiscord commented 2 years ago

got error when I tried to check the health status for the second time (eg, start MB, check the health, its ok, close the small window and reopen it, this error pops up), no idea if this helps or you need more logs (where would they be)

MusicBee v3.4.8033.18564D (Win10.0), 26 čvn 2022 18:00:

System.ObjectDisposedException: K uvolněnému objektu nelze přistupovat. Název objektu: UploaderHealth v System.Windows.Forms.Control.CreateHandle() v System.Windows.Forms.Form.CreateHandle() v System.Windows.Forms.Control.get_Handle() v System.Windows.Forms.Control.SetVisibleCore(Boolean value) v System.Windows.Forms.Form.SetVisibleCore(Boolean value) v System.Windows.Forms.Control.Show() v MusicBeePlugin.Plugin.ShowUploaderHealth(Object sender, EventArgs e) v System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) v System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e) v System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) v System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) v System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) v System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) v System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) v System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) v System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) v System.Windows.Forms.Control.WndProc(Message& m) v System.Windows.Forms.ScrollableControl.WndProc(Message& m) v System.Windows.Forms.ToolStrip.WndProc(Message& m) v System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) v System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) v System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) v System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

DannyyyOnGit commented 2 years ago

I experience the same issue. It works just fine for the first time but then bugs out eventually. Here is my error message but it should be the same as above.

How to reproduce:

  1. Play music with no existing cover uploaded
  2. Notice cover loading and displaying as expected
  3. Re-play a song from the same album
  4. Notice the cover appearing for a second and disappearing again
sll552 commented 2 years ago

Fixed the error, that was just an UI bug so it should not have influenced the cover uploads. Also keep in mind that it can take a while for covers to appear for new albums, that is dependent on your internet connection (upload speed).

new build: https://ci.appveyor.com/api/buildjobs/t9dro0fcfqm4yq42/artifacts/DiscordBee-Release--248.zip