Merge branch '2.2.x' of dev.sourcefabric.org:airtime into 2.2.x
This commit is contained in:
commit
fe1d8d51a9
|
@ -278,6 +278,7 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
'element_artist' => isset($track['creator']) ? $track['creator'] : "",
|
||||
'element_position' => $position,
|
||||
'element_id' => ++$position,
|
||||
'mime' => isset($track['mime'])?$track['mime']:""
|
||||
);
|
||||
|
||||
$elementMap['type'] = $track['type'];
|
||||
|
|
|
@ -677,7 +677,8 @@ FROM (
|
|||
f.length AS length,
|
||||
f.artist_name AS creator,
|
||||
f.file_exists AS EXISTS,
|
||||
f.filepath AS filepath
|
||||
f.filepath AS filepath,
|
||||
f.mime AS mime
|
||||
FROM cc_schedule AS s
|
||||
LEFT JOIN cc_files AS f ON f.id = s.file_id
|
||||
WHERE s.instance_id = :instance_id1
|
||||
|
@ -693,7 +694,8 @@ FROM (
|
|||
ws.length AS length,
|
||||
sub.login AS creator,
|
||||
't'::boolean AS EXISTS,
|
||||
ws.url AS filepath
|
||||
ws.url AS filepath,
|
||||
ws.mime as mime
|
||||
FROM cc_schedule AS s
|
||||
LEFT JOIN cc_webstream AS ws ON ws.id = s.stream_id
|
||||
LEFT JOIN cc_subjs AS sub ON ws.creator_id = sub.id
|
||||
|
|
|
@ -815,9 +815,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
//playlist screen if this is the currently edited playlist.
|
||||
if ((data.ftype === "playlist" || data.ftype === "block") && screen === "playlist") {
|
||||
callback = function() {
|
||||
|
||||
aMedia = [];
|
||||
aMedia.push({"id": data.id, "type": data.ftype});
|
||||
if (confirm('Are you sure you want to delete the selected item?')) {
|
||||
AIRTIME.playlist.fnDelete(data.id);
|
||||
AIRTIME.library.fnDeleteItems(aMedia);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -399,7 +399,15 @@ class PypoPush(Thread):
|
|||
|
||||
|
||||
def date_interval_to_seconds(self, interval):
|
||||
return (interval.microseconds + (interval.seconds + interval.days * 24 * 3600) * 10 ** 6) / float(10 ** 6)
|
||||
"""
|
||||
Convert timedelta object into int representing the number of seconds. If
|
||||
number of seconds is less than 0, then return 0.
|
||||
"""
|
||||
seconds = (interval.microseconds + \
|
||||
(interval.seconds + interval.days * 24 * 3600) * 10 ** 6) / float(10 ** 6)
|
||||
if seconds < 0: seconds = 0
|
||||
|
||||
return seconds
|
||||
|
||||
def push_to_liquidsoap(self, event_chain):
|
||||
|
||||
|
|
Loading…
Reference in New Issue