Author Topic: Import Music Stream Album Art?  (Read 5759 times)

sveakul

  • Posts: 157
Re: Import Music Stream Album Art?
« Reply #25 on: 8 Feb '22 - 18:06 »
Hi Keltic, just tested .85.  Unfortunately Opus still does not work, with the exception of one group of files from the same source that include the one you mentioned from my first PM.  Also I ran into one Opus file (with art) that would actually crash the plugin (unload it) when playback was attempted.

I am PM'ing you another set of 6 test Opus files, hopefully a larger variety will help.  4 of these have cover art that is not displayed, 1 of them (prefaced WORKS) is from the same batch that worked before, and the last is the one that crashes the plugin (prefaced accordingly).  All of these play normally and display art in Foobar, AIMP, and MusicBee.

Thanks for anything you can come up with.

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #26 on: 9 Feb '22 - 03:01 »
Just tested the latest version, found that it crashes for some radio stations with Discogs enabled.
Also, rarely shows covers (again for radio stations).  :(

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #27 on: 10 Feb '22 - 10:20 »
-snip- See latest post.

Okay so I've learned that the normal practice is for the big image to be broken up into smaller packets and I had to go through and assemble the BASE64 first then decode it, then interpret the decoded data to get the image details. Bit of a mystery why that one batch of files does not split it up like it should, but I do like the fact that the initial Opus file I got working was actually the messed up one.
Most of the Opus files I have now work. @sveakul, two of the ones you sent don't work despite the BASE64 size being the correct size, so I'm thinking the problem is either my BASE64 decode method is causing problems or my method for reading it is wrong. Either way I will have to get Ian or someone else to look at it as I doubt I'll get better than the current implementation by myself.

Crashes should hopefully be fixed as I was doing buffer overflow stuff which should now be sorted when reading Opus tags.

The Embedded Streaming Url option was having issues working out if it was turned on or not, it's not longer an option (although it shows in the list for fun) so if auto cover download is enabled it will always try and retrieve Urls in while streaming music. Looks like the Opus checks was interfering in the process as well for some bizarre reason, but hopefully it won't do that anymore, testing shows it working okay for me. @garson if you still have issues with some stations let me know.

Discogs changed their website and borked the method I use, no idea how to do it properly at the moment but I have put in a fix of sorts, it will no longer crash and it will still retrieve an image if there are matches but it will not be the full quality image we got before. I'll review it in future or just replace Discogs entirely with something else.
« Last Edit: 11 Feb '22 - 06:59 by Keltic Danor »

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #28 on: 10 Feb '22 - 11:00 »
Thanks Keltic Danor.

No crashes with Discogs but... weird behavior.
Elvis Costello - Watching the detectives, no album cover, it's well known song.

On other radio station, it was some song from Don Henley, it loaded cover Prince - Space. What's even more weird, on same station it's loading just that one cover for any song.  ???

Radio stations I use are:
https://usa6.fastcast4u.com/proxy/bigfeat2?mp=/1
Asterisk Radio

http://stream.radioparadise.com/flacm
Radio Paradise (flac)

http://stream.radioparadise.com/mellow-flacm
Radio Paradise Mellow Mix (flac)

http://stream.radioparadise.com/rock-flacm
Radio Paradise Rock Mix (flac)


Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #29 on: 10 Feb '22 - 11:35 »
Radio stations I use are:
https://usa6.fastcast4u.com/proxy/bigfeat2?mp=/1                    Asterisk Radio
http://stream.radioparadise.com/flacm                    Radio Paradise (flac)
http://stream.radioparadise.com/mellow-flacm                    Radio Paradise Mellow Mix (flac)
http://stream.radioparadise.com/rock-flacm                    Radio Paradise Rock Mix (flac)
I'm guessing the discogs lookup is just unreliable now using my quick fix, I'll have a look and just go ahead and replace it with something else, if you have any suggestions I'm all ears.
I was a bit confused at first but it seems the flac streams from radioparadise don't have coverart urls embedded like the aac streams do, wonder why that is.

The above post has been updated with a minor fix to make embedded urls in streams work even if you don't have any other cover art source enabled.

Edit: Actually looking at things again there seems to be decent API's for Discogs, Spotify, Musicbrainz and Last.fm so I may review and add those in the coming few days.
« Last Edit: 10 Feb '22 - 17:27 by Keltic Danor »

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #30 on: 10 Feb '22 - 17:51 »
Radio stations I use are:
https://usa6.fastcast4u.com/proxy/bigfeat2?mp=/1                    Asterisk Radio
http://stream.radioparadise.com/flacm                    Radio Paradise (flac)
http://stream.radioparadise.com/mellow-flacm                    Radio Paradise Mellow Mix (flac)
http://stream.radioparadise.com/rock-flacm                    Radio Paradise Rock Mix (flac)
I'm guessing the discogs lookup is just unreliable now using my quick fix, I'll have a look and just go ahead and replace it with something else, if you have any suggestions I'm all ears.
I was a bit confused at first but it seems the flac streams from radioparadise don't have coverart urls embedded like the aac streams do, wonder why that is.

The above post has been updated with a minor fix to make embedded urls in streams work even if you don't have any other cover art source enabled.

Edit: Actually looking at things again there seems to be decent API's for Discogs, Spotify, Musicbrainz and Last.fm so I may review and add those in the coming few days.

I've changed streams to aac, and now I can see cover art. But new issue, when I play a stream, and it dowloads (initial) cover, it doesn't change for new songs. ???

As for cover art sources, I've looked a bit onlinem found Musicbrainz as well. You can take a look at www.allmusic.com as well.

sveakul

  • Posts: 157
Re: Import Music Stream Album Art?
« Reply #31 on: 10 Feb '22 - 22:13 »
@Keltic:  Thanks very much for .87.  About 50% of Opus still doesn't display, but that sure beats 100% like it was before you worked on it.  And as far as I can tell, FLAC is TOTALLY fixed.  I appreciate all your hard work!

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #32 on: 11 Feb '22 - 07:05 »
-snip- see latest post, releasing properly soon.

Discogs is fixed and should work much better than before, Last.fm added again and they both seem to work quite well.
MusicBrainz also added but I didn't have much success getting a lot of album covers, I do get some cover art but nothing significant, it also seems a little slow. It's plausible I'm looking things up incorrectly but until someone tells me otherwise I'll just assume that's how it is.
This should also fix the issue of it not fetching new covers when a new song plays on stream.
@garson An odd thing you will find is when you play your "Asterisk Radio" the plugin will go and try and fetch the first thing it sees, which just happens to always get matches for "Prince - Space" ;D it should only show for a second so I'm not going to worry about it but figured I'd let you know that you'll be seeing it again sometime.
« Last Edit: 12 Feb '22 - 16:08 by Keltic Danor »

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #33 on: 11 Feb '22 - 13:32 »
Hey Keltic Danor.

Just tried latest version, I see last.fm and Musicbrainz in the menu, but still doesn't work for me. Asterisk radio still gives me Prince-Space, though cover is in high res now compared to previous version.
Tried with Radio Paradise, still doesn't change cover when song changes.  ???

Also, noticed something, there might be space for improvement. When I change "tabs" from Visuals to Messages/File Info, and back, looks like it downloads cover again (I see Downloading message)?

And one more question, about Radio Paradise flac, since it doesn't have embedded cover arts, why it doesn't try to search online? I would assume that if there's no embedded cover, plugin should try to search online?

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #34 on: 11 Feb '22 - 13:51 »
Can you attach your vis.ini & xmplay.ini for me to try? Maybe its a setting related issue I can check out. Alternatively you can delete all coverart settings in vis.ini instead and try again, maybe try the latest stuff version too just in case.

Not much I can do about the reloading issue as the plugin is being reloaded, one option is to use a skin with the visual display also in the main window (if only small) so it keeps the plugin loaded. What skin are you using? I can do a tweak to it to achieve the same effect without having it visible.

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #35 on: 11 Feb '22 - 14:09 »
Can you attach your vis.ini & xmplay.ini for me to try? Maybe its a setting related issue I can check out. Alternatively you can delete all coverart settings in vis.ini instead and try again, maybe try the latest stuff version too just in case.

Not much I can do about the reloading issue as the plugin is being reloaded, one option is to use a skin with the visual display also in the main window (if only small) so it keeps the plugin loaded. What skin are you using? I can do a tweak to it to achieve the same effect without having it visible.
I am currently on my work laptop, and I can't see vis.ini  ::) I know I have it on my private laptop.
How can I create it?

As for reloading plugin, is this something that Ian could help with? I am using Delta Black skin.
https://support.xmplay.com/files_view.php?file_id=669

I can send you xmplay.ini if needed.

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #36 on: 11 Feb '22 - 14:13 »
Vis.ini should just be made by itself by xmplay when using visual plugins so it must be somewhere.  ??? You aren't having to enable auto downloads everytime you start XMPlay right?
« Last Edit: 11 Feb '22 - 14:29 by Keltic Danor »

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #37 on: 11 Feb '22 - 15:16 »
Weird. I found vis.ini in AppData folder, xmplay folder is in ProgramFiles x86, guess something with Admin permissions.

So I have only this in vis.ini
[coverart]
acd_enabled=1
acd_services=15
acd_searchwith=7

Let me know if you need xmplay.ini as well

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #38 on: 11 Feb '22 - 15:33 »
Weird. I found vis.ini in AppData folder, xmplay folder is in ProgramFiles x86, guess something with Admin permissions.

So I have only this in vis.ini
[coverart]
acd_enabled=1
acd_services=15
acd_searchwith=7

Let me know if you need xmplay.ini as well
Interesting... can you try and turn off "Search with: Title" and see what happens?

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #39 on: 11 Feb '22 - 16:10 »
Yeah, works with "Search with: Title" turned off.
But I would thought that more precise search is with Title as radio streams are usually Artist - Title.
Which leads me to Asterisk radio, several minutes ago it was Rolling Stones - Paint it black, cover was wrong, got "Paint it black: An Alt Country Tribute to the Rolling Stones"  ;D


garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #40 on: 11 Feb '22 - 16:33 »
More interesting results, Heart - Love Alive , got cover of something called "Paul Heart's Fire N' Love"  ;D

But this one, can't describe with words.  ;D ;D ;D
« Last Edit: 11 Feb '22 - 16:50 by garson »

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #41 on: 11 Feb '22 - 17:16 »
Yeah, works with "Search with: Title" turned off.
But I would thought that more precise search is with Title as radio streams are usually Artist - Title.
Which leads me to Asterisk radio, several minutes ago it was Rolling Stones - Paint it black, cover was wrong, got "Paint it black: An Alt Country Tribute to the Rolling Stones"  ;D
Not so much no, you see if you have Title selected it tries to use the real title of the stream (E.g. ...api.discogs.com/database/search?q=Asterisk%20Radio) instead of... say... ...api.discogs.com/database/search?q=Steely%20Dan%20-%20Midnite%20Cruiser.
With streams it isn't a factor since there is no Artist/Album/Song fields, just one "Track" field that has both Artist - Song so it uses that instead. If we are talking local files then they have the album set most of the time anyway so it isn't a problem there either so it's largely unnecessary.

It goes with the first result it gets from the API's without looking too much into it, I could add extra checks to try and verify it is the correct artist/track but it will be a little tricky due to the whole one "Track" field thing as any song or artist with a - in it immediately throws a spanner in the works. The searches are almost all wildcards so if it cant find the perfect match it will find the next best thing including those words.

Can put it down to the plugin becoming sentient and suggesting other things if you like, after all, sure looks like they were winning in the picture right?? :P

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #42 on: 11 Feb '22 - 17:37 »
As for reloading plugin, is this something that Ian could help with? I am using Delta Black skin.
https://support.xmplay.com/files_view.php?file_id=669
Hmmm... that skin you have was not on the support site, I had to go digging for it on the forum. I'll update the archive on the support site as we don't want to lose skins.
I'll modify it accordingly and send it to you.
« Last Edit: 11 Feb '22 - 17:58 by Keltic Danor »

garson

  • Posts: 181
Re: Import Music Stream Album Art?
« Reply #43 on: 12 Feb '22 - 11:31 »
Not so much no, you see if you have Title selected it tries to use the real title of the stream (E.g. ...api.discogs.com/database/search?q=Asterisk%20Radio) instead of... say... ...api.discogs.com/database/search?q=Steely%20Dan%20-%20Midnite%20Cruiser.
With streams it isn't a factor since there is no Artist/Album/Song fields, just one "Track" field that has both Artist - Song so it uses that instead. If we are talking local files then they have the album set most of the time anyway so it isn't a problem there either so it's largely unnecessary.
Ah right, I completely missed the fact that Title in case of radio station is the name of the station.  :)

Quick question about plugin. I just noticed that with Paradise radio that has embedded covers, I have 3 options to select cover from, embedded, Discogs and LastFm.
Does this mean that even stream has embedded cover, it downloads from other sources?
« Last Edit: 12 Feb '22 - 11:44 by garson »

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #44 on: 12 Feb '22 - 16:13 »
-snip- released, see github or included read me file for final changes.

Assuming testing goes well I'll be releasing it properly on the support site and such, so let me know if anything drastic explodes. This update should in theory fix the last remaining issues in the Opus support, all the ones I have work fine now. The code is probably hilariously inefficient but working > efficient so I'm okay with that. :P


Quick question about plugin. I just noticed that with Paradise radio that has embedded covers, I have 3 options to select cover from, embedded, Discogs and LastFm.
Does this mean that even stream has embedded cover, it downloads from other sources?
Yes, but you are right if it already has one it probably doesn't need to keep going. I'll put that change in later on. Edit: Or at least make it optional.
« Last Edit: 13 Feb '22 - 08:40 by Keltic Danor »

sveakul

  • Posts: 157
Re: Import Music Stream Album Art?
« Reply #45 on: 12 Feb '22 - 19:22 »
Keltic:  tested .89 against a couple dozen Opus files with embedded art and "all, save one," displayed perfectly.  The single example that didn't display also crashed the plugin, but if there was going to be any bad 'uns it would have been that file, which I had used in the past for all kinds of testing/editing/re-adding/sizing artwork, etc.  Simply deleting and re-adding the picture frame with the Kid3 tagger fixed it.  So I would consider .89 a "go" for Opus!  Of course if I run across any future anomalies I'll let you know.

I'll let the others who do auto-retrieve art via the Internet test that part.  THANKS for taking this old plugin to a whole new level!

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: Import Music Stream Album Art?
« Reply #46 on: 13 Feb '22 - 08:39 »
rev 9 Change log
  • Itunes website based cover art lookup added
  • Discogs, Last.fm & MusicBrainz API webservice cover art lookups added
  • Existing old cover art sources removed due to no longer working
  • Streams with embedded url for cover art now supported, requires the latest XMPlay version
    • Also added an option to continue searching for other cover art even if an embedded url is present
  • Support for Opus with cover art embedded in meta data
  • Support for Flac with cover art embedded in meta data tweaked
  • New manual vis.ini setting for background color
    • [coverart]
      acd_backr=12
      acd_backg=98
      acd_backb=255
  • cover.png and download.png added to archive to better indicate it is possible to do so

Update has been packed up and put on the support site, I think it is stable enough now.
Cover Art (revision 9)
Patched GitHub source & release for revision 9 here

rev 8 References
Old release and source is still available as per Bernhard's GitHub here:
Original GitHub source & release for revision 8 here