Cannot access embedded album artwork on UWP
Summary
On UWP, attempting to get the embedded album art returns a useless attachment://
url instead of a URL/path to the image file.
Minimal project and steps to reproduce
The basic steps are:
var media = new Media(libvlc, file.Path, FromType.FromPath);
await media.Parse(MediaParseOptions.FetchLocal);
Debug.WriteLine("Artwork URL is: " + media.Meta(MetadataType.ArtworkURL));
I created a minimal project to reproduce this behavior here: jl3053/libvlc-sharp-uwp-artwork.
What is the current bug behavior?
media.Meta(MetadataType.ArtworkURL)
returns attachment://3
instead of the actual artwork file.
What is the expected correct behavior?
I would expect media.Meta(MetadataType.ArtworkURL)
to return the URL or path to the album artwork image. For a UWP app, I would expect either a ms-appdata:///
URL or the full path (somewhere in %LocalAppData%\Packages
).
Does it work on other platforms? Does it work with the official VLC apps?
On the official VLC Win32 app, ArtworkURL provides the artwork image in a format like %AppData%\vlc\art\artistalbum\<Artist name>\<Album name>\art.jpg
.
Relevant LibVLC logs and/or screenshots
Environment
- OS: Windows 11
- Version Version 22H2, Build 22621.1992
- Device: MSI MS-7C91
- LibVLC version and architecture: VideoLAN.LibVLC.UWP version 3.3.2 x64
- LibVLCSharp version: 3.7.0
Possible fixes
My guess is that the cache directory LibVLC is trying to store the artwork in might not be getting set correctly for UWP apps.