From: yomguy <> Date: Wed, 28 Nov 2007 23:08:10 +0000 (+0000) Subject: Fix X-Git-Tag: 0.9~334 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=a382760a44da44ecf52eb32b4739db0e4a759b27;p=telecaster-client.git Fix --- diff --git a/etc/default_courses.xml b/etc/default_courses.xml new file mode 100644 index 0000000..22a72ab --- /dev/null +++ b/etc/default_courses.xml @@ -0,0 +1,49 @@ + + http://localhost + School Example + 8000 + + Audio + + + Course 1 + + + Course 2 + + + + + Computer + + + Course 1 + + + Course 2 + + + + + Physics + + + Course 1 + + + Course 2 + + + + + Sociology + + + Course 1 + + + Course 1 + + + + diff --git a/etc/pre-barreau_courses.xml b/etc/pre-barreau_courses.xml index 7615b84..f84ece1 100644 --- a/etc/pre-barreau_courses.xml +++ b/etc/pre-barreau_courses.xml @@ -1,7 +1,8 @@ http://augustins.pre-barreau.com - Augustins - Pre-Barreau + Augustins - Pré-Barreau 8000 + CRFPA @@ -202,3 +203,4 @@ +:q! \ No newline at end of file diff --git a/etc/school_default.xml b/etc/school_default.xml deleted file mode 100644 index 22a72ab..0000000 --- a/etc/school_default.xml +++ /dev/null @@ -1,49 +0,0 @@ - - http://localhost - School Example - 8000 - - Audio - - - Course 1 - - - Course 2 - - - - - Computer - - - Course 1 - - - Course 2 - - - - - Physics - - - Course 1 - - - Course 2 - - - - - Sociology - - - Course 1 - - - Course 1 - - - - diff --git a/etc/teleoddcast.cfg b/etc/teleoddcast.cfg index eb7f7f0..23283fe 100644 --- a/etc/teleoddcast.cfg +++ b/etc/teleoddcast.cfg @@ -1,7 +1,7 @@ Server=localhost Port=8000 ServerPassword=source2parisson -ServerMountpoint=/My_station_-_CRFPA_-_Procedure_civile_-_Cours.ogg +ServerMountpoint=/Default_School_-_Audio_-_Course_2.ogg ServerPublic=0 AutomaticReconnectSecs=10 Encode=OggVorbis @@ -13,8 +13,8 @@ ServerType=Icecast2 ExternalFile=/home/pre-barreau/augustins/audio/ #YP Settings ServerStreamURL=http://www.pre-barreau.com -ServerName=My_station_-_CRFPA_-_Procedure_civile_-_Cours_-_1 -ServerDescription=My_station_-_CRFPA_-_Procedure_civile_-_Cours_-_1_-_rth_-_rtjh +ServerName=Default_School_-_Audio_-_Course_2_-_1 +ServerDescription=Default_School_-_Audio_-_Course_2_-_1_-_azd_-_azd ServerGenre=Teaching #Advanced Settings LogLevel=1 diff --git a/teleoddcast.py b/teleoddcast.py index f59c9a5..cfaa905 100755 --- a/teleoddcast.py +++ b/teleoddcast.py @@ -131,11 +131,12 @@ class Station(Course): os.system(command) def stop_oddcast(self): - os.system('kill -9 ' + self.odd_pid[0]) + if self.odd_pid[0]: + os.system('kill -9 ' + self.odd_pid[0]) def stop_rip(self): - #print self.rip_pid[0] - os.system('kill -9 ' + self.rip_pid[0]) + if self.rip_pid[0]: + os.system('kill -9 ' + self.rip_pid[0]) time.sleep(1) date = datetime.datetime.now().strftime("%Y") if os.path.exists(self.file_dir) and os.path.exists(self.file_dir + os.sep + 'incomplete'): @@ -301,7 +302,9 @@ class WebView: print "\t\tCommentaire :"+comment+"" print "\t" print "
" - print "
Cliquez ici pour écouter cette formation en direct
" + print "
Cliquez ici pour écouter cette formation en direct
" print "" print "
" print "\t" @@ -314,6 +317,8 @@ class WebView: class TeleOddCast: + """Manage the calls of Station and Webview to get the network and + disk streams""" def __init__(self, conf_file, school_file): """Main function""" @@ -366,7 +371,7 @@ class TeleOddCast: # Call main function. conf_file = 'etc/teleoddcast.xml' -school_file = 'etc/localhost.xml' +school_file = 'etc/default_courses.xml' if __name__ == '__main__': t = TeleOddCast(conf_file, school_file)