sn0opy / mpd-webinterface Goto Github PK
View Code? Open in Web Editor NEWA PHP webinterface for music player daemon (mpd, linux)
A PHP webinterface for music player daemon (mpd, linux)
Hello,
it is a nice Webinterface. Unfortunately the umlauts are not displayed correctly. "Radio Köln" becomes "Radio K?ln". Where can I set the umlauts?
Best regards
Horst
I think it would be a nice feature to actually save your playlist when adding a new track (mpc save playlistname). Why:
I am building a wifiradio with only one playlist that always gets loaded as default. Now when I want to add a new station to it, I add the url to the playlist. After a restart of mpd this entry is gone though. So what I suggest is:
Simple multiple playlist management
or
Being able to set a default playlist which always gets loaded from and saved to.
Users / admins should be able to choose the streaming url e.g. from an Icecast server instead of the mpd integrated http streaming.
Openwrt + lighttpd, playing streams from di.fm:
The tracklist does not show, only player controls, when pausing the stream it does appear
While playing streams the length of the track is constantly zero so there is a permanent refresh, which would be fixed by this diff:
diff --git a/index.php b/index.php
index 2d7c02b..c7415df 100755
--- a/index.php
+++ b/index.php
@@ -37,8 +37,11 @@ if($mpd->connected == FALSE) {
$CURRENTTIME = convertSecs($times[0]);
// fucking dirty
- if($mpd->state != 'stop')
- echo '<script type="text/javascript">setTimeout("location.reload(true);", ' .((($times[1]-$times[0])*1000)+500). ');</script>'."\n";
+ if($mpd->state != 'stop') {
+ $refresh = ((($times[1]-$times[0])*1000)+500);
+ if($refresh < 1) { $refresh = 30500; }
+ echo '<script type="text/javascript">setTimeout("location.reload(true);", ' . $refresh . ');</script>'."\n";
+ }
if(isset($_POST['toadd'])) {
$object = $_POST['toadd'];
An admin should be able to dis- / allow controls etc. to provide only a few features to the users
As the artist and track data is not available for a stream while it's not playing the playlist entries are not displayed in this case.
This code should fix that issue by taking the Name of the entry.
As even the name is not available before the first play the filename (stream URL) is used to display this entry.
diff --git a/tpl/main.tpl.php b/tpl/main.tpl.php
index 798fc47..6b09eb2 100755
--- a/tpl/main.tpl.php
+++ b/tpl/main.tpl.php
@@ -44,7 +44,21 @@
</p>
<? } ?>
- <? } ?>
+ <? } elseif($song['Name'] != NULL) { ?>
+ <p class="songLine">
+ <a href="?a=remove&id=<?=$song['Id']?>" title="Remove this song" class="removeid">x</a>
+ <a href="?a=start&id=<?=$song['Pos']?>">
+ <?=$song['Name']?> <span class="label">(<?=$songtime?>)</span>
+ </a>
+ </p>
+ <? } elseif($song['file'] != NULL) { ?>
+ <p class="songLine">
+ <a href="?a=remove&id=<?=$song['Id']?>" title="Remove this song" class="removeid">x</a>
+ <a href="?a=start&id=<?=$song['Pos']?>">
+ <?=$song['file']?>
+ </a>
+ </p>
+ <? } ?>
<? } ?>
</div>
<div style="float: right;" class="bottombar">
Hello,
I´m trying to find out why the selected track/stream is not shown. Do you know what thats the problem is?
in the style.css there is a tag which is named (selected) but i don´t think it will work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.