projects
/
mpd-web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Вычищение старых конструкций PHP + многочисленная доводка по мелочи.
[mpd-web.git]
/
ajax
/
trackinfo.php
diff --git
a/ajax/trackinfo.php
b/ajax/trackinfo.php
index e5cc464fbcca3dc978b942c4ae43deb4edfefaa6..ef868939918787854558ac6be81313665b7a22e3 100644
(file)
--- a/
ajax/trackinfo.php
+++ b/
ajax/trackinfo.php
@@
-2,16
+2,25
@@
include('mpd.php');
include('mpd.php');
-$cur_track= $mpd->current_track_id;
-$playlist= $mpd->playlist;
-if($cur_track !=-1)
+$cur_track = $mpd->current_track_id;
+$playlist = $mpd->playlist;
+$playlist_count = $mpd->playlist_count;
+
+if($cur_track !=-1) {
+
+ $trackno=$cur_track+1;
+
+ echo "<div class=\"trackno\">#$trackno/$playlist_count</div>";
if ($playlist[$cur_track]['name']==$playlist[$cur_track]['title']) {
if ($playlist[$cur_track]['name']==$playlist[$cur_track]['title']) {
- echo
htmlentities(cut_file($playlist[$cur_track]['name']))
;
+ echo
"<div class=\"trackname\">".htmlentities(cut_file($playlist[$cur_track]['name']))."</div>"
;
} else {
} else {
- echo
htmlentities($playlist[$cur_track]['title'])
;
+ echo
"<div class=\"trackname\">".htmlentities($playlist[$cur_track]['title'])."</div>"
;
}
}
-else
- echo "No Track selected";
+
+} else {
+ echo "<div class=\"trackno\">#-/$playlist_count</div>";
+ echo "<div class=\"trackname\">No track selected</div>";
+}
?>
?>