A basic PHP app with bootstrap template to browse the contents of a miniDLNA database
You will need at least PHP 8.x, php-cli with sqlite3 support, and composer on the machine where your miniDLNA runs
-
Clone this repository to the machine where your miniDLNA runs
git clone https://github.com/gnanet/minidlna-browser-php.git
-
Use the sample config file
example.envsave it as.env, and fill in the variables.DATABASE='path-to-the-location-of/files.db' BASE_URL ='http://IP-ADDRESS-TO-MINIDLNA:8200/MediaItems/' ROOT_ID='64' PFW_URL='' PFW_CMD='' MPV_PLAY_URI=0Optional: If
PFW_CMDandPFW_URLis set, additional info and clipboard link is shown below video-items.DATABASE='path-to-the-location-of/files.db' BASE_URL ='http://IP-ADDRESS-TO-MINIDLNA:8200/MediaItems/' ROOT_ID='64' PFW_URL='http://127.0.0.1:8201/MediaItems/' PFW_CMD='ssh -L L8201:IP-ADDRESS-TO-MINIDLNA:8200 your-ssh-user@your-gateway-host-to-minidlna' MPV_PLAY_URI=0Optional: with
MPV_PLAY_URIset to1, you can enable a custom-uri scheme, and display the respective urls, which allows calling mpv for playback directly from the browser NOTE: This works on moderately recent versions of Linux, you will need to installmpv, and addscripts/mpv-handler.desktopto your~/.local/share/applications, and placescripts/mpv-handler.shinto/usr/local/bin/DATABASE='path-to-the-location-of/files.db' BASE_URL ='http://IP-ADDRESS-TO-MINIDLNA:8200/MediaItems/' ROOT_ID='64' PFW_URL='' PFW_CMD='' MPV_PLAY_URI=1 -
Use composer to install the required dependencies:
$ composer install
-
Start the app with the built-in server of PHP (usually this app should only be used by you) :
$ php -S 0.0.0.0:8299 browser.php -
Navigate to the URL, replace
IP-ADDRESS-TO-MINIDLNAwith the IP address of your miniDLNA serverhttp://IP-ADDRESS-TO-MINIDLNA:8299/ -
Navigate trough the folders structure, to see the content list of the miniDLNA server.
-
For video and audio media types there are clipboard-icons that you can click to copy either the LAN URL, or if it was set, the URL for Portforwarded connections, which you can use to open them in your mediaplayer of choice.
- danielroseman/minidlna-browser the python / Flask appication
- gnanet/minidlna-browser customized fork by me