From a382760a44da44ecf52eb32b4739db0e4a759b27 Mon Sep 17 00:00:00 2001 From: yomguy <> Date: Wed, 28 Nov 2007 23:08:10 +0000 Subject: [PATCH] Fix --- etc/{school_default.xml => default_courses.xml} | 0 etc/pre-barreau_courses.xml | 4 +++- etc/teleoddcast.cfg | 6 +++--- teleoddcast.py | 15 ++++++++++----- 4 files changed, 16 insertions(+), 9 deletions(-) rename etc/{school_default.xml => default_courses.xml} (100%) diff --git a/etc/school_default.xml b/etc/default_courses.xml similarity index 100% rename from etc/school_default.xml rename to etc/default_courses.xml 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/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) -- 2.39.5