X-Git-Url: https://git.rvb.name/mpd-web.git/blobdiff_plain/e05325ceb8b812fc40b7c3475c59602dde9efdae..40bb089389b428c836f544e2d94a48dfae415229:/ajax/trackinfo.php?ds=sidebyside diff --git a/ajax/trackinfo.php b/ajax/trackinfo.php index e5cc464..f1c4b36 100644 --- a/ajax/trackinfo.php +++ b/ajax/trackinfo.php @@ -2,16 +2,25 @@ 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 "
#$trackno/$playlist_count
"; if ($playlist[$cur_track]['name']==$playlist[$cur_track]['title']) { - echo htmlentities(cut_file($playlist[$cur_track]['name'])); + echo "
".htmlentities(cut_file($playlist[$cur_track]['name']))."
"; } else { - echo htmlentities($playlist[$cur_track]['title']); + echo "
".htmlentities($playlist[$cur_track]['title'])."
"; } -else - echo "No Track selected"; + +} else { + echo "
#-/$playlist_count
"; + echo "
Трек не выбран
"; +} ?>