Come aggiungere un'immagine
Puoi aggiungere le tue immagini personalizzate per le cartelle e le playlist, in modo che l'interfaccia visualizzi miniature personalizzate anziché le immagini predefinite generiche.
Questa guida spiega:
- quali formati immagine sono supportati
- come nominare le immagini
- dove posizionare questi file
- cosa succede quando manca l'immagine di una playlist
Formati di immagine supportati
UMS supports these image formats for folder and playlist artwork:
webppngjpegjpgbmpgif
Cartella
Per impostare un'immagine di una cartella, posiziona un file immagine chiamato cartella.ext all'interno della cartella stessa.
Sostituisci .ext con una delle estensioni supportate.
Esempi:
cartella.webpcartella.jpgfolder.png
Use existing filenames such as cover.jpg
You can define alternative names for folder artwork. To look for
cover.jpg or front.png, add this line to UMS.conf in your UMS profile folder, then restart UMS.
folder_thumbnail_names = cover, front
Enter the names without file extensions and separate them with commas. Matching ignores
capitalization, so cover also matches Cover.JPG.
With this setting, UMS looks for folder.* first, then cover.*, then front.*, and finally
supported images with albumart in the filename. Leave the setting empty to use the standard
folder artwork lookup.
The selected image can also serve as fallback artwork for tracks in the folder and for local playlists in the same directory.
Playlist
Per impostare l'immagine di una playlist, usa lo stesso nome file della playlist.
Esempio
- File playlist:
Jazz.m3u8 - File immagine:
Jazz.jpg(oppureJazz.webp,Jazz.png, e così via)
For a local playlist, UMS checks these sources in order.
- An image with exactly the same base filename as the playlist, such as
Jazz.jpgforJazz.m3u8. - Artwork assigned to that playlist through a compatible control point.
- The directory's artwork, which can come from
folder.*, a name infolder_thumbnail_names, or analbumartimage.
Esempio di struttura cartelle
Utilizzare il seguente come riferimento:
Musica/
|-- cartella.jpg
|-- Jazz/
| |-- cartella.png
| |-- Jazz.m3u8
| |-- Jazz.jpg
| |-- Smooth.m3u8
| `-- smooth-track01.mp3
`-- Rock/
|-- folder.webp
|-- RockHits.m3u8
`-- track01.mp3
In questo esempio:
Musica/cartella.jpgè l'immagine per la cartella radiceMusica.Musica/Jazz/cartella.pngè l'immagine della cartellaJazz.Musica/Jazz/Jazz.jpgè l'immagine per la playlistJazz.m3u8.Musica/Jazz/Smooth.m3u8non ha un'immagine corrispondente chiamataSmooth.*, quindi sarà utilizzata della cartellaJazz.
Web streams inside a playlist
The naming rules above work because there is a file to put the image next to. An internet radio
station or any other web address listed in a playlist has no such file, so it needs a different way
to carry its artwork: a #EXTIMG: line that points at the picture.
Put the line directly above the entry it belongs to, the same way #EXTINF: works. It applies to
the next entry only, so each stream gets its own line:
#EXTM3U
#EXTINF:-1,Jazz Radio
#EXTIMG:https://example.com/stations/jazz-radio.png
http://stream.example.com/jazz.mp3
#EXTINF:-1,Rock Radio
#EXTIMG:https://example.com/stations/rock-radio.jpg
http://stream.example.com/rock.mp3
UMS downloads the image once, stores it, and uses it for that stream from then on. It does not fetch it again on every start.
What the line accepts:
- An absolute address.
https://example.com/cover.pngworks,cover.pngand../art/cover.pngdo not — a relative path is ignored and the stream keeps the default image. - A
data:URI, if you would rather keep the picture inside the playlist file than host it somewhere. - Only
.m3uand.m3u8playlists. Other playlist formats have no place to put the line.
Capitalization of the directive itself does not matter, #EXTIMG: and #extimg: both work.
Letting UMS write the line for you
If your control point can set the artwork of an entry, you do not have to edit the playlist by hand.
UMS writes the #EXTIMG: line into the playlist file itself, and only after it has successfully
loaded the picture — so a broken address leaves the file untouched instead of storing a dead link.
Because the artwork then lives in the playlist file rather than only in the database, it survives a rebuilt database and travels with the file when you copy the playlist elsewhere.