From 4aae1153b9a246fa8d5be08786fff9c473ecca99 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 1 Oct 2012 10:48:32 -0400 Subject: [PATCH 01/47] Added todo to remove methods later --- python_apps/media-monitor2/media/monitor/events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_apps/media-monitor2/media/monitor/events.py b/python_apps/media-monitor2/media/monitor/events.py index 69f751d69..932c78d69 100644 --- a/python_apps/media-monitor2/media/monitor/events.py +++ b/python_apps/media-monitor2/media/monitor/events.py @@ -104,6 +104,7 @@ class BaseEvent(Loggable): self._pack_hook = lambda: None # no op # into another event + # TODO : delete this method later def reset_hook(self): """ Resets the hook that is called after an event is packed. Before @@ -121,6 +122,7 @@ class BaseEvent(Loggable): def __str__(self): return "Event(%s). Path(%s)" % ( self.path, self.__class__.__name__) + # TODO : delete this method later def add_safe_pack_hook(self,k): """ adds a callable object (function) that will be called after the event From 23635f00f7eb1a21b796302c863e74046cc48ce2 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 1 Oct 2012 11:32:42 -0400 Subject: [PATCH 02/47] removed bad metadata handling --- python_apps/media-monitor2/media/metadata/definitions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python_apps/media-monitor2/media/metadata/definitions.py b/python_apps/media-monitor2/media/metadata/definitions.py index ae81a33f1..51ef6fd14 100644 --- a/python_apps/media-monitor2/media/metadata/definitions.py +++ b/python_apps/media-monitor2/media/metadata/definitions.py @@ -94,8 +94,7 @@ with md.metadata("MDATA_KEY_MD5") as t: t.optional(False) t.translate(lambda k: file_md5(k['path'], max_length=100)) -with md.metadata("MDATA_KEY_OWNER_ID") as t: - t.depends('owner_id') +# owner is handled differently by (by events.py) with md.metadata('MDATA_KEY_ORIGINAL_PATH') as t: t.depends('original_path') From b8d15d9d6b9d583558b390bbe2961a048cd7763e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:24:19 -0400 Subject: [PATCH 03/47] Removed more unused code --- python_apps/media-monitor2/media/monitor/config.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/config.py b/python_apps/media-monitor2/media/monitor/config.py index c11158574..3a7be8eb5 100644 --- a/python_apps/media-monitor2/media/monitor/config.py +++ b/python_apps/media-monitor2/media/monitor/config.py @@ -34,6 +34,3 @@ class MMConfig(object): """ return mmp.last_modified(self.cfg['index_path']) - # Remove this after debugging... - def haxxor_set(self, key, value): self.cfg[key] = value - def haxxor_get(self, key): return self.cfg[key] From 48f3b18acd2b504b674a39622c0032c1f8b60e3b Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:25:51 -0400 Subject: [PATCH 04/47] removed wrong comments --- python_apps/media-monitor2/media/monitor/manager.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 78a5c8d92..51ca098bb 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -241,8 +241,3 @@ class Manager(Loggable): notifier = pyinotify.Notifier(self.wm) notifier.coalesce_events() notifier.loop() - # Experiments with running notifier in different modes - # There are 3 options: normal, async, threaded. - #import asyncore - #pyinotify.AsyncNotifier(self.wm).loop() - #asyncore.loop() From 672102da6fe0fe0e8737a042b0b15b5c1c044254 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:30:18 -0400 Subject: [PATCH 05/47] Cleaned up logging --- python_apps/media-monitor2/media/monitor/listeners.py | 3 +++ python_apps/media-monitor2/media/monitor/manager.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/listeners.py b/python_apps/media-monitor2/media/monitor/listeners.py index 83bf8499f..72b8ca8aa 100644 --- a/python_apps/media-monitor2/media/monitor/listeners.py +++ b/python_apps/media-monitor2/media/monitor/listeners.py @@ -40,6 +40,9 @@ def mediate_ignored(fn): return wrapped class BaseListener(object): + def __str__(self): + return "Listener(%s), Signal(%s)" % \ + (self.__class__.__name__, self. signal) def my_init(self, signal): self.signal = signal class OrganizeListener(BaseListener, pyinotify.ProcessEvent, Loggable): diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 51ca098bb..3a12d28d6 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -97,8 +97,10 @@ class Manager(Loggable): Start watching 'path' using 'listener'. First will check if directory is being watched before adding another watch """ - self.logger.info("Adding listener '%s' to '%s'" % - ( listener.__class__.__name__, path) ) + + self.logger.info("Attempting to add listener to path '%s'" % path) + self.logger.info( 'Listener: %s' % str(listener) ) + if not self.has_watch(path): wd = self.wm.add_watch(path, pyinotify.ALL_EVENTS, rec=True, auto_add=True, proc_fun=listener) From f7daf4e737e58e1d5140daeeb23f0f67796a0a8e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:32:10 -0400 Subject: [PATCH 06/47] Added docstring --- python_apps/media-monitor2/media/monitor/manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 3a12d28d6..00b32548f 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -13,6 +13,11 @@ import media.monitor.pure as mmp class ManagerTimeout(threading.Thread,Loggable): + """ + The purpose of this class is to flush the organize directory every 3 + secnods. This used to be just a work around for cc-4235 but recently + became a permanent solution because it's "cheap" and reliable + """ def __init__(self, manager): threading.Thread.__init__(self) self.manager = manager From d72a8e968699e7eba528b1103838f914d9c0ad6a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:34:15 -0400 Subject: [PATCH 07/47] Cleaned up interval handling in ManagerTimeout and left a TODO pointing at further work --- python_apps/media-monitor2/media/monitor/manager.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/manager.py b/python_apps/media-monitor2/media/monitor/manager.py index 00b32548f..77bcf10ec 100644 --- a/python_apps/media-monitor2/media/monitor/manager.py +++ b/python_apps/media-monitor2/media/monitor/manager.py @@ -18,14 +18,16 @@ class ManagerTimeout(threading.Thread,Loggable): secnods. This used to be just a work around for cc-4235 but recently became a permanent solution because it's "cheap" and reliable """ - def __init__(self, manager): + def __init__(self, manager, interval=3): + # TODO : interval should be read from config and passed here instead + # of just using the hard coded value threading.Thread.__init__(self) - self.manager = manager + self.manager = manager + self.interval = interval def run(self): while True: - time.sleep(3) + time.sleep(self.interval) # every 3 seconds self.manager.flush_organize() - #self.logger.info("Force flushed organize...") class Manager(Loggable): """ From 396e8570353be42637caac7813d89a9de3d69a46 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 10:59:54 -0400 Subject: [PATCH 08/47] removed profanity --- python_apps/media-monitor2/media/monitor/pure.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index adeebfe69..ec8f1695a 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -288,8 +288,6 @@ def normalized_metadata(md, original_path): # TODO : wtf is this for again? new_md['MDATA_KEY_TITLE'] = re.sub(r'-?%s-?' % unicode_unknown, u'', new_md['MDATA_KEY_TITLE']) - # ugly mother fucking band aid until enterprise metadata framework is - # working return new_md def organized_path(old_path, root_path, orig_md): From 30c95f3e9dabf4aea3c8074e9acbca6ee89467a0 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 13:30:02 -0400 Subject: [PATCH 09/47] Removed duplication of truncate_to_length routine --- python_apps/media-monitor2/media/monitor/metadata.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/metadata.py b/python_apps/media-monitor2/media/monitor/metadata.py index 063c1211c..c42c54587 100644 --- a/python_apps/media-monitor2/media/monitor/metadata.py +++ b/python_apps/media-monitor2/media/monitor/metadata.py @@ -8,7 +8,7 @@ from mutagen.easyid3 import EasyID3KeyError from media.monitor.exceptions import BadSongFile, InvalidMetadataElement from media.monitor.log import Loggable -from media.monitor.pure import format_length +from media.monitor.pure import format_length, truncate_to_length import media.monitor.pure as mmp """ @@ -95,12 +95,6 @@ truncate_table = { 'MDATA_KEY_COPYRIGHT' : 512, } -def truncate_to_length(item, length): - if isinstance(item, int): item = str(item) - if isinstance(item, basestring): - if len(item) > length: return item[0:length] - else: return item - class Metadata(Loggable): # TODO : refactor the way metadata is being handled. Right now things are a # little bit messy. Some of the handling is in m.m.pure while the rest is From 4d9fbaf21685756258e0b7e3f946d8cd7dfbd77e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 13:30:37 -0400 Subject: [PATCH 10/47] Formatted code better and added TODO --- python_apps/media-monitor2/media/monitor/eventdrainer.py | 1 + python_apps/media-monitor2/media/monitor/metadata.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/python_apps/media-monitor2/media/monitor/eventdrainer.py b/python_apps/media-monitor2/media/monitor/eventdrainer.py index 69f997bf0..1d3bc96f6 100644 --- a/python_apps/media-monitor2/media/monitor/eventdrainer.py +++ b/python_apps/media-monitor2/media/monitor/eventdrainer.py @@ -9,6 +9,7 @@ class EventDrainer(Loggable): """ def __init__(self, connection, interval=1): def cb(): + # TODO : make 0.3 parameter configurable try : connection.drain_events(timeout=0.3) except socket.timeout : pass except Exception as e : diff --git a/python_apps/media-monitor2/media/monitor/metadata.py b/python_apps/media-monitor2/media/monitor/metadata.py index c42c54587..195d7fcdd 100644 --- a/python_apps/media-monitor2/media/monitor/metadata.py +++ b/python_apps/media-monitor2/media/monitor/metadata.py @@ -163,9 +163,12 @@ class Metadata(Loggable): # Forcing the unicode through try : fpath = fpath.decode("utf-8") except : pass + if not mmp.file_playable(fpath): raise BadSongFile(fpath) + try : full_mutagen = mutagen.File(fpath, easy=True) except Exception : raise BadSongFile(fpath) + self.path = fpath if not os.path.exists(self.path): self.logger.info("Attempting to read metadata of file \ From 3dd7e9767b06ff1ea7a3743ae8afbabb9941177f Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 2 Oct 2012 13:57:36 -0400 Subject: [PATCH 11/47] CC-4481: Library -> Advanced Search -> Validation icon does not show up sometimes -validation was missing for Encoded By filter --- airtime_mvc/public/js/airtime/library/library.js | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index aad888006..2958d69b9 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -1174,6 +1174,7 @@ var validationTypes = { "composer" : "s", "conductor" : "s", "copyright" : "s", + "encoded_by" : "s", "utime" : "t", "mtime" : "t", "lptime" : "t", From 968c719fa1b12e3110710d124eaa60f0d1f250d1 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 2 Oct 2012 14:12:22 -0400 Subject: [PATCH 12/47] CC-4172: Smart Playlist creator requires full HD monitor to avoid buttons being hidden -done --- .../views/scripts/form/smart-block-criteria.phtml | 4 ++-- airtime_mvc/public/css/styles.css | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml b/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml index d6ac417b2..0f27248ca 100644 --- a/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml +++ b/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml @@ -4,10 +4,10 @@
-
+
element->getElement('generate_button') ?>
-
+
element->getElement('shuffle_button') ?>
diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 1fd84ac09..660f156e3 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -561,11 +561,7 @@ input.input_text.sp_extra_input_text{ } .sp-button{ - float: right !important; - width: 60px; - height: 24px !important; - margin-right: 0px !important; - margin-left: 10px !important; + margin-left: 399px; } .sp-save{ From b41c03902ed909d855842b195573a7292219caba Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 2 Oct 2012 14:43:17 -0400 Subject: [PATCH 13/47] cc-4518: fixed --- python_apps/media-monitor2/media/monitor/metadata.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/metadata.py b/python_apps/media-monitor2/media/monitor/metadata.py index 195d7fcdd..8ceaf2aa9 100644 --- a/python_apps/media-monitor2/media/monitor/metadata.py +++ b/python_apps/media-monitor2/media/monitor/metadata.py @@ -120,7 +120,14 @@ class Metadata(Loggable): # TODO : some files have multiple fields for the same metadata. # genre is one example. In that case mutagen will return a list # of values - assign_val = m_val[0] if isinstance(m_val, list) else m_val + + if isinstance(m_val, list): + # TODO : does it make more sense to just skip the element in + # this case? + if len(m_val) == 0: assign_val = '' + else: assign_val = m_val[0] + else: assign_val = m_val + temp_dict[ m_key ] = assign_val airtime_dictionary = {} for muta_k, muta_v in temp_dict.iteritems(): From aede8e8efa901ddb958da2ffa38edce631423b95 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 2 Oct 2012 15:35:49 -0400 Subject: [PATCH 14/47] CC-4520: Playlist Builder: Cannot set cue in -fixed --- airtime_mvc/application/models/Playlist.php | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 232a52f04..dc58bf107 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -724,21 +724,21 @@ SQL; $cueOut = $origLength; } - $sql = "SELECT INTERVAL :cueIn > INTERVAL :cueOut"; + $sql = "SELECT :cueIn::INTERVAL > :cueOut::INTERVAL"; if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':cueOut'=>$cueOut), 'column')) { $errArray["error"] = "Can't set cue in to be larger than cue out."; return $errArray; } - $sql = "SELECT INTERVAL :cueOut > INTERVAL :origLength"; + $sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL"; if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) { $errArray["error"] = "Can't set cue out to be greater than file length."; return $errArray; } - $sql = "SELECT INTERVAL :cueOut - INTERVAL :cueIn"; + $sql = "SELECT :cueOut::INTERVAL - :cueIn::INTERVAL"; $cliplength = Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':cueIn'=>$cueIn), 'column'); $row->setDbCuein($cueIn); @@ -747,15 +747,15 @@ SQL; } elseif (!is_null($cueIn)) { - $sql = "SELECT INTERVAL :cueIn > INTERVAL :oldCueOut"; + $sql = "SELECT :cueIn::INTERVAL > :oldCueOut::INTERVAL"; if (Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':oldCueOut'=>$oldCueOut), 'column')) { $errArray["error"] = "Can't set cue in to be larger than cue out."; return $errArray; } - $sql = "SELECT INTERVAL :oldCueOut - INTERVAL :cueIn"; - $cliplength = Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':oldCueOut'=>$oldCueOut, 'column')); + $sql = "SELECT :oldCueOut::INTERVAL - :cueIn::INTERVAL"; + $cliplength = Application_Common_Database::prepareAndExecute($sql, array(':cueIn'=>$cueIn, ':oldCueOut'=>$oldCueOut), 'column'); $row->setDbCuein($cueIn); $row->setDBCliplength($cliplength); @@ -765,22 +765,22 @@ SQL; $cueOut = $origLength; } - $sql = "SELECT INTERVAL :cueOut < INTERVAL :oldCueIn"; - if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn, 'column'))) { + $sql = "SELECT :cueOut::INTERVAL < :oldCueIn::INTERVAL"; + if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn), 'column')) { $errArray["error"] = "Can't set cue out to be smaller than cue in."; return $errArray; } - $sql = "SELECT INTERVAL :cueOut > INTERVAL :origLength"; - if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength, 'column'))) { + $sql = "SELECT :cueOut::INTERVAL > :origLength::INTERVAL"; + if (Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':origLength'=>$origLength), 'column')) { $errArray["error"] = "Can't set cue out to be greater than file length."; return $errArray; } - $sql = "SELECT INTERVAL :cueOut - INTERVAL :oldCueIn"; - $cliplength = Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn, 'column')); + $sql = "SELECT :cueOut::INTERVAL - :oldCueIn::INTERVAL"; + $cliplength = Application_Common_Database::prepareAndExecute($sql, array(':cueOut'=>$cueOut, ':oldCueIn'=>$oldCueIn), 'column'); $row->setDbCueout($cueOut); $row->setDBCliplength($cliplength); @@ -788,14 +788,14 @@ SQL; $cliplength = $row->getDbCliplength(); - $sql = "SELECT INTERVAL :fadeIn > INTERVAL :cliplength"; - if (Application_Common_Database::prepareAndExecute($sql, array(':fadeIn'=>$fadeIn, ':cliplength'=>$cliplength, 'column'))) { + $sql = "SELECT :fadeIn::INTERVAL > :cliplength::INTERVAL"; + if (Application_Common_Database::prepareAndExecute($sql, array(':fadeIn'=>$fadeIn, ':cliplength'=>$cliplength), 'column')) { $fadeIn = $cliplength; $row->setDbFadein($fadeIn); } - $sql = "SELECT INTERVAL :fadeOut > INTERVAL :cliplength"; - if (Application_Common_Database::prepareAndExecute($sql, array(':fadeOut'=>$fadeOut, ':cliplength'=>$cliplength, 'column'))) { + $sql = "SELECT :fadeOut::INTERVAL > :cliplength::INTERVAL"; + if (Application_Common_Database::prepareAndExecute($sql, array(':fadeOut'=>$fadeOut, ':cliplength'=>$cliplength), 'column')) { $fadeOut = $cliplength; $row->setDbFadein($fadeOut); } From 1b0dd13eacaf4349fe12ba1b9ba20f0ac5d45cd0 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 2 Oct 2012 15:38:05 -0400 Subject: [PATCH 15/47] CC-4521: Playlist Builder: Cannot set fades -fixed --- airtime_mvc/application/models/Playlist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index dc58bf107..021783c49 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -624,7 +624,7 @@ SQL; if (!is_null($fadeIn)) { - $sql = "SELECT INTERVAL :fadein > INTERVAL '{$clipLength}'"; + $sql = "SELECT :fadein::INTERVAL > INTERVAL '{$clipLength}'"; if (Application_Common_Database::prepareAndExecute($sql, array(':fadein'=>$fadeIn), 'column')) { //"Fade In can't be larger than overall playlength."; $fadeIn = $clipLength; @@ -633,7 +633,7 @@ SQL; } if (!is_null($fadeOut)) { - $sql = "SELECT INTERVAL :fadeout > INTERVAL '{$clipLength}'"; + $sql = "SELECT :fadeout::INTERVAL > INTERVAL '{$clipLength}'"; if (Application_Common_Database::prepareAndExecute($sql, array(':fadeout'=>$fadeOut), 'column')) { //Fade Out can't be larger than overall playlength."; $fadeOut = $clipLength; From f94c4cd96a8e719f1072bdcd115176812eda9762 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 3 Oct 2012 11:13:41 -0400 Subject: [PATCH 16/47] CC-4515: Calendar: Errors for editing recording show -fixed --- airtime_mvc/application/models/Show.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index d9467cfc1..ccbcc59d9 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1203,15 +1203,16 @@ SQL; //$con = Propel::getConnection(CcShowPeer::DATABASE_NAME); //$sql = "SELECT date '{$data['add_show_rebroadcast_date_absolute_'.$i]}' - date '{$data['add_show_start_date']}' "; $sql = << - $date["add_show_rebroadcast_date_absolute_$i"], + $data["add_show_rebroadcast_date_absolute_$i"], 'start' => - $date['add_show_start_date']), "column" ); + $data['add_show_start_date']), "column" ); //$r = $con->query($sql); //$offset_days = $r->fetchColumn(0); From eadde1c4984eb36e973123e415f884182c228160 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 3 Oct 2012 11:29:16 -0400 Subject: [PATCH 17/47] CC-4519: Advanced Search Option: Please use text search instead of scope search from Mime's type -fixed --- airtime_mvc/public/js/airtime/library/library.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index 2958d69b9..fbb212b43 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -29,6 +29,7 @@ var AIRTIME = (function(AIRTIME) { "language" : "s", "length" : "n", "lyricist" : "s", + "mime" : "s", "mood" : "s", "name" : "s", "orchestra" : "s", @@ -1186,6 +1187,7 @@ var validationTypes = { "length" : "l", "lyricist" : "s", "mood" : "s", + "mime" : "s", "name" : "s", "orchestra" : "s", "owner_id" : "s", From 317bb7de69245b5e47ff97479f58c2044a00bc99 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 3 Oct 2012 11:40:40 -0400 Subject: [PATCH 18/47] CC-4479: Buttons in dialog windows are not styled -done --- airtime_mvc/application/forms/EditAudioMD.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index 39ec7af3b..ba7b1c4ef 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -125,7 +125,7 @@ class Application_Form_EditAudioMD extends Zend_Form // Add the submit button $this->addElement('submit', 'submit', array( 'ignore' => true, - 'class' => 'ui-button ui-state-default', + 'class' => 'btn', 'label' => 'Save', 'decorators' => array( 'ViewHelper' @@ -135,7 +135,7 @@ class Application_Form_EditAudioMD extends Zend_Form // Add the submit button $this->addElement('button', 'cancel', array( 'ignore' => true, - 'class' => 'ui-button ui-state-default ui-button-text-only md-cancel', + 'class' => 'btn md-cancel', 'label' => 'Cancel', 'onclick' => 'javascript:document.location.href = "/Library"', 'decorators' => array( From 2deceaa5fbabea580d35238f9bad4ea2c01e47db Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 3 Oct 2012 11:58:21 -0400 Subject: [PATCH 19/47] comment formatting --- airtime_mvc/application/models/StoredFile.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index b405ef714..913007421 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -756,9 +756,10 @@ SQL; $row['tr_id'] = "{$type}_{$row['id']}"; - //TODO url like this to work on both playlist/showbuilder screens. - //datatable stuff really needs to be pulled out and generalized within the project - //access to zend view methods to access url helpers is needed. + //TODO url like this to work on both playlist/showbuilder + //screens. datatable stuff really needs to be pulled out and + //generalized within the project access to zend view methods + //to access url helpers is needed. if ($type == "au") { $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION); From 1ae77843314bb13af206f86fb7457258a70a1d6c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 3 Oct 2012 11:59:02 -0400 Subject: [PATCH 20/47] Added TODO --- airtime_mvc/application/models/StoredFile.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 913007421..3391e0856 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -761,6 +761,8 @@ SQL; //generalized within the project access to zend view methods //to access url helpers is needed. + // TODO : why is there inline html here? breaks abstraction and is + // ugly if ($type == "au") { $row['audioFile'] = $row['id'].".".pathinfo($row['filepath'], PATHINFO_EXTENSION); $row['image'] = ''; From 5a0df2b6d5e6f8a84630340fcfd7f8c36f17693c Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 3 Oct 2012 12:01:24 -0400 Subject: [PATCH 21/47] Adde TODO's --- airtime_mvc/application/models/StoredFile.php | 1 + 1 file changed, 1 insertion(+) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 3391e0856..cd75da2d1 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -192,6 +192,7 @@ class Application_Model_StoredFile if ($dbColumn == "track_title" && (is_null($mdValue) || $mdValue == "")) { continue; } + # TODO : refactor string evals if (isset($this->_dbMD[$dbColumn])) { $propelColumn = $this->_dbMD[$dbColumn]; $method = "set$propelColumn"; From 0d35056cd425a61400d96b9babb907445953f450 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 4 Oct 2012 12:16:57 -0400 Subject: [PATCH 22/47] CC-4486: Library -> Advanced Search: Alignment is off sometimes -added placeholders to input tags for format examples --- .../public/js/airtime/library/library.js | 22 +++++----- .../plugin/AIRTIME_DEV_README_COLUMN_FILTER | 41 ++++++++++++++++--- .../plugin/dataTables.columnFilter.js | 16 +++++++- 3 files changed, 60 insertions(+), 19 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index fbb212b43..161d18d45 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -378,16 +378,6 @@ var AIRTIME = (function(AIRTIME) { $.each(aoCols, function(i,ele){ if (ele.bSearchable) { var currentColId = ele._ColReorder_iOrigCol; - var label = ""; - if (ele.mDataProp == "bit_rate") { - label = " (bps)"; - } else if (ele.mDataProp == "utime" || ele.mDataProp == "mtime" || ele.mDataProp == "lptime") { - label = " (yyyy-mm-dd)"; - } else if (ele.mDataProp == "length") { - label = " (hh:mm:ss.t)"; - } else if (ele.mDataProp == "sample_rate") { - label = " (Hz)"; - } var inputClass = 'filter_column filter_number_text'; var labelStyle = "style='margin-right:35px;'"; @@ -397,9 +387,17 @@ var AIRTIME = (function(AIRTIME) { } if (ele.bVisible) { - advanceSearchDiv.append("
"); + advanceSearchDiv.append( + "
" + + "" + + "
" + + "
"); } else { - advanceSearchDiv.append(""); + advanceSearchDiv.append( + ""); } if (criteriaTypes[ele.mDataProp] == "s") { diff --git a/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER index a86836562..f3a31a667 100644 --- a/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER +++ b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README_COLUMN_FILTER @@ -5,8 +5,8 @@ Running a diff between the original column filter plugin (dataTables.columnFilte our modified one (dataTables.columnFilter.js): denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u dataTables.columnFilter_orig.js dataTables.columnFilter.js ---- dataTables.columnFilter_orig.js 2012-09-10 14:26:30.041095663 -0400 -+++ dataTables.columnFilter.js 2012-09-10 17:04:21.017464447 -0400 +--- dataTables.columnFilter_orig.js 2012-09-11 11:53:16.476101955 -0400 ++++ dataTables.columnFilter.js 2012-10-04 12:15:13.270199949 -0400 @@ -103,7 +103,8 @@ label = label.replace(/(^\s*)|(\s*$)/g, ""); var currentFilter = oTable.fnSettings().aoPreSearchCols[i].sSearch; @@ -32,7 +32,7 @@ denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u - var iCurrentFilterLength = this.value.length; - if (Math.abs(iCurrentFilterLength - iLastFilterLength) < iFilterLength - //&& currentFilter.length == 0 //Why this? -- ) { +- ) { - //Cancel the filtering - return; - } @@ -52,7 +52,7 @@ denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u + var iCurrentFilterLength = this.value.length; + if (Math.abs(iCurrentFilterLength - iLastFilterLength) < iFilterLength + //&& currentFilter.length == 0 //Why this? -+ ) { ++ ) { + //Cancel the filtering + return; + } @@ -81,7 +81,35 @@ denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u } }); } -@@ -228,14 +233,16 @@ +@@ -176,13 +181,25 @@ + function fnCreateRangeInput(oTable) { + + //var currentFilter = oTable.fnSettings().aoPreSearchCols[i].sSearch; ++ ++ var label = ""; ++ if (th.attr('id') == "bit_rate") { ++ label = " bps"; ++ } else if (th.attr('id') == "utime" || th.attr('id') == "mtime" || th.attr('id') == "lptime") { ++ label = " yyyy-mm-dd"; ++ } else if (th.attr('id') == "length") { ++ label = " hh:mm:ss.t"; ++ } else if (th.attr('id') == "sample_rate") { ++ label = " Hz"; ++ } ++ + th.html(_fnRangeLabelPart(0)); + var sFromId = oTable.attr("id") + '_range_from_' + i; +- var from = $(''); ++ var from = $(''); + th.append(from); + th.append(_fnRangeLabelPart(1)); + var sToId = oTable.attr("id") + '_range_to_' + i; +- var to = $(''); ++ var to = $(''); + th.append(to); + th.append(_fnRangeLabelPart(2)); + th.wrapInner(''); +@@ -228,14 +245,16 @@ $('#' + sFromId + ',#' + sToId, th).keyup(function () { @@ -106,3 +134,6 @@ denise@denise-DX4860:~/airtime/airtime_mvc/public/js/datatables/plugin$ diff -u }); + + + diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js index 1bab38a3c..748a64c21 100644 --- a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js @@ -181,13 +181,25 @@ function fnCreateRangeInput(oTable) { //var currentFilter = oTable.fnSettings().aoPreSearchCols[i].sSearch; + + var label = ""; + if (th.attr('id') == "bit_rate") { + label = " bps"; + } else if (th.attr('id') == "utime" || th.attr('id') == "mtime" || th.attr('id') == "lptime") { + label = " yyyy-mm-dd"; + } else if (th.attr('id') == "length") { + label = " hh:mm:ss.t"; + } else if (th.attr('id') == "sample_rate") { + label = " Hz"; + } + th.html(_fnRangeLabelPart(0)); var sFromId = oTable.attr("id") + '_range_from_' + i; - var from = $(''); + var from = $(''); th.append(from); th.append(_fnRangeLabelPart(1)); var sToId = oTable.attr("id") + '_range_to_' + i; - var to = $(''); + var to = $(''); th.append(to); th.append(_fnRangeLabelPart(2)); th.wrapInner(''); From 44a3f85636edf77bacbb2d0cce0702e9587c5e2f Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 1 Oct 2012 15:30:02 +0100 Subject: [PATCH 23/47] CC-4507: Tweak CSS to make more room for metadata in Master Panel --- airtime_mvc/public/css/masterpanel.css | 4 ++-- airtime_mvc/public/css/styles.css | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/public/css/masterpanel.css b/airtime_mvc/public/css/masterpanel.css index f11bb3f4c..58aa8326f 100644 --- a/airtime_mvc/public/css/masterpanel.css +++ b/airtime_mvc/public/css/masterpanel.css @@ -312,7 +312,7 @@ margin-right:0; text-align:right !important; background-position:0 0; - padding: 0 14px 0 10px; + padding: 0 10px 0 10px; } .time-info-block li, .time-info-block li.time { text-align: right; @@ -351,4 +351,4 @@ background:#D40000 } -*/ \ No newline at end of file +*/ diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 660f156e3..73c9d8292 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -180,11 +180,11 @@ select { color:#ff5d1a; } .now-playing-block { - width:30%; - padding-left:20px; + width:35%; + padding-left:10px; } .show-block { - width:18%; + width:30%; } .text-row { height:30px; @@ -259,7 +259,6 @@ select { } .time-info-block { padding:0 14px 0 2px; - background:url(images/masterpanel_spacer.png) no-repeat right 0; min-width:105px; } .time-info-block ul { From 97b5e275c63215fad4327252d6f32d60013325e6 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 8 Oct 2012 12:47:18 +0100 Subject: [PATCH 24/47] Reformat debian/control dependencies into alphabetical order --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 6e9ae3dee..853ebc6d2 100644 --- a/debian/control +++ b/debian/control @@ -10,6 +10,7 @@ Package: airtime Architecture: all Pre-Depends: postgresql, python-virtualenv (>= 1.4.9) Depends: apache2, + coreutils (>= 7.5) | timeout, curl, ecasound, gzip (>= 1.3.12), @@ -36,13 +37,12 @@ Depends: apache2, php5-gd, php-pear, php5-pgsql, - python, pwgen, + python, rabbitmq-server, sudo, sysv-rc, tar (>= 1.22), - coreutils (>= 7.5) | timeout, unzip, vorbis-tools, zendframework | libzend-framework-php, From 456d9ba99a869fc566aa359c57bc04d6258e7d3b Mon Sep 17 00:00:00 2001 From: Daniel James Date: Mon, 8 Oct 2012 15:33:57 +0100 Subject: [PATCH 25/47] CC-4172: Shrink width of table to fit 1280 pixel wide display --- airtime_mvc/public/css/styles.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 73c9d8292..152f03970 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -531,7 +531,7 @@ table.library-get-file-md.table-small{ } input.input_text.sp_input_text{ - width: 200px !important; + width: 140px !important; } input.input_text.sp_extra_input_text{ @@ -560,7 +560,7 @@ input.input_text.sp_extra_input_text{ } .sp-button{ - margin-left: 399px; + margin-left: 368px; } .sp-save{ @@ -2283,7 +2283,7 @@ fieldset.closed, fieldset.display_field.closed { margin-left: 1px; } fieldset.sb-criteria-fieldset{ - min-width:670px; + min-width:503px; overflow-x:auto; } From 2f447d24a5da5e9ad6df02c1afbc02aa83aeb8f5 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 9 Oct 2012 14:21:58 +0100 Subject: [PATCH 26/47] Fixed typo in password restore message --- .../application/views/scripts/login/password-restore.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/login/password-restore.phtml b/airtime_mvc/application/views/scripts/login/password-restore.phtml index 63d265c65..bf65b2114 100644 --- a/airtime_mvc/application/views/scripts/login/password-restore.phtml +++ b/airtime_mvc/application/views/scripts/login/password-restore.phtml @@ -3,7 +3,7 @@

Reset password

-
\ No newline at end of file +
From c6dc5a818f0775ae636af1b23bfed0aee17c6b0b Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 9 Oct 2012 16:24:03 +0100 Subject: [PATCH 27/47] CC-4172: Fix alignment of 'is in the range' boxes --- airtime_mvc/public/css/styles.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 152f03970..58fda89dc 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -531,11 +531,11 @@ table.library-get-file-md.table-small{ } input.input_text.sp_input_text{ - width: 140px !important; + width: 139px !important; } input.input_text.sp_extra_input_text{ - width: 90px !important; + width: 60px !important; } .sp_text_font{ From b4fee4321c240ac146500892508ae7cc5cbe3261 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 9 Oct 2012 16:46:51 +0100 Subject: [PATCH 28/47] CC-4537: Bit rate hint should be in kbps to match actual search --- .../public/js/datatables/plugin/dataTables.columnFilter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js index 748a64c21..4084fbbdb 100644 --- a/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js +++ b/airtime_mvc/public/js/datatables/plugin/dataTables.columnFilter.js @@ -184,7 +184,7 @@ var label = ""; if (th.attr('id') == "bit_rate") { - label = " bps"; + label = " kbps"; } else if (th.attr('id') == "utime" || th.attr('id') == "mtime" || th.attr('id') == "lptime") { label = " yyyy-mm-dd"; } else if (th.attr('id') == "length") { @@ -749,4 +749,4 @@ -})(jQuery); \ No newline at end of file +})(jQuery); From 279737751bd096a1133af77b75dc63130d1ede91 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 9 Oct 2012 12:12:52 -0400 Subject: [PATCH 29/47] CC-4540: Smart Block: Error messages are too long -fixed --- airtime_mvc/public/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 58fda89dc..215fc965c 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -1617,7 +1617,7 @@ div.errors, span.errors{ } span.errors.sp-errors{ - width: 486px; + width: 429px; display: block; } From dc410f428920fd197b5aee70717b206f1bb2cc71 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 9 Oct 2012 14:20:00 -0400 Subject: [PATCH 30/47] CC-4528: Calendar: Can drag and drop current show into past (it's forbidden to set it by editing show) -fixed --- airtime_mvc/application/models/Show.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index ccbcc59d9..bb58409fd 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -179,14 +179,19 @@ SQL; if ($deltaDay > 0) { return "Shows can have a max length of 24 hours."; } + + $utc = new DateTimeZone("UTC"); + + $nowDateTime = new DateTime("now", $utc); $showInstances = CcShowInstancesQuery::create() ->filterByDbShowId($this->_showId) ->find($con); - /* Check if the show being resized and any of its repeats * overlap - with other scheduled shows */ - $utc = new DateTimeZone("UTC"); + /* Check two things: + 1. If the show being resized and any of its repeats end in the past + 2. If the show being resized and any of its repeats overlap + with other scheduled shows */ foreach ($showInstances as $si) { $startsDateTime = new DateTime($si->getDbStarts(), new DateTimeZone("UTC")); @@ -201,6 +206,10 @@ SQL; $newStartsDateTime = Application_Model_ShowInstance::addDeltas($startsDateTime, $deltaDay, $deltaMin); $newEndsDateTime = Application_Model_ShowInstance::addDeltas($endsDateTime, $deltaDay, $deltaMin); + + if ($newEndsDateTime->getTimestamp() < $nowDateTime->getTimestamp()) { + return "End date/time cannot be in the past"; + } //convert our new starts/ends to UTC. $newStartsDateTime->setTimezone($utc); From c9ac675a1060ae1327c92d82d342cabdb4bce445 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 9 Oct 2012 14:39:29 -0400 Subject: [PATCH 31/47] CC-4529: Playlist Builder: The panel of 'Adding n items' will be bigger than usual if there is a item in Playlist has expanded cue in/out setting -fixed --- .../public/js/airtime/library/events/library_playlistbuilder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js index 8c3239927..4b139f66e 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_playlistbuilder.js @@ -65,7 +65,7 @@ var AIRTIME = (function(AIRTIME) { var $el = $(this), selected = mod .getChosenAudioFilesLength(), container, message, li = $("#side_playlist ul[id='spl_sortable'] li:first"), width = li - .width(), height = li.height(); + .width(), height = 55; // dragging an element that has an unselected // checkbox. From d4fa24a9afcbdc5485c08848554ae826b0bdddb9 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 10 Oct 2012 11:17:09 +0100 Subject: [PATCH 32/47] CC-4543: Fixed colour code labels in playlist preview pop-up --- .../views/scripts/library/get-file-metadata.ajax.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml b/airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml index 4a7baecad..ad65f2417 100644 --- a/airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml +++ b/airtime_mvc/application/views/scripts/library/get-file-metadata.ajax.phtml @@ -37,8 +37,8 @@ type == "playlist") { ?>
o Web Stream
-o Dynamic Playlist
-o Static Playlist
+o Dynamic Smart Block
+o Static Smart Block
o Audio Track
@@ -47,7 +47,7 @@ type == "playlist") { ?>
Playlist Contents:
-
Static Playlist Contents:
+
Static Smart Block Contents:
contents as $row) : ?> @@ -86,7 +86,7 @@
blType == "Dynamic") { ?> -
Dynamic Playlist Criteria:
+
Dynamic Smart Block Criteria:
contents["crit"] as $criterias) : ?> From fa8c561dabd6deb336dc6093c7b7d8f63db7557e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 10 Oct 2012 11:44:38 +0100 Subject: [PATCH 33/47] CC-4543 Adjusted CSS for wider colour code label --- airtime_mvc/public/css/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 215fc965c..29d694d28 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -493,7 +493,7 @@ table.library-get-file-md.table-small{ .file-md-qtip-legend { float: right; - width: 30%; + width: 34%; font-size: 9px; padding: 0px; vertical-align:top; From 395d25158f5c02496d41b2a4a7efedc749758bcf Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 10 Oct 2012 16:26:32 +0100 Subject: [PATCH 34/47] CC-4545: Fix tooltip for Auto Switch On feature --- airtime_mvc/public/js/airtime/preferences/streamsetting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js index 45e91eed0..35f7b373e 100644 --- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js +++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js @@ -313,7 +313,7 @@ $(document).ready(function() { $("#auto_switch_help").qtip({ content: { - text: "Check this box to automatically switch on Master/Show source upon source disconnection." + text: "Check this box to automatically switch on Master/Show source upon source connection." }, hide: { delay: 500, From 2fbd8e868b251f2f6271fbdf69c1a9e2c55f9c4f Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 10 Oct 2012 14:22:09 -0400 Subject: [PATCH 35/47] CC-4547: Calendar: Create record & rebroadcast show will be blocked by "overlapping error" -fixed --- airtime_mvc/application/forms/AddShowWhen.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index ffad27fea..86018ff1a 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -243,7 +243,9 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm $minutes = "0"; $durationToAdd = "PT".$hours."H"; } - + + if (empty($formData["add_show_rebroadcast_date_absolute_".$i])) break; + $abs_rebroadcast_start = $formData["add_show_rebroadcast_date_absolute_".$i]." ". $formData["add_show_rebroadcast_time_absolute_".$i]; $rebroadcastShowStart = new DateTime($abs_rebroadcast_start); From c95050c04c97ee53c975ac6a06dc166edfd7cc10 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 10 Oct 2012 15:06:30 -0400 Subject: [PATCH 36/47] CC-4546: Library->Context view for playlist: It only displays "..." instead of Static smart block's name -fixed --- airtime_mvc/application/controllers/PlaylistController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/controllers/PlaylistController.php b/airtime_mvc/application/controllers/PlaylistController.php index 0d7a34f7f..2cca81ac2 100644 --- a/airtime_mvc/application/controllers/PlaylistController.php +++ b/airtime_mvc/application/controllers/PlaylistController.php @@ -436,7 +436,7 @@ class PlaylistController extends Zend_Controller_Action try { $obj = $this->getPlaylist($type); - $obj->setName($name); + $obj->setName(trim($name)); $obj->setDescription($description); $this->view->description = $description; $this->view->playlistName = $name; From 5f35336fd08a72fa535ca99cd07d1e638a69d02d Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 11 Oct 2012 11:49:04 -0400 Subject: [PATCH 37/47] CC-2295 Improvements to playlist builder beha...CC-2303 Cue-in Cue-out inconsistency with time values: -fixed --- airtime_mvc/application/models/Block.php | 16 ++++++++++++---- airtime_mvc/application/models/Playlist.php | 14 +++++++++++--- airtime_mvc/public/js/airtime/library/spl.js | 16 ++++++++-------- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/airtime_mvc/application/models/Block.php b/airtime_mvc/application/models/Block.php index fa305a90a..4d62b8329 100644 --- a/airtime_mvc/application/models/Block.php +++ b/airtime_mvc/application/models/Block.php @@ -229,10 +229,17 @@ SQL; $formatter = new LengthFormatter($offset_cliplength); $row['offset'] = $formatter->format(); - //format the fades in format 00(.000000) + //format the fades in format 00(.0) $fades = $this->getFadeInfo($row['position']); $row['fadein'] = $fades[0]; $row['fadeout'] = $fades[1]; + + // format the cues in format 00:00:00(.0) + // we need to add the '.0' for cues and not fades + // because propel takes care of this for us + // (we use propel to fetch the fades) + $row['cuein'] = str_pad(substr($row['cuein'], 0, 10), 10, '.0'); + $row['cueout'] = str_pad(substr($row['cueout'], 0, 10), 10, '.0'); //format original length $formatter = new LengthFormatter($row['orig_length']); @@ -611,9 +618,10 @@ SQL; - #Propel returns values in form 00.000000 format which is for only seconds. - $fadeIn = $row->getDbFadein(); - $fadeOut = $row->getDbFadeout(); + //Propel returns values in form 00.000000 format which is for only seconds. + //We only want to display 1 decimal + $fadeIn = substr($row->getDbFadein(), 0, 4); + $fadeOut = substr($row->getDbFadeout(), 0, 4); return array($fadeIn, $fadeOut); } diff --git a/airtime_mvc/application/models/Playlist.php b/airtime_mvc/application/models/Playlist.php index 021783c49..c99fbb019 100644 --- a/airtime_mvc/application/models/Playlist.php +++ b/airtime_mvc/application/models/Playlist.php @@ -244,6 +244,13 @@ SQL; $fades = $this->getFadeInfo($row['position']); $row['fadein'] = $fades[0]; $row['fadeout'] = $fades[1]; + + // format the cues in format 00:00:00(.0) + // we need to add the '.0' for cues and not fades + // because propel takes care of this for us + // (we use propel to fetch the fades) + $row['cuein'] = str_pad(substr($row['cuein'], 0, 10), 10, '.0'); + $row['cueout'] = str_pad(substr($row['cueout'], 0, 10), 10, '.0'); //format original length $formatter = new LengthFormatter($row['orig_length']); @@ -585,9 +592,10 @@ SQL; if (!$row) { return NULL; } - #Propel returns values in form 00.000000 format which is for only seconds. - $fadeIn = $row->getDbFadein(); - $fadeOut = $row->getDbFadeout(); + //Propel returns values in form 00.000000 format which is for only seconds. + //We only want to display 1 decimal + $fadeIn = substr($row->getDbFadein(), 0, 4); + $fadeOut = substr($row->getDbFadeout(), 0, 4); return array($fadeIn, $fadeOut); } diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 2513f97d9..a5937820d 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -18,13 +18,13 @@ var AIRTIME = (function(AIRTIME){ function isTimeValid(time) { //var regExpr = new RegExp("^\\d{2}[:]\\d{2}[:]\\d{2}([.]\\d{1,6})?$"); - var regExpr = new RegExp("^\\d{2}[:]([0-5]){1}([0-9]){1}[:]([0-5]){1}([0-9]){1}([.]\\d{1,6})?$"); + var regExpr = new RegExp("^\\d{2}[:]([0-5]){1}([0-9]){1}[:]([0-5]){1}([0-9]){1}([.]\\d{1})?$"); return regExpr.test(time); } function isFadeValid(fade) { - var regExpr = new RegExp("^\\d{1}(\\d{1})?([.]\\d{1,6})?$"); + var regExpr = new RegExp("^\\d{1}(\\d{1})?([.]\\d{1})?$"); return regExpr.test(fade); } @@ -74,7 +74,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isTimeValid(cueIn)){ - showError(span, "please put in a time '00:00:00 (.000000)'"); + showError(span, "please put in a time '00:00:00 (.0)'"); return; } $.post(url, @@ -111,7 +111,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isTimeValid(cueOut)){ - showError(span, "please put in a time '00:00:00 (.000000)'"); + showError(span, "please put in a time '00:00:00 (.0)'"); return; } @@ -150,7 +150,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isFadeValid(fadeIn)){ - showError(span, "please put in a time in seconds '00 (.000000)'"); + showError(span, "please put in a time in seconds '00 (.0)'"); return; } @@ -188,7 +188,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isFadeValid(fadeOut)){ - showError(span, "please put in a time in seconds '00 (.000000)'"); + showError(span, "please put in a time in seconds '00 (.0)'"); return; } @@ -545,7 +545,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isFadeValid(fadeIn)){ - showError(span, "please put in a time in seconds '00 (.000000)'"); + showError(span, "please put in a time in seconds '00 (.0)'"); return; } @@ -569,7 +569,7 @@ var AIRTIME = (function(AIRTIME){ type = $('#obj_type').val(); if (!isFadeValid(fadeOut)){ - showError(span, "please put in a time in seconds '00 (.000000)'"); + showError(span, "please put in a time in seconds '00 (.0)'"); return; } From 843a456b3b573eba5bdd86a2d9248944313c530e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 11 Oct 2012 17:03:09 +0100 Subject: [PATCH 38/47] CC-4552: Fixed various errors in Support Feedback page --- .../views/scripts/form/support-setting.phtml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/support-setting.phtml b/airtime_mvc/application/views/scripts/form/support-setting.phtml index 46b93bb6c..247fc2cf2 100644 --- a/airtime_mvc/application/views/scripts/form/support-setting.phtml +++ b/airtime_mvc/application/views/scripts/form/support-setting.phtml @@ -3,9 +3,9 @@
- Help Airtime improve by letting us know how you are using it. This info - will be collected regularly in order to enhance your user experience.

- Click "Yes, help Airtime" and we'll make sure the features you use are + Help Airtime improve by letting Sourcefabric know how you are using it. This information + will be collected regularly in order to enhance your user experience.
+ Click the "Send support feedback" box and we'll make sure the features you use are constantly improving.
-
Click the box below to advertise your station on - Sourcefabric.org. - In order to promote your station, "Send support feedback" must be enabled. This data will be collected in addition to the support feedback.
+
Click the box below to promote your station on + Sourcefabric.org. +
-

Note: In order to promote your station, "Send support feedback" must be enabled

+
(In order to promote your station, "Send support feedback" must be enabled).
;">
@@ -179,7 +179,7 @@ - Terms and Conditions + Sourcefabric Privacy Policy From 5c0bdfa2db968134a6d48e7d15cff97164bfbbe0 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 11 Oct 2012 12:11:53 -0400 Subject: [PATCH 39/47] CC-4544: Playlist/Smart Blocks: Add cue format helper -done --- .../application/views/scripts/playlist/playlist.phtml | 4 ++-- airtime_mvc/application/views/scripts/playlist/set-cue.phtml | 4 ++-- .../application/views/scripts/playlist/set-fade.phtml | 4 ++-- .../application/views/scripts/playlist/smart-block.phtml | 4 ++-- airtime_mvc/public/css/playlist_builder.css | 5 +++++ 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/application/views/scripts/playlist/playlist.phtml b/airtime_mvc/application/views/scripts/playlist/playlist.phtml index 4ae48b038..6f962b97b 100644 --- a/airtime_mvc/application/views/scripts/playlist/playlist.phtml +++ b/airtime_mvc/application/views/scripts/playlist/playlist.phtml @@ -57,10 +57,10 @@ if (isset($this->obj)) {