Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
eb93004b66
|
@ -158,7 +158,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
|
||||||
$liquidsopa_error_msg = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
$liquidsopa_error_msg = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
||||||
|
|
||||||
$this->setDecorators(array(
|
$this->setDecorators(array(
|
||||||
array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number, "liquidsoap_error_msg"=>$liquidsopa_error_msg))
|
array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number"=>$stream_number, "enabled"=>$enable->getValue(), "liquidsoap_error_msg"=>$liquidsopa_error_msg))
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
$s_name = "s".$this->stream_number;
|
$s_name = "s".$this->stream_number;
|
||||||
?>
|
?>
|
||||||
<h3 class="collapsible-header <?php echo $this->stream_number != '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
<h3 class="collapsible-header <?php echo $this->stream_number == '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
||||||
<div class="stream-setting-content" <?php echo $this->stream_number != '1'?'style="display: none;':''?> id="<?=$s_name?>-config">
|
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?=$s_name?>-config">
|
||||||
<fieldset class="padded">
|
<fieldset class="padded">
|
||||||
<dl class="zend_form clearfix">
|
<dl class="zend_form clearfix">
|
||||||
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
||||||
|
|
|
@ -1,11 +1,28 @@
|
||||||
Before you overwrite fullcalendar.js, note that we have changed one line
|
Before you overwrite fullcalendar.js, note that we have changed a few lines
|
||||||
of this file.
|
in this file.
|
||||||
|
|
||||||
Running a diff between the original fullcalendar.js and our modified one:
|
Running a diff between the original fullcalendar.js and our modified one:
|
||||||
|
|
||||||
$diff -u fullcalendar_original.js fullcalendar.js
|
martin@Thinkpad-T410:~/workspace/airtime/airtime_mvc/public/js/fullcalendar$ diff -u fullcalendar_orig.js fullcalendar.js
|
||||||
--- fullcalendar_original.js 2011-04-09 17:13:15.000000000 -0400
|
--- fullcalendar_orig.js 2011-04-09 17:13:15.000000000 -0400
|
||||||
+++ fullcalendar.js 2011-08-19 11:58:49.672894583 -0400
|
+++ fullcalendar.js 2011-11-18 17:03:57.000000000 -0500
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
/**
|
||||||
|
* @preserve
|
||||||
|
- * FullCalendar v1.5.1
|
||||||
|
+ * FullCalendar v1.5.1-CUSTOM (Changes by Martin Konecny -added primitive support for timezones)
|
||||||
|
* http://arshaw.com/fullcalendar/
|
||||||
|
*
|
||||||
|
* Use fullcalendar.css for basic styling.
|
||||||
|
@@ -227,7 +227,7 @@
|
||||||
|
var absoluteViewElement;
|
||||||
|
var resizeUID = 0;
|
||||||
|
var ignoreWindowResize = 0;
|
||||||
|
- var date = new Date();
|
||||||
|
+ var date = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]);
|
||||||
|
var events = [];
|
||||||
|
var _dragElement;
|
||||||
|
|
||||||
@@ -2275,7 +2275,7 @@
|
@@ -2275,7 +2275,7 @@
|
||||||
function updateCells(firstTime) {
|
function updateCells(firstTime) {
|
||||||
var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating?
|
var dowDirty = firstTime || rowCnt == 1; // could the cells' day-of-weeks need updating?
|
||||||
|
@ -15,7 +32,22 @@ $diff -u fullcalendar_original.js fullcalendar.js
|
||||||
var cell;
|
var cell;
|
||||||
var date;
|
var date;
|
||||||
var row;
|
var row;
|
||||||
|
@@ -3108,7 +3108,7 @@
|
||||||
|
var headCell;
|
||||||
|
var bodyCell;
|
||||||
|
var date;
|
||||||
|
- var today = clearTime(new Date());
|
||||||
|
+ var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset")));
|
||||||
|
for (i=0; i<colCnt; i++) {
|
||||||
|
date = colDate(i);
|
||||||
|
headCell = dayHeadCells.eq(i);
|
||||||
|
@@ -5205,4 +5205,4 @@
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
-})(jQuery);
|
||||||
|
\ No newline at end of file
|
||||||
|
+})(jQuery);
|
||||||
|
|
||||||
|
|
||||||
adjustDateToServerDate() function is defined in "js/airtime/schedule/full-calendar-functions.js"
|
adjustDateToServerDate() function is defined in "js/airtime/schedule/full-calendar-functions.js"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* @preserve
|
* @preserve
|
||||||
* FullCalendar v1.5.1
|
* FullCalendar v1.5.1-CUSTOM (Changes by Martin Konecny -added primitive support for timezones)
|
||||||
* http://arshaw.com/fullcalendar/
|
* http://arshaw.com/fullcalendar/
|
||||||
*
|
*
|
||||||
* Use fullcalendar.css for basic styling.
|
* Use fullcalendar.css for basic styling.
|
||||||
|
@ -227,7 +227,7 @@ function Calendar(element, options, eventSources) {
|
||||||
var absoluteViewElement;
|
var absoluteViewElement;
|
||||||
var resizeUID = 0;
|
var resizeUID = 0;
|
||||||
var ignoreWindowResize = 0;
|
var ignoreWindowResize = 0;
|
||||||
var date = new Date();
|
var date = adjustDateToServerDate(new Date(), options["serverTimezoneOffset"]);
|
||||||
var events = [];
|
var events = [];
|
||||||
var _dragElement;
|
var _dragElement;
|
||||||
|
|
||||||
|
@ -3108,7 +3108,7 @@ function AgendaView(element, calendar, viewName) {
|
||||||
var headCell;
|
var headCell;
|
||||||
var bodyCell;
|
var bodyCell;
|
||||||
var date;
|
var date;
|
||||||
var today = clearTime(new Date());
|
var today = clearTime(adjustDateToServerDate(new Date(), opt("serverTimezoneOffset")));
|
||||||
for (i=0; i<colCnt; i++) {
|
for (i=0; i<colCnt; i++) {
|
||||||
date = colDate(i);
|
date = colDate(i);
|
||||||
headCell = dayHeadCells.eq(i);
|
headCell = dayHeadCells.eq(i);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,16 +41,16 @@ def get_os_codename():
|
||||||
if (sts == 0):
|
if (sts == 0):
|
||||||
#lsb_release is available on this system. Let's get the os codename
|
#lsb_release is available on this system. Let's get the os codename
|
||||||
p = Popen("lsb_release -sc", shell=True, stdout=PIPE)
|
p = Popen("lsb_release -sc", shell=True, stdout=PIPE)
|
||||||
return p.communicate()[0].strip('\r\n')
|
codename = p.communicate()[0].strip('\r\n')
|
||||||
|
|
||||||
|
p = Popen("lsb_release -sd", shell=True, stdout=PIPE)
|
||||||
|
fullname = p.communicate()[0].strip('\r\n')
|
||||||
|
|
||||||
|
return (codename, fullname)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return "unknown"
|
return ("unknown", "unknown")
|
||||||
|
|
||||||
def get_current_script_dir():
|
|
||||||
current_script_dir = os.path.realpath(__file__)
|
|
||||||
index = current_script_dir.rindex('/')
|
|
||||||
return current_script_dir[0:index]
|
|
||||||
|
|
||||||
def generate_liquidsoap_config(ss):
|
def generate_liquidsoap_config(ss):
|
||||||
data = ss['msg']
|
data = ss['msg']
|
||||||
|
@ -76,6 +76,7 @@ def generate_liquidsoap_config(ss):
|
||||||
fh.close()
|
fh.close()
|
||||||
|
|
||||||
PATH_INI_FILE = '/etc/airtime/pypo.cfg'
|
PATH_INI_FILE = '/etc/airtime/pypo.cfg'
|
||||||
|
PATH_LIQUIDSOAP_BIN = '/usr/lib/airtime/pypo/bin/liquidsoap_bin'
|
||||||
|
|
||||||
#any debian/ubuntu codename in this et will automatically use the natty liquidsoap binary
|
#any debian/ubuntu codename in this et will automatically use the natty liquidsoap binary
|
||||||
codenames_for_natty_binary = set(["natty", "oneiric", "precise", "squeeze"])
|
codenames_for_natty_binary = set(["natty", "oneiric", "precise", "squeeze"])
|
||||||
|
@ -88,29 +89,27 @@ except Exception, e:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
current_script_dir = get_current_script_dir()
|
|
||||||
|
|
||||||
#select appropriate liquidsoap file for given system os/architecture
|
#select appropriate liquidsoap file for given system os/architecture
|
||||||
architecture = platform.architecture()[0]
|
architecture = platform.architecture()[0]
|
||||||
#natty = is_natty()
|
#natty = is_natty()
|
||||||
|
|
||||||
codename = get_os_codename()
|
print "* Detecting OS: ...",
|
||||||
|
(codename, fullname) = get_os_codename()
|
||||||
|
print " Found %s" % fullname
|
||||||
natty = codename in codenames_for_natty_binary
|
natty = codename in codenames_for_natty_binary
|
||||||
|
|
||||||
print "* Detecting system architecture for Liquidsoap"
|
|
||||||
|
|
||||||
if architecture == '64bit' and natty:
|
if architecture == '64bit' and natty:
|
||||||
print " * Installing 64-bit liquidsoap binary (Natty)"
|
print " * Installing 64-bit liquidsoap binary (Natty)"
|
||||||
shutil.copy("%s/../liquidsoap_bin/liquidsoap-natty-amd64"%current_script_dir, "%s/../liquidsoap_bin/liquidsoap"%current_script_dir)
|
shutil.copy("%s/liquidsoap-natty-amd64"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
|
||||||
elif architecture == '32bit' and natty:
|
elif architecture == '32bit' and natty:
|
||||||
print " * Installing 32-bit liquidsoap binary (Natty)"
|
print " * Installing 32-bit liquidsoap binary (Natty)"
|
||||||
shutil.copy("%s/../liquidsoap_bin/liquidsoap-natty-i386"%current_script_dir, "%s/../liquidsoap_bin/liquidsoap"%current_script_dir)
|
shutil.copy("%s/liquidsoap-natty-i386"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
|
||||||
elif architecture == '64bit' and not natty:
|
elif architecture == '64bit' and not natty:
|
||||||
print " * Installing 64-bit liquidsoap binary"
|
print " * Installing 64-bit liquidsoap binary"
|
||||||
shutil.copy("%s/../liquidsoap_bin/liquidsoap-amd64"%current_script_dir, "%s/../liquidsoap_bin/liquidsoap"%current_script_dir)
|
shutil.copy("%s/liquidsoap-amd64"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
|
||||||
elif architecture == '32bit' and not natty:
|
elif architecture == '32bit' and not natty:
|
||||||
print " * Installing 32-bit liquidsoap binary"
|
print " * Installing 32-bit liquidsoap binary"
|
||||||
shutil.copy("%s/../liquidsoap_bin/liquidsoap-i386"%current_script_dir, "%s/../liquidsoap_bin/liquidsoap"%current_script_dir)
|
shutil.copy("%s/liquidsoap-i386"%PATH_LIQUIDSOAP_BIN, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
|
||||||
else:
|
else:
|
||||||
print "Unknown system architecture."
|
print "Unknown system architecture."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Reference in New Issue