mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-04 18:29:40 +02:00
Resolve #401 new database update, reset album thumbs and use resized art...
This commit is contained in:
parent
c9ccb05a40
commit
e474991d13
14 changed files with 94 additions and 38 deletions
|
@ -137,15 +137,10 @@ class Playlist extends database_object {
|
|||
|
||||
$results = array();
|
||||
|
||||
$sql = "SELECT `id`,`object_id`,`object_type`,`dynamic_song`,`track` FROM `playlist_data` WHERE `playlist`='" . Dba::escape($this->id) . "' ORDER BY `track`";
|
||||
$sql = "SELECT `id`,`object_id`,`object_type`,`track` FROM `playlist_data` WHERE `playlist`='" . Dba::escape($this->id) . "' ORDER BY `track`";
|
||||
$db_results = Dba::query($sql);
|
||||
|
||||
while ($row = Dba::fetch_assoc($db_results)) {
|
||||
|
||||
if (strlen($row['dynamic_song'])) {
|
||||
// Do something here FIXME!
|
||||
}
|
||||
|
||||
$results[] = array('type'=>$row['object_type'],'object_id'=>$row['object_id'],'track'=>$row['track'],'track_id'=>$row['id']);
|
||||
} // end while
|
||||
|
||||
|
@ -163,16 +158,12 @@ class Playlist extends database_object {
|
|||
|
||||
$limit_sql = $limit ? 'LIMIT ' . intval($limit) : '';
|
||||
|
||||
$sql = "SELECT `object_id`,`object_type`,`dynamic_song` FROM `playlist_data` " .
|
||||
$sql = "SELECT `object_id`,`object_type` FROM `playlist_data` " .
|
||||
"WHERE `playlist`='" . Dba::escape($this->id) . "' ORDER BY RAND() $limit_sql";
|
||||
$db_results = Dba::query($sql);
|
||||
|
||||
while ($row = Dba::fetch_assoc($db_results)) {
|
||||
|
||||
if (strlen($row['dynamic_song'])) {
|
||||
// Do something here FIXME!!!
|
||||
}
|
||||
|
||||
$results[] = array('type'=>$row['object_type'],'object_id'=>$row['object_id']);
|
||||
} // end while
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue