I added new files to the share that is used by my router’s minidlna service. For some reason, these files are not being indexed. I’ve tried restarting the daemon and disabling/enabling the service.
The log /var/log/minidlna.log doesn’t seem to indicate any issues:
# cat /var/log/minidlna.log
[2018/10/02 08:13:33] minidlna.c:1048: warn: Starting MiniDLNA version 1.2.1.
[2018/10/02 08:13:33] minidlna.c:1089: warn: HTTP listening on port 8200
[2018/10/02 08:29:54] minidlna.c:155: warn: received signal 15, good-bye
[2018/10/02 08:30:11] minidlna.c:1048: warn: Starting MiniDLNA version 1.2.1.
[2018/10/02 08:30:11] minidlna.c:1089: warn: HTTP listening on port 8200
Symptoms:
the new files are valid and can be played on a workstation with VLC
other files in the Series directory are listed and can be played (via DLNA client)
the files’ permissions in the Series directory are -rw-r--r--
the Movies directory is not visible to the service despite being drwxr-xr-x (the same as the Series folder)
all folders and files are owned by root
greps of /var/log/messages don’t find anything related to minidlna
The configuration file /etc/config/minidlna:
# cat /etc/config/minidlna
config minidlna 'config'
option port '8200'
option interface 'br-lan'
option db_dir '/var/run/minidlna'
option log_dir '/var/log'
option inotify '1'
option notify_interval '900'
option serial '12345678'
option model_number '1'
option root_container '.'
option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg'
option friendly_name 'Turris'
list media_dir 'V,/mnt/raid/Media/Movies'
list media_dir 'P,/mnt/raid/Media/Pictures'
list media_dir 'V,/mnt/raid/Media/Series'
list media_dir 'V,/mnt/raid/Media/Videos'
list media_dir 'A,/mnt/raid/Media/Music'
option enabled '1'
** edit 0 **
Adding an additional file to the Series folder (via FTP) causes the service to stop working:
** /edit 0 **
** edit 1 **
Deleting files from /Series does NOT cause a problem.
** /edit 1 **
I deleted the content of /var/run/minidlna directory (files.db,minidlna.pid), then restarted the service. The two files where recreated and the miniDLNA Status changed to include the file counts. However, when I added another file to /Series, the miniDLNA Status changed to read
very similar (or maybe the same) problem also here. Reported it in another topic, but now (finally had time to play with it a bit more), it seems that the problems are also just large files (videos) over approx 1 GP. Restart fixes it. Deleting works. And HDD is connected through PCIe adapter.
EDIT - plus, no idea why, in my case, there are no logs written…
log_dir=/var/log/minidlna/
log_level=debug
directory itself was created automatically (so minidlna has access there, is not a permision problem), but that is all…
Can it be caused ba locales? When I have taken a look into debug mode, there seems to be a lot of mixtures between en_us, en, utf8. I am not sure, however it seems crash is caused by inotify when uploading file with cz specific letters. I was reading your conversation at https://github.com/openwrt/packages/issues/10357 and if it is “parser” issue it might be a reason…
i had some issues in the past with miniDLNA indexing when i was using for example: list media_dir 'V,/mnt/raid/Media/Movies' together with RootContainer=standard, when i switched to “browser” container and redefined all list-media-dir to not use V/P/A attribute(with service restart), all went fine. Also try it first just with one folder first and add next later on , one-by-one and each time test it.
i assume you have rights and ownership correctly set, so minidlna actually can parse the subfolders/files >> if the mount is actually shared samba folder and files were uploaded using smb protocol you might have strange chmod/chown on files/folders preventing minidlna to access them.
Nevertheless my symptoms are following.
My prerequisite: Videos stored on mirroring RAID with BTRFS. Files shared over Samba Share.
MiniDLNA starts at startup and indexing fine. MiniDLNA works stable and reliable.
When uploading additional file over Samba Share from Windows station, MiniDLNA crash. I can restart MiniDLNA manually, however new files are not appearing MiniDLNA. Solution is to remove DB and restart service. Than it is properly re indexed including new files. Than it works stable until another file upload (note I am using inotify enabled to allow adding new files into db). Nevertheless, I should mention, sometimes uploaded file is added into db w/o crash successfully. I have suspicion it is related either to format or most likely just symbols in file name; however, I did not have time to investigate precisely.