From 8d21e4ea95f9134e02f231389b4dfd952b9e146f Mon Sep 17 00:00:00 2001 From: James Date: Tue, 4 Oct 2011 10:19:44 -0400 Subject: [PATCH 1/3] CC-2919: Media Monitor: recorded show doesn't show on library after recording is done - comments were added - timestamps updates with IN_MODIFY --- .../airtimefilemonitor/airtimeprocessevent.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index fd121c725..30685b54d 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -93,6 +93,7 @@ class AirtimeProcessEvent(ProcessEvent): if not event.dir: if self.mmc.is_parent_directory(event.pathname, self.config.recorded_directory): self.file_events.append({'mode': self.config.MODE_CREATE, 'filepath': event.pathname, 'is_recorded_show': True}) + # record the timestamp of the time on IN_CREATE event self.create_dict[event.pathname] = time.time() @@ -104,7 +105,9 @@ class AirtimeProcessEvent(ProcessEvent): def process_IN_CLOSE_WRITE(self, event): self.logger.info("event: %s", event) self.logger.info("create_dict: %s", self.create_dict) + if event.pathname in self.create_dict: + # detele corresponding entry from create_dict self.create_dict.pop(event.pathname) self.handle_created_file(event.dir, event.pathname, event.name) @@ -144,6 +147,9 @@ class AirtimeProcessEvent(ProcessEvent): self.handle_modified_file(event.dir, event.pathname, event.name) def handle_modified_file(self, dir, pathname, name): + # update timestamp on create_dict for the entry with pathname as the key + if pathname in self.create_dict: + self.create_dict[pathname] = time.time() if not dir and not self.mmc.is_parent_directory(pathname, self.config.organize_directory): self.logger.info("Modified: %s", pathname) if self.mmc.is_audio_file(name): @@ -266,10 +272,12 @@ class AirtimeProcessEvent(ProcessEvent): #it from the Airtime directory. del self.cookies_IN_MOVED_FROM[k] self.handle_removed_file(False, event.pathname) - + + # we don't want create_dict grow infinitely + # this part is like a garbage collector for k, t in self.create_dict.items(): now = time.time() - if now - t > 5: + if now - t > 300: del self.create_dict[k] #check for any events received from Airtime. From fed9c62b436ea9a16f9d589321a0aae05ff50e1a Mon Sep 17 00:00:00 2001 From: James Date: Tue, 4 Oct 2011 11:38:20 -0400 Subject: [PATCH 2/3] CC-2917: Adding show, when inputting time and specifying a bogus time (like 55555), then Nan-Nan-Nan shows up(possibly when tabbing) - adding info about the meioMask in LICENSE_3RD_PARTY --- LICENSE_3RD_PARTY | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index 251815517..9bc1f8019 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -111,6 +111,10 @@ Non-linked code: * Server Browse - Web site: http://code.google.com/p/jq-serverbrowse/ - License: BSD 2-Clause + + * meioMask + - Web site: http://www.meiocodigo.com/ + - License: MIT ------------- Media-Monitor From b682c2cd10d95350379acc0c18b3db1306f08f7e Mon Sep 17 00:00:00 2001 From: James Date: Tue, 4 Oct 2011 12:04:09 -0400 Subject: [PATCH 3/3] CC-2902: Broken link in interface: "Click the box below to advertise your station on Sourcefabric.org" - fixed --- .../application/views/scripts/form/register-dialog.phtml | 2 +- .../application/views/scripts/form/support-setting.phtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/views/scripts/form/register-dialog.phtml b/airtime_mvc/application/views/scripts/form/register-dialog.phtml index f600b3352..f74715250 100644 --- a/airtime_mvc/application/views/scripts/form/register-dialog.phtml +++ b/airtime_mvc/application/views/scripts/form/register-dialog.phtml @@ -21,7 +21,7 @@
Click the box below to advertise your station on - Sourcefabric.org. + 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.
diff --git a/airtime_mvc/application/views/scripts/form/support-setting.phtml b/airtime_mvc/application/views/scripts/form/support-setting.phtml index b670733e2..9eb9af547 100644 --- a/airtime_mvc/application/views/scripts/form/support-setting.phtml +++ b/airtime_mvc/application/views/scripts/form/support-setting.phtml @@ -17,7 +17,7 @@
Click the box below to advertise your station on - Sourcefabric.org. + 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.