Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gnanet/minidlna-browser-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniDLNA Database Browser - PHP app

A basic PHP app with bootstrap template to browse the contents of a miniDLNA database

Prerequisites

You will need at least PHP 8.x, php-cli with sqlite3 support, and composer on the machine where your miniDLNA runs

Installation

  1. Clone this repository to the machine where your miniDLNA runs

    git clone https://github.com/gnanet/minidlna-browser-php.git
  2. Use the sample config file example.env save 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=0
    

    Optional: If PFW_CMD and PFW_URL is 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=0
    

    Optional: with MPV_PLAY_URI set to 1, 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 install mpv, and add scripts/mpv-handler.desktop to your ~/.local/share/applications, and place scripts/mpv-handler.sh into /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
    
  3. Use composer to install the required dependencies:

    $ composer install
    

Usage

  1. 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
    
  2. Navigate to the URL, replace IP-ADDRESS-TO-MINIDLNA with the IP address of your miniDLNA server

    http://IP-ADDRESS-TO-MINIDLNA:8299/
    
  3. Navigate trough the folders structure, to see the content list of the miniDLNA server.

  4. 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.

Acknowledgments

Libraries

Bootstrap template

Initial ideas

About

PHP app to browse the contents of a minidlna database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors