MiniDLNA not reading media from USB drive, but Kodi can - how to fix this?

  • I'm running Generic.x86_64-8.90.004 and I've added music and movie files to Library from the attached USB drive.

    I'm using BubbleUpNP to control the playback, so I select "Kodi (LibreELEC)" as my Library and "Kodi (LibreELEC)" as my Renderer. I have other Renderers on my network (Sony Blueray player and Sony Receiver). My media files (music and movies are organised in folders. The problem I have is that I cannot make Kodi broadcast only the folder structure for browsing and playback.

    Note, that BubbleUPNP displays only what Kodi broadcasts across DLNA/UPNP network.


    1) When I open Kodi library in BubbleUPNP, I get 2 menu items - 1) Music Library and 2) Video Library.

    2) When I open Video Library link, I get 3 sub-folders (categories) - Movies, Files and Playlists.

    3) I don't care for Categories, Genres and Playlists, I want to see only one option - FILES, which shows me the folders

    4) When I open Music Library link, I get 13 sub-folders (categories) - Genres, Artists, Albums ... but there's NO option to browse ALL FILES


    Is there and add-on that works as a wrapper to configure that?

    Edited once, last by bpr323 ().

  • The problem I have is that I cannot make Kodi broadcast only the folder structure for browsing and playback.


    You are already giving the answer to your own question:


    Note, that BubbleUPNP displays only what Kodi broadcasts across DLNA/UPNP network.


    UPnP/DLNA in Kodi only provides the scraped items (video/music) which are in both libraries. It does not send out the folders and files themselves.


    If you only want the folders and files, use a simple UPnP server like ReadyMedia (formerly MiniDLNA).

  • Thank you!

    I've installed the MiniDLNA and it's up and running. I can also see it in the list of media servers on my BubbleUPNP controller - all good so far.


    However, when I connect to it on http://192.168.1.35:8200/#remote, there's 0 files in the library.


    In other words, MiniDLNA is running in parallel to LE's built-in media server, but media files are all scanned to LE default media server's Library.

    There's no option to choose which media server I want to use.

    How do I tell Kodi to scan media files to MiniDLNA Library instead?

  • Please, I'm a beginner and need some help.

    I've successfully installed MiniDLNA as a legitimate add-on, and it works.

    So how do I scan media files to MiniDLNA Library using LibreELEC menu?


    I'm guessing I'll need to edit 2 or more conf files in order to:

    a) turn off LE's media server and its Library, and

    b) map media folders as sources for MiniDLNA Library

    c) make sure when I select "re-scan" from LE menu it scans media folders to MiniDLNA Library


    Could you please tell me the path(s) to the right files and how to achieve c) ?


    Thank you

  • I've successfully installed MiniDLNA as a legitimate add-on, and it works.

    So how do I scan media files to MiniDLNA Library using LibreELEC menu?

    That sounds like a great chicken-and-egg situation...


    MiniDLNA is to work independently from Kodi as a file server. You could create OS mounts for your media files for MiniDLNA to use.


    Kodi should scan/scrape sources that use SMB, NFS or any other of the file protocols. UPnP/DLNA is not one of them.

  • Hi Klojum, could you please expand on this - "You could create OS mounts for your media files for MiniDLNA to use."

    My media files are on a mounted USB drive named WD3Tb


    My (Library fully working) \\LIBREELEC\Userdata\sources.xml file reads:

    - <music>

    <default pathversion="1" />

    - <source>

    <name>Music</name>

    <path pathversion="1">/media/WD3Tb/MUSIC/</path>

    <allowsharing>true</allowsharing>

    </source>

    </music>


    I'm editing \\LIBREELEC\Userdata\addon_data\service.minidlna\config\minidlna.conf like so:

    media_dir=A,/media/WD3Tb/MUSIC

    inotify=yes

    friendly_name=MiniDLNA


    when I look in service.log

    [2018/09/18 00:14:19] /storage/jenkins/workspace/Addons/All_Add-ons/build.LibreELEC-Generic.x86_64-9.0-devel/minidlna-138d03d/minidlna.c:668: error: Media directory "A,/media/WD3Tb/MUSIC" not accessible [No such file or directory]


    What am I doing wrong in the minidlna conf file?

    Edited once, last by bpr323 ().

  • Create local filesystem mounts for the remote SMB/NFS shares; then both Kodi and MiniDLNA are using the same sources (independently.. no interaction between the apps). Look at the systemd .mount examples in /storage/.config/systemd

  • I've installed the MiniDLNA from the official add-on repo - after updating to the latest Milhouse 9.0

    MiniDLNA works, but it is unable to scan media files on my USB drive (WD3Tb) - which Kodi library scans without a problem, though.


    I've edited the minidlna.conf in \\LIBREELEC\Userdata\addon_data\service.minidlna\config\

    Kodi uses /media/WD3Tb as path to my USB in Library Sources for videos and music, so I used the same path to configure Minidlna.


    media_dir=/media/WD3Tb


    This doesn't work. Looking at service.log there's an error - [2018/10/14 17:10:29] /storage/jenkins/workspace/Addons/All_Add-ons/build.LibreELEC-Generic.x86_64-9.0-devel/minidlna-138d03d/minidlna.c:668: error: Media directory "./var/media/WD3Tb" not accessible [No such file or directory]


    From Chewitt's explanation above, I vaguely understand that the issue is caused by Minidlna "user" not granted same read permissions as Kodi on the /media/* folder, which is a virtual directory. OR there's some problem with the way my USB drive is mounted/configured for Kodi and Minidlna.


    I log in with SSH as root, but also get an error:

    LibreELEC:~ # /dev/disk/by-label/WD3Tb

    -sh: /dev/disk/by-label/WD3Tb: Permission denied


    Worst of all, playing a song directly in Kodi, it starts playing then stops

    Checking miniDLNA service.log - there's an error:

    /storage/jenkins/workspace/Addons/All_Add-ons/build.LibreELEC-Generic.x86_64-9.0-devel/minidlna-138d03d/upnphttp.c:1065: warn: HTTP Connection closed unexpectedly.


    1) Could someone please provide the commands I need to run in SSH - step by step for Minidlna to be able scan my USB?


    2) And what's causing the "closing of HTTP connection" - how do i fix this?

    Is Milhouse 9.0 update causing this, and should I reinstall from scratch the stock LibreELEC-Generic.x86_64-8.90.006.img??

  • bpr323

    Changed the title of the thread from “How to make Library to show files and folders ONLY to remote control points for browsing and playback?” to “MiniDLNA not reading media from USB drive, but Kodi can - how to fix this?”.
  • I've installed from zip the correct minidlna service add-on for Milhouse 9.0 build, on top of the generic add-on from official LE repo

    I got the zip from CVH's repository here - http://cvh.libreelec.tv/addons/9.0/minidlna/generic/

    Kodi reported on UI that "Minidlna add-on was updated successfully"


    Upon further investigation, there are 2 separate "minidlna.conf" files on the system:


    LibreELEC:~ # find . -name minidlna.conf

    ./.kodi/addons/service.minidlna/config/minidlna.conf

    ./.kodi/userdata/addon_data/service.minidlna/config/minidlna.conf


    I've changed the friendly name to XYZ in the "userdata" conf to test which of the two conf's is taking effect

    My BubbleUPNP controller correctly reports there are 2 media servers available - XYZ and Kodi (LibreELEC).

    The "DLNA Server" used in the other conf - in "addons" folder, doesn't show up on the network, and it's not having any effect.

    QUESTION - What is the purpose of the minidlna.conf in the "addons" folder if the minidlna.conf in "userdata" overrides it?


    The service.log in "userdata" after minidlna killall and restart reads that:

    /storage/jenkins/workspace/Addons/All_Add-ons/build.LibreELEC-Generic.x86_64-9.0-devel/minidlna-138d03d/upnphttp.c:1065: warn: HTTP Connection closed unexpectedly


    The error "HTTP Connection closed unexpectedly" (and stoppage of Kodi playback after 30 sec) which started with "official" 8.2 version of MiniDLNA add-on, persists with CVH's version of minidlna service for Milhouse 9.0

    Could someone please help me here?

    Edited once, last by bpr323 ().