-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Thanks for this app, I'm using it a lot with a synology nas and a debian/sid desktop and it works great.
About the small issue I'm having with minidlna and thumbnails:
with the synology dlna server I just put a jpg image with the same name of a video and the thumbnail is shown correctly in the directory listing (test.mp4 -> test.jpg)
on the debian server instead I'm using the minidlna package, lightweight and easy to setup, for my understanding it should support thumbnails (not sure but maybe the inotify option need to be enabled), it looks for basename + .cover.jpg (test.mp4 -> test.mp4.cover.jpg), if the .cover.jpg file exists it is indexed into a sqlite3 db (/var/cache/minidlna/files.db) table ALBUM_ART
select * from ALBUM_ART ;
1|/var/cache/minidlna/art_cache/var/lib/minidlna/test.mp4.cover.jpg
I captured a directory listing (below) and the thumbnail is listed and published correctly, I think the issue is something similar to one already fixed (838069b) but I'm not upnp expert, don't know how to fix this one yet, any suggestion where to look?
Thanks in advance
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><Result><DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/">
<item id="2$8$0" parentID="2$8" restricted="1" refID="64$1"><dc:title>test</dc:title><upnp:class>object.item.videoItem</upnp:class><dc:date>2014-11-04T04:37:50</dc:date><res size="19096399" duration="0:00:46.022" bitrate="414940" sampleFrequency="44100" nrAudioChannels="2" resolution="1920x1080" protocolInfo="http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_HP_HD_AAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000">http://192.168.2.210:8200/MediaItems/23.mp4</res><res protocolInfo="http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN">http://192.168.2.210:8200/AlbumArt/1-23.jpg</res></item></DIDL-Lite></Result>
<NumberReturned>1</NumberReturned>
<TotalMatches>1</TotalMatches>
<UpdateID>0</UpdateID></u:BrowseResponse></s:Body></s:Envelope>
edit
apparently minidlna pass the thumbnail as a resource (the second, the first is the video) not as a property, I got it working by adding one more fallback within createItemModel(), but I really don't know much about upnp and I don't think that's an optimal solution:
if (usableIcon == null) {
for (Res res: item.getResources()) {
String resValue = res.getValue();
if (resValue.endsWith(".jpg")) {
itemModel.setIconUrl(resValue);
break;
}
}
}