Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some documentation on how cover_url is meant to be used #38

Open
hasezoey opened this issue Nov 25, 2023 · 1 comment
Open

Add some documentation on how cover_url is meant to be used #38

hasezoey opened this issue Nov 25, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@hasezoey
Copy link

it would be great if there would be some documentation about MediaMetadata::cover_url, like what format it should be in, or if there is anything platform specific (and if needed what formats are supported, like recommending jpg?)

@Sinono3
Copy link
Owner

Sinono3 commented Nov 27, 2023

It is very platform specific. As of now, Souvlaki leaves it up to the user to change the URL depending on the platform.

For Linux, we follow the MPRIS specification, which actually doesn't say much cover art apart from what's in here. It only says that local files should start with file:// and that it should be an UTF-8 string, which is enforced by Rust. Maybe you can look in the source code of desktop managers such as GNOME or KDE, since these read the field to display it on their media player controls.

For Windows, we use the SystemMediaTransportControlsDisplayUpdater, which has a thumbnail property. It accepts multiple formats, but we choose to create it using an URI. If setting an URL starting with file://, the file is automatically loaded by souvlaki.

For MacOS, you can look into these lines of the implementation. These lines refer to creating an MPMediaItemArtwork object.

I hope this is of use to you. If you find a good way to put this information in the docs, consider opening a pull request 🙂

@Sinono3 Sinono3 added documentation Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants