From: yomguy Date: Thu, 8 Jul 2010 18:18:00 +0000 (+0000) Subject: fix writing and casting metadata X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=bb11206f4bdd3b2334ece93a22ea2d0eb2f7125c;p=telecaster-cgi.git fix writing and casting metadata --- diff --git a/telecaster.py b/telecaster.py index c2442ef..b26909a 100755 --- a/telecaster.py +++ b/telecaster.py @@ -69,10 +69,10 @@ class TeleCaster: self.lock_file = self.user_dir + os.sep + 'telecaster.lock' def main(self): - edcast_pid = get_pid('^edcast_jack', self.uid) + edcast_pid = get_pid('edcast_jack', self.uid) deefuzzer_pid = get_pid('/usr/bin/deefuzzer', self.uid) - writing = deefuzzer_pid != [] - casting = edcast_pid != [] + writing = edcast_pid != [] + casting = deefuzzer_pid != [] form = WebView(self.session_file, self.url, version) if deefuzzer_pid == [] and form.has_key("action") and \ @@ -105,7 +105,7 @@ class TeleCaster: self.main() elif deefuzzer_pid == []: - form.start_form() + form.start_form(writing, casting) conf_file = '/etc/telecaster/telecaster.xml' diff --git a/tools/tools.py b/tools/tools.py index 46e8bdb..50349c1 100644 --- a/tools/tools.py +++ b/tools/tools.py @@ -84,8 +84,7 @@ def get_pid(proc,uid): for proc in procs: pid = proc.split(' ')[0] command = ' '.join(proc.split(' ')[1:])[:-1] - if not 'LIVE' in command: - pids.append(pid) + pids.append(pid) return pids def get_params_from_lock(lock_file): diff --git a/webview.py b/webview.py index 9678bf4..f44b484 100644 --- a/webview.py +++ b/webview.py @@ -240,11 +240,11 @@ class WebView(FieldStorage): print "" - def start_form(self, message=''): + def start_form(self, writing, casting, message=''): self.refresh = False self.header() - self.casting = False - self.writing = False + self.casting = writing + self.writing = casting self.hardware_data() print "
" print "
"