CC-84: Smart Playlists
- drag and drop playlist that contains block - audio preview of playlist that contains static block
This commit is contained in:
parent
7cde4ba2ba
commit
5becd70ab1
11 changed files with 244 additions and 87 deletions
|
@ -189,7 +189,7 @@ class Application_Model_Block
|
|||
*/
|
||||
public function getContents($filterFiles=false)
|
||||
{
|
||||
Logging::log("Getting contents for playlist {$this->id}");
|
||||
Logging::log("Getting contents for block {$this->id}");
|
||||
|
||||
$files = array();
|
||||
$sql = <<<"EOT"
|
||||
|
@ -197,13 +197,11 @@ class Application_Model_Block
|
|||
f.id as item_id, f.track_title, f.artist_name as creator, f.file_exists as exists, f.filepath as path FROM cc_blockcontents AS pc
|
||||
LEFT JOIN cc_files AS f ON pc.file_id=f.id WHERE pc.block_id = {$this->id};
|
||||
EOT;
|
||||
Logging::debug($sql);
|
||||
$con = Propel::getConnection();
|
||||
$rows = $con->query($sql)->fetchAll();
|
||||
|
||||
$offset = 0;
|
||||
foreach ($rows as &$row) {
|
||||
Logging::log($row);
|
||||
|
||||
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
|
||||
$offset += $clipSec;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue