Skip to content

Conversation

TheUnifox
Copy link
Contributor

Report the AlbumTitle, and get the thumbnail from cache. use default thumbnail if none exists in cache.

This would allow vlc to be used as a music app for stream overlays that read from the api, and need a thumbnail image. I'm using the album title to report a link to the song for the song command

Report the AlbumTitle, and get the thumbnail from cache. use default thumbnail if none exists in cache.
@spmn spmn merged commit 954927b into spmn:master Oct 5, 2024
@spmn
Copy link
Owner

spmn commented Oct 5, 2024

Thanks for the contribution! I will create a new release soon with the updated binaries for easier distribution.

Also, while briefly testing it, I stumbled upon a little issue, so I will let it here in case me or someone else would ever like to take a look at it: the first time a new song comes up, the default image is sent over to SMTC instead of the actual album art. I would guess that happens because the image has not been cached by VLC yet, and VLC extract the image asynchronously. That would explain why going back and forth through the playlist "fixes" the issue. Maybe there is a VLC callback for artwork processing that we could use to push the correct image, or worst case scenario -- keep polling from time to time.

@spmn spmn mentioned this pull request Oct 5, 2024
@TheUnifox
Copy link
Contributor Author

Ya, it's nice that vlc auto downloads most thumbnails, ever for not very well known artists. Once it does download and cache it reports it, until it has one it just reports the default. I honestly have no idea how to make plugins for vlc, I just looked at what was there and inferred lol. If there is something for when the image gets cached that would be good, just send another report with the image. There is an occasional crash where it seems an empty art uri slips through without being changed to the default.

@spmn
Copy link
Owner

spmn commented Oct 6, 2024

Crashes are the most annoying things.

Where/when exactly does it crash? Is it a crash due to operating on invalid inputs or is it just some unhandled C++ expression from the WinRT layer? Do you have any consistent way of reproducing the problem?

@TheUnifox
Copy link
Contributor Author

Based on checking what file path is being used when it crashes, it seems like the file path being passed is empty. Which normally an empty path would be caught and set to the default. But somehow an empty path sometimes slips through and causes a crash due to the file stream not being able to access it.

@spmn
Copy link
Owner

spmn commented Oct 6, 2024

It is ok, I've added some extra checks to make sure most (all?) error paths are handled gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants