Supporting multiple sizes of thumbnails larger than JPEG_TN (160x160)
Brought to you by:
jmaggard
I'm heavily using ReadyMedia for long time and satisfied for this except for poor resolution of the thumbnail like other users. (#153 #70)
It seems that the reason why the thumbnail is too small is JPEG_TN(160x160) is mandated for the thumbnail format to provide in DLNA specification.
On the other hand, DLNA spec expects multiple image formats if it includes JPEG_TN.
I created a patch to support multiple resolution thumbnails against ReadyMedia 1.3.0.
I only tested with a few DLNA clients on Windows and Android.
After patching I noticed this error when starting
minidlna -R
with >1000 db files and some thumbs inside.Related to:
minidlna.c/init()
Hmm, sounds strange if you are not running multiple copies of minidlnad simultaneously.
As you mentioned, it's clearly the failure of
rm -rf
command, which 1) scans the directory and 2) remove files and then 3) remove parent directory. If some new files are created between 1) and 3), such failure may occur.This patch will increase the number of thumbnail cache files to 4 times more, for JPEG_{LRG,MED,SM} and JPEG_TN, and some of them are hard-linked if the image is identical (content and size).
Investigating, it looks an outside to minidlnad problem, not related, because running manually
rm -rf art_cache files.db
bring to the same issue into the same specific directoryIt seems that the directory involved, creating 120 thumb files, fails first removal (16 files remaining) then gives successful result retrying with the remaining files...
Same issue happens deleting dir through samba.
It is an inode issue coming from NetUSB driver on my router storage device. confirmed by
dmesg
trace error log.we got another approach to this problem here: https://sf.net/p/minidlna/patches/153/
Last edit: Sérgio M. Basto 2021-12-20
I saw that patch, but in that thread, on 2016-01-27 by Darkvater, an issue about conformance to DLNA spec is posed as follows:
My patch is to just reincarnate this idea to the latest impl of readymedia.
Last edit: Akihiro Nomura 2021-12-20
Hello, I also use minidlna for long time .
I'm trying collect some nice features that aren't in official repo here https://sourceforge.net/p/minidlna/git/merge-requests/37/ I'm planing include your patch soon . If you want to help you are welcome , you may send me pull request as well .
Thank you
Last edit: Sérgio M. Basto 2021-12-21