Ticket #3135: mythweb_music_path.patch

File mythweb_music_path.patch, 920 bytes (added by lyricnz, 14 years ago)

patch to add path to mythweb+music streaming

  • mythplugins/mythweb/modules/music/mp3act_playstream.php

     
    2121
    2222function streamPlay($id)
    2323{
    24   $query = 'SELECT mt.artist_name, ms.name, ms.filename '.
     24  $query = 'SELECT mt.artist_name, ms.name, md.path, ms.filename '.
    2525    'FROM music_songs AS ms '.
    2626    'LEFT JOIN music_artists AS mt ON ms.artist_id=mt.artist_id '.
     27    'LEFT JOIN music_directories AS md ON ms.directory_id=md.directory_id '.
    2728    'WHERE ms.song_id='.mysql_real_escape_string($id);
    2829
    2930  $result = mysql_query($query);
     
    4041    exit;
    4142  }
    4243
    43   $filename = 'data/music/'.$row['filename'];
     44  $filename = 'data/music/'.$row['path'].'/'.$row['filename'];
    4445
    4546  switch (substr($filename, -3))
    4647  {