resources/gallery.json is the single source of truth for your media library. When a DLNA client browses the server, the server reads this file and returns the list of videos it contains. To add, remove, or update videos, edit this file and restart the server.
Schema
The file has two top-level keys:metadata and videos.
metadata
The
UpdateID sent to DLNA clients. Increment this value whenever you change your library so clients know to refresh their cached view.The total number of video items in the library. This value is sent to clients as
TotalMatches in Browse responses. It should always match the length of the videos array.videos
The list of video items the server advertises to clients.
Example
resources/gallery.json
Important notes
totalVideosmust matchvideos.length— if the values differ, some clients will display incorrect counts or fail to display all items.- The file is read at startup — changes to
gallery.jsondo not take effect until you restart the server. - IDs must be unique — duplicate
idvalues will cause undefined behavior in DLNA clients.