Small issue in O!MPD with missing slash Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
pinkdot
Posts: 1
Joined: Tue Apr 13, 2021 2:56 pm

Small issue in O!MPD with missing slash

Post by pinkdot »

Hi,

Currently installed O!MPD on 2 RPI4's running Dietpi. Both are great pieces of software! Its great to see that Dietpi is offering O!MPD for the Raspberry with a single click.

I noticed a small issue on both installations in the config file of O!mpd: /var/www/ompd/include/config.local.inc.php
O!MPD lets you browse the mounted media dir specified in the config file

Code: Select all

# Media dir
$cfg['media_dir']                   = '/mnt/dietpi_userdata/Music';
Opening the 'Files' tab in O!MPD results in an error: DIR: /mnt/dietpi_userdata/Musi/ Unable to open
Looking at the source code of O!mpd it also has a trailing slash: https://github.com/ArturSierzant/OMPD/b ... nc.php#L52
Adding a trailing slash solves this issue.

Code: Select all

# Media dir
$cfg['media_dir']                   = '/mnt/dietpi_userdata/Music/';
Greetings, Martin
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Small issue in O!MPD with missing slash

Post by Joulinar »

thx for sharing, let me run some test to see how it is going 8)



EDIT
I created a PR to have it fixed https://github.com/MichaIng/DietPi/pull/4271
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: Small issue in O!MPD with missing slash

Post by MichaIng »

Many thanks for reporting that issue. The fix has just been merged for DietPi v7.1.
Post Reply