Загрузка плейлистов.
[mpd-web.git] / ajax / trackinfo.php
1 <?php
2
3 include('mpd.php');
4
5 $cur_track = $mpd->current_track_id;
6 $playlist = $mpd->playlist;
7
8 $playlist_count = $mpd->playlist_count;
9
10 if($cur_track !=-1) {
11
12     $trackno=$cur_track+1;
13
14     echo "<div class=\"trackno\">#$trackno/$playlist_count</div>";
15     if ($playlist[$cur_track]['name']==$playlist[$cur_track]['title']) {
16         echo "<div class=\"trackname\">".htmlentities(cut_file($playlist[$cur_track]['name']))."</div>";
17     } else {
18         echo "<div class=\"trackname\">".htmlentities($playlist[$cur_track]['title'])."</div>";
19     }
20     
21 } else {
22     echo "<div class=\"trackno\">#-/$playlist_count</div>";
23     echo "<div class=\"trackname\">Трек не выбран</div>";
24 }
25
26 ?>