Merge branch 'devel' into cc-1960-internationalize-airtime
This commit is contained in:
commit
7a4e871495
|
@ -112,6 +112,10 @@ Non-linked code:
|
|||
- Web site: http://code.google.com/p/jq-serverbrowse/
|
||||
- License: BSD 2-Clause
|
||||
|
||||
* Flot
|
||||
- Web site: http://www.flotcharts.org/
|
||||
- License: MIT
|
||||
|
||||
-------------
|
||||
Media-Monitor
|
||||
-------------
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2007-2009 IOLA and Ole Laursen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,7 @@ Depends: apache2,
|
|||
coreutils (>= 7.5) | timeout,
|
||||
curl,
|
||||
ecasound,
|
||||
flac,
|
||||
gzip (>= 1.3.12),
|
||||
libao-ocaml,
|
||||
libapache2-mod-php5,
|
||||
|
|
|
@ -45,6 +45,10 @@ Files: airtime_mvc/library/propel/test/etc/xsl/*
|
|||
Copyright: 2001-2004 The Apache Software Foundation
|
||||
License: Apache-2.0
|
||||
|
||||
Files: airtime_mvc/public/js/flot/*
|
||||
Copyright: 2007-2009 IOLA and Ole Laursen
|
||||
License: Expat
|
||||
|
||||
Files: debian/*
|
||||
Copyright:
|
||||
2012 Alessio Treglia <alessio@debian.org>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Script for generating nightly Airtime snapshot packages
|
||||
# Run from the directory containg the files checked out from git
|
||||
|
||||
VERSION=2.2.0~$(date "+%Y%m%d")
|
||||
VERSION=2.3.0~$(date "+%Y%m%d")
|
||||
#VERSION=2.2.0-rc1
|
||||
BUILDDEST=/tmp/airtime-${VERSION}/
|
||||
DEBDIR=`pwd`/debian
|
||||
|
|
|
@ -227,7 +227,7 @@ class AirtimeApiClient(object):
|
|||
|
||||
def check_live_stream_auth(self, username, password, dj_type):
|
||||
return self.services.check_live_stream_auth(
|
||||
username=username, password=password, dj_type=dj_type)
|
||||
username=username, password=password, djtype=dj_type)
|
||||
|
||||
def construct_url(self,config_action_key):
|
||||
"""Constructs the base url for every request"""
|
||||
|
|
|
@ -6,7 +6,7 @@ import os
|
|||
import math
|
||||
import wave
|
||||
import contextlib
|
||||
import shutil
|
||||
import shutil, pipes
|
||||
import re
|
||||
import sys
|
||||
import hashlib
|
||||
|
@ -162,7 +162,7 @@ def walk_supported(directory, clean_empties=False):
|
|||
|
||||
|
||||
def file_locked(path):
|
||||
cmd = "lsof %s" % path
|
||||
cmd = "lsof %s" % (pipes.quote(path))
|
||||
f = Popen(cmd, shell=True, stdout=PIPE).stdout
|
||||
return bool(f.readlines())
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from os.path import join
|
||||
from os.path import join, basename, dirname
|
||||
|
||||
from media.monitor.exceptions import NoConfigFile
|
||||
from media.monitor.pure import LazyProperty
|
||||
|
@ -39,6 +39,14 @@ class AirtimeInstance(object):
|
|||
if isinstance(sig, SignalString): return sig
|
||||
else: return SignalString("%s_%s" % (self.name, sig))
|
||||
|
||||
def touch_file_path(self):
|
||||
""" Get the path of the touch file for every instance """
|
||||
touch_base_path = self.mm_config['index_path']
|
||||
touch_base_name = basename(touch_base_path)
|
||||
new_base_name = self.name + touch_base_name
|
||||
return join(dirname(touch_base_path), new_base_name)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return "%s,%s(%s)" % (self.name, self.root_path, self.config_paths)
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ class MM2(InstanceThread, Loggable):
|
|||
manager = Manager()
|
||||
apiclient = apc()
|
||||
config = user().mm_config
|
||||
watch_syncer = WatchSyncer(signal=getsig('watch'),
|
||||
chunking_number=config['chunking_number'],
|
||||
timeout=config['request_max_wait'])
|
||||
WatchSyncer(signal=getsig('watch'),
|
||||
chunking_number=config['chunking_number'],
|
||||
timeout=config['request_max_wait'])
|
||||
airtime_receiver = AirtimeMessageReceiver(config,manager)
|
||||
airtime_notifier = AirtimeNotifier(config, airtime_receiver)
|
||||
|
||||
|
@ -75,15 +75,15 @@ class MM2(InstanceThread, Loggable):
|
|||
airtime_receiver.new_watch({ 'directory':watch_dir }, restart=True)
|
||||
else: self.logger.info("Failed to add watch on %s" % str(watch_dir))
|
||||
|
||||
ed = EventDrainer(airtime_notifier.connection,
|
||||
EventDrainer(airtime_notifier.connection,
|
||||
interval=float(config['rmq_event_wait']))
|
||||
|
||||
# Launch the toucher that updates the last time when the script was
|
||||
# ran every n seconds.
|
||||
# TODO : verify that this does not interfere with bootstrapping because the
|
||||
# toucher thread might update the last_ran variable too fast
|
||||
tt = ToucherThread(path=config['index_path'],
|
||||
interval=int(config['touch_interval']))
|
||||
ToucherThread(path=user().touch_file_path(),
|
||||
interval=int(config['touch_interval']))
|
||||
|
||||
apiclient.register_component('media-monitor')
|
||||
|
||||
|
|
Loading…
Reference in New Issue