CC-2430: Preview tracks in the library + better preview (ability to jump around in clip)
- removed javascript from php files - removed preview.js - fixed small problems with editor
This commit is contained in:
parent
a246f85a5b
commit
a09b63b8d0
12 changed files with 49 additions and 118 deletions
|
@ -561,7 +561,8 @@ Logging::log("getting media! - 2");
|
|||
|
||||
$displayColumns = array("id", "track_title", "artist_name", "album_title", "genre", "length",
|
||||
"year", "utime", "mtime", "ftype", "track_number", "mood", "bpm", "composer", "info_url",
|
||||
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label", "copyright", "mime", "language"
|
||||
"bit_rate", "sample_rate", "isrc_number", "encoded_by", "label", "copyright", "mime",
|
||||
"language", "gunid", "filepath"
|
||||
);
|
||||
|
||||
$plSelect = array();
|
||||
|
@ -632,8 +633,6 @@ Logging::log("getting media! - 2");
|
|||
$results = Application_Model_StoredFile::searchFiles($displayColumns, $fromTable, $datatables);
|
||||
|
||||
//Used by the audio preview functionality in the library.
|
||||
$audioResults = Application_Model_StoredFile::getAllAudioFilePaths();
|
||||
|
||||
foreach ($results['aaData'] as &$row) {
|
||||
$row['id'] = intval($row['id']);
|
||||
|
||||
|
@ -659,10 +658,9 @@ Logging::log("getting media! - 2");
|
|||
//datatable stuff really needs to be pulled out and generalized within the project
|
||||
//access to zend view methods to access url helpers is needed.
|
||||
|
||||
if($type == "au" && isset( $audioResults )) {
|
||||
$row['audioFile'] = $audioResults[$row['id']-1]['gunid'].".".pathinfo($audioResults[$row['id']-1]['filepath'], PATHINFO_EXTENSION);
|
||||
$row['image'] = '<span class="ui-icon ui-icon-play"></span>';
|
||||
|
||||
if($type == "au"){//&& isset( $audioResults )) {
|
||||
$row['audioFile'] = $row['gunid'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION);
|
||||
$row['image'] = '<div class="big_play"><span class="ui-icon ui-icon-play"></span></div>';
|
||||
}
|
||||
else {
|
||||
$row['image'] = '<img src="/css/images/icon_playlist.png">';
|
||||
|
@ -671,19 +669,6 @@ Logging::log("getting media! - 2");
|
|||
|
||||
return $results;
|
||||
}
|
||||
|
||||
public static function getAllAudioFilePaths(){
|
||||
try {
|
||||
$con = Propel::getConnection(CcFilesPeer::DATABASE_NAME);
|
||||
$r = $con->query("SELECT id, gunid, filepath FROM cc_files");
|
||||
$r->setFetchMode(PDO::FETCH_ASSOC);
|
||||
$results = $r->fetchAll();
|
||||
|
||||
return $results;
|
||||
}catch (Exception $e) {
|
||||
Logging::log($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static function searchFiles($displayColumns, $fromTable, $data)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue