Merge branch '2.5.x' of github.com:sourcefabric/Airtime into 2.5.x

This commit is contained in:
Naomi 2014-03-12 18:00:24 -04:00
commit d3f9492577
7 changed files with 168 additions and 71 deletions

View file

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: Airtime\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-12-13 12:58-0500\n"
"PO-Revision-Date: 2014-02-12 10:53+0000\n"
"PO-Revision-Date: 2014-02-12 11:00+0000\n"
"Last-Translator: danielhjames <daniel@64studio.com>\n"
"Language-Team: German (Germany) (http://www.transifex.com/projects/p/airtime/language/de_DE/)\n"
"MIME-Version: 1.0\n"
@ -2211,7 +2211,7 @@ msgstr "Admin Benutzer und Passwort, wird zur Abfrage der Zuhörerdaten in Iceca
#: airtime_mvc/application/controllers/LocaleController.php:180
msgid ""
"Warning: You cannot change this field while the show is currently playing"
msgstr ""
msgstr "Warnung: Dieses Feld kann nicht geändert werden, während die Sendung wiedergegeben wird."
#: airtime_mvc/application/controllers/LocaleController.php:181
msgid "No result found"

View file

@ -687,7 +687,7 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
$ds->addTable('cc_show_hosts', 'select * from cc_show_hosts');
$this->assertDataSetsEqual(
$this->createXmlDataSet(dirname(__FILE__)."/datasets/test_createNoRepeatNoRRShow.xml"),
$this->createXmlDataSet(dirname(__FILE__)."/datasets/test_weeklyToNoRepeat.xml"),
$ds
);
}

View file

@ -0,0 +1,87 @@
<?xml version="1.0" ?>
<dataset>
<table name="cc_show">
<column>id</column>
<column>name</column>
<column>url</column>
<column>genre</column>
<column>description</column>
<column>color</column>
<column>background_color</column>
<column>live_stream_using_airtime_auth</column>
<column>live_stream_using_custom_auth</column>
<column>live_stream_user</column>
<column>live_stream_pass</column>
<column>linked</column>
<column>is_linkable</column>
<row>
<value>1</value>
<value>test show</value>
<null />
<null />
<null />
<value>ffffff</value>
<value>364492</value>
<value></value>
<value></value>
<null />
<null />
<value></value>
<value>1</value>
</row>
</table>
<table name="cc_show_days">
<column>id</column>
<column>first_show</column>
<column>last_show</column>
<column>start_time</column>
<column>timezone</column>
<column>duration</column>
<column>day</column>
<column>repeat_type</column>
<column>next_pop_date</column>
<column>show_id</column>
<column>record</column>
<row>
<value>2</value>
<value>2016-01-01</value>
<null />
<value>00:00:00</value>
<value>UTC</value>
<value>01:00</value>
<value>5</value>
<value>-1</value>
<value>2016-01-01</value>
<value>1</value>
<value>0</value>
</row>
</table>
<table name="cc_show_instances">
<column>id</column>
<column>starts</column>
<column>ends</column>
<column>show_id</column>
<column>record</column>
<column>rebroadcast</column>
<column>instance_id</column>
<column>modified_instance</column>
<row>
<value>1</value>
<value>2016-01-01 00:00:00</value>
<value>2016-01-01 01:00:00</value>
<value>1</value>
<value>0</value>
<value>0</value>
<null />
<value></value>
</row>
</table>
<table name="cc_show_rebroadcast">
</table>
<table name="cc_show_hosts">
</table>
</dataset>

View file

@ -27,5 +27,11 @@ export RABBITMQ_PASSWORD
export RABBITMQ_VHOST
export AIRTIME_UNIT_TEST="1"
#Change the working directory to this script's directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
#Run the unit tests
phpunit --log-junit test_results.xml

View file

@ -117,7 +117,7 @@ class PypoLiquidsoap():
#independent_event: true
#},
try:
scheduled_now_files = \
filter(lambda x: x["type"] == eventtypes.FILE, scheduled_now)
@ -173,7 +173,7 @@ class PypoLiquidsoap():
self.logger.info("Need to add items to Liquidsoap *now*: %s" % \
to_be_added)
for i in scheduled_now:
for i in scheduled_now_files:
if i["row_id"] in to_be_added:
self.modify_cue_point(i)
self.play(i)
@ -187,6 +187,9 @@ class PypoLiquidsoap():
#something is playing and it shouldn't be.
self.telnet_liquidsoap.stop_web_stream_buffer()
self.telnet_liquidsoap.stop_web_stream_output()
except KeyError as e:
self.logger.error("Error: Malformed event in schedule. " + str(e))
def stop(self, queue):
self.telnet_liquidsoap.queue_remove(queue)
@ -200,8 +203,7 @@ class PypoLiquidsoap():
self.liq_queue_tracker[i] = None
def modify_cue_point(self, link):
if not self.is_file(link):
return
assert self.is_file(link)
tnow = datetime.utcnow()

View file

@ -153,8 +153,10 @@ class PypoPush(Thread):
self.telnet_lock.release()
def run(self):
while True:
try: self.main()
except Exception, e:
top = traceback.format_exc()
self.logger.error('Pypo Push Exception: %s', top)
time.sleep(5)