From 4c5386c0f3f3c2ef5d108bd3707cd2154ba1b097 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 2 Nov 2011 15:19:27 -0400 Subject: [PATCH 01/14] 1.9.5 preparations --- CREDITS | 4 ++++ Changelog | 8 ++++++++ VERSION | 2 +- airtime_mvc/application/configs/constants.php | 2 +- python_apps/api_clients/api_client.py | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CREDITS b/CREDITS index 745ae324b..162aa2ef9 100644 --- a/CREDITS +++ b/CREDITS @@ -1,6 +1,10 @@ ======= CREDITS ======= +Version 1.9.5 +------------- +Same as previous version. + Version 1.9.4 ------------- Same as previous version. diff --git a/Changelog b/Changelog index 2b25f4df9..f7f87c1f3 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,11 @@ +1.9.5 - Nov 2, 2011 + *(CC-2743, CC-2769) Fixed problem where Media-Monitor would try to parse a file's metadata while the OS was still copying it + *(CC-2882) Fixed a bug where a couldn't unregister an old directory name from Airtime after it was renamed. + *(CC-2891) Fixed a bug with parsing Unicode metadata in audio files. + *(CC-2972) Fixed a bug where systems behind a firewall would have Airtime services communicating via its external IP. + *(CC-2975) Issue with older python-virtualenv identified. Airtime installer now requires virtualenv >= 1.4.9 + *(CC-3012, CC-3013) Fixed an issue with Media-Monitor crashing when parsing certain audio tracks + 1.9.4 - Sept 13, 2011 *Improvements -DEB packages now available for Ubuntu & Debian diff --git a/VERSION b/VERSION index 753715b20..5bd3a7dff 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=1.9.4 +PRODUCT_RELEASE=1.9.5 diff --git a/airtime_mvc/application/configs/constants.php b/airtime_mvc/application/configs/constants.php index c9f0132f7..03661ac9a 100644 --- a/airtime_mvc/application/configs/constants.php +++ b/airtime_mvc/application/configs/constants.php @@ -1,6 +1,6 @@ Date: Wed, 2 Nov 2011 15:34:47 -0400 Subject: [PATCH 02/14] Airtime 1.9.5 upgrade script --- install_minimal/include/airtime-upgrade.php | 3 ++ .../airtime-1.9.5/airtime-upgrade.php | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php diff --git a/install_minimal/include/airtime-upgrade.php b/install_minimal/include/airtime-upgrade.php index c85c2f300..b7da2af24 100644 --- a/install_minimal/include/airtime-upgrade.php +++ b/install_minimal/include/airtime-upgrade.php @@ -77,6 +77,9 @@ if (strcmp($version, "1.9.3") < 0){ if (strcmp($version, "1.9.4") < 0){ passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-1.9.4/airtime-upgrade.php"); } +if (strcmp($version, "1.9.5") < 0){ + passthru("php --php-ini $SCRIPTPATH/../airtime-php.ini $SCRIPTPATH/../upgrades/airtime-1.9.5/airtime-upgrade.php"); +} //set the new version in the database. $sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'"; diff --git a/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php new file mode 100644 index 000000000..7981a073a --- /dev/null +++ b/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php @@ -0,0 +1,37 @@ + Date: Thu, 3 Nov 2011 15:25:09 -0400 Subject: [PATCH 03/14] CC-3016: Import files doesn't work on Debian(1.9.5, 2.0) - fixed --- python_apps/media-monitor/MediaMonitor.py | 2 +- .../airtimefilemonitor/airtimeprocessevent.py | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/python_apps/media-monitor/MediaMonitor.py b/python_apps/media-monitor/MediaMonitor.py index 32ca17878..e5821049c 100644 --- a/python_apps/media-monitor/MediaMonitor.py +++ b/python_apps/media-monitor/MediaMonitor.py @@ -64,7 +64,7 @@ try: bootstrap = AirtimeMediaMonitorBootstrap(logger, pe, api_client, mmc) bootstrap.scan() - notifier = AirtimeNotifier(wm, pe, read_freq=0.1, timeout=0, airtime_config=config, api_client=api_client, bootstrap=bootstrap, mmc=mmc) + notifier = AirtimeNotifier(wm, pe, read_freq=0, timeout=0, airtime_config=config, api_client=api_client, bootstrap=bootstrap, mmc=mmc) notifier.coalesce_events() #create 5 worker threads diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index 5c8e9f9d6..e66425651 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -1,6 +1,7 @@ import socket import logging import time +import os import pyinotify from pyinotify import ProcessEvent @@ -90,8 +91,9 @@ class AirtimeProcessEvent(ProcessEvent): def process_IN_CREATE(self, event): self.logger.info("event: %s", event) - # record the timestamp of the time on IN_CREATE event - self.create_dict[event.pathname] = time.time() + if not event.dir: + # record the timestamp of the time on IN_CREATE event + self.create_dict[event.pathname] = time.time() #event.dir: True if the event was raised against a directory. #event.name: filename @@ -268,8 +270,18 @@ class AirtimeProcessEvent(ProcessEvent): # this part is like a garbage collector for k, t in self.create_dict.items(): now = time.time() - if now - t > 300: - del self.create_dict[k] + if now - t > 5: + # check if file exist + if os.path.exists(k): + # check if file is open + command = "lsof "+k + f = os.popen(command) + if not f.readlines(): + self.logger.info("Handling file: %s", k) + self.handle_created_file(False, k, os.path.basename(k)) + del self.create_dict[k] + else: + del self.create_dict[k] #check for any events received from Airtime. try: From a156548ba623d23e958f2858c4364e3c9540c1ea Mon Sep 17 00:00:00 2001 From: James Date: Thu, 3 Nov 2011 15:35:04 -0400 Subject: [PATCH 04/14] CC-3016: Import files doesn't work on Debian(1.9.5, 2.0) - adding comment --- .../media-monitor/airtimefilemonitor/airtimeprocessevent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index e66425651..af8658c2a 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -272,6 +272,9 @@ class AirtimeProcessEvent(ProcessEvent): now = time.time() if now - t > 5: # check if file exist + # When whole directory is copied to the organized dir, + # inotify doesn't fire IN_CLOSE_WRITE, hench we need special way of + # handling those cases. if os.path.exists(k): # check if file is open command = "lsof "+k From 8e88c56bc6524920f164ae426b275c77ec779afe Mon Sep 17 00:00:00 2001 From: James Date: Thu, 27 Oct 2011 14:34:03 -0400 Subject: [PATCH 05/14] CC-2954: Exception in media monitor using Dropbox - This will take care of the exception issue --- .../airtimefilemonitor/mediamonitorcommon.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index bf0ab3f8e..0bb86755b 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -26,9 +26,14 @@ class MediaMonitorCommon: def is_temp_file(self, filename): info = filename.split(".") - - if(info[-2] in self.supported_file_formats): - return True + + # if file doesn't have any extension, info[-2] throws exception + # Hence, checking length of info before we do anything + if(len(info) >= 3): + if(info[-2] in self.supported_file_formats): + return True + else: + return False else: return False From 9448728d636ff45d7069ad242ada82491da0eb9c Mon Sep 17 00:00:00 2001 From: James Date: Mon, 3 Oct 2011 14:26:10 -0400 Subject: [PATCH 06/14] CC-2904: Space missing between two boxes on "Playlist Builder" - fixed --- airtime_mvc/application/layouts/scripts/library.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/layouts/scripts/library.phtml b/airtime_mvc/application/layouts/scripts/library.phtml index 2e4536188..65573a592 100644 --- a/airtime_mvc/application/layouts/scripts/library.phtml +++ b/airtime_mvc/application/layouts/scripts/library.phtml @@ -20,7 +20,7 @@
-
layout()->library ?>
+
layout()->library ?>
layout()->spl ?>
From b33ced99c8017190e160b469400eecde10d28d2d Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 3 Nov 2011 22:12:03 -0400 Subject: [PATCH 07/14] CC-2954: Exception in media monitor using Dropbox -Need to check if size is >=2, not 3. --- .../media-monitor/airtimefilemonitor/mediamonitorcommon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index 0bb86755b..dc7e81768 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -29,7 +29,7 @@ class MediaMonitorCommon: # if file doesn't have any extension, info[-2] throws exception # Hence, checking length of info before we do anything - if(len(info) >= 3): + if(len(info) >= 2): if(info[-2] in self.supported_file_formats): return True else: From eca76dc2f06c678e611577cf02c9a28a53b776cc Mon Sep 17 00:00:00 2001 From: James Date: Mon, 7 Nov 2011 13:16:50 -0500 Subject: [PATCH 08/14] CC-2895: Manage Media Folder: Title disappears after adding watched folder - fixed --- airtime_mvc/public/js/airtime/preferences/musicdirs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airtime_mvc/public/js/airtime/preferences/musicdirs.js b/airtime_mvc/public/js/airtime/preferences/musicdirs.js index a71e7aa31..44974d483 100644 --- a/airtime_mvc/public/js/airtime/preferences/musicdirs.js +++ b/airtime_mvc/public/js/airtime/preferences/musicdirs.js @@ -69,6 +69,7 @@ function setWatchedDirEvents() { function(json) { $("#watched-folder-section").empty(); + $("#watched-folder-section").append("

Manage Media Folders

"); $("#watched-folder-section").append(json.subform); setWatchedDirEvents(); }); @@ -86,6 +87,7 @@ function setWatchedDirEvents() { function(json) { $("#watched-folder-section").empty(); + $("#watched-folder-section").append("

Manage Media Folders

"); $("#watched-folder-section").append(json.subform); setWatchedDirEvents(); }); From 97b0807a67a1a7fdb081dfcaf6e74bc8daf08db1 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Tue, 8 Nov 2011 17:19:46 -0500 Subject: [PATCH 09/14] do a --force-yes for non-free packages --- install_full/ubuntu/airtime-full-install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index 190c7ebb9..f95064b17 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -24,11 +24,14 @@ echo "----------------------------------------------------" # Updated package list apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ -php-pear php5-gd postgresql odbc-postgresql python2.6 lame libsoundtouch-ocaml \ -libvorbis-ocaml-dev libmp3lame-dev libtaglib-ocaml libao-ocaml libmad-ocaml \ +php-pear php5-gd postgresql odbc-postgresql python2.6 libsoundtouch-ocaml \ +libvorbis-ocaml-dev libtaglib-ocaml libao-ocaml libmad-ocaml \ libesd0 icecast2 libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ ecasound php5-curl mpg123 rabbitmq-server monit python-virtualenv patch +#install packages with --force-yes option +apt-get -y --force-yes libmp3lame-dev lame + if [ "$?" -ne "0" ]; then echo "" echo "There was a problem with apt-get. Please check the above error and try again." From a551e08fce9998b59f55f3f6236112afe23c86ae Mon Sep 17 00:00:00 2001 From: James Date: Wed, 9 Nov 2011 11:27:17 -0500 Subject: [PATCH 10/14] - cleaning up a dirty code --- airtime_mvc/application/models/MusicDir.php | 1 - 1 file changed, 1 deletion(-) diff --git a/airtime_mvc/application/models/MusicDir.php b/airtime_mvc/application/models/MusicDir.php index b1416ef7f..5e44b7bbd 100644 --- a/airtime_mvc/application/models/MusicDir.php +++ b/airtime_mvc/application/models/MusicDir.php @@ -282,7 +282,6 @@ class MusicDir { } public static function removeWatchedDir($p_dir){ - $p_dir = realpath($p_dir)."/"; $real_path = realpath($p_dir)."/"; if($real_path != "/"){ $p_dir = $real_path; From acc32df0609ca88fdbc2ee896fe891315c219535 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 9 Nov 2011 11:51:58 -0500 Subject: [PATCH 11/14] 1.9.5 upgrade script had incorrect class name. --- install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php b/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php index 7981a073a..99de832f2 100644 --- a/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php +++ b/install_minimal/upgrades/airtime-1.9.5/airtime-upgrade.php @@ -1,6 +1,6 @@ Date: Wed, 9 Nov 2011 13:35:22 -0500 Subject: [PATCH 12/14] CC-3016: Import files doesn't work on Debian(1.9.5, 2.0) - added extra comment --- .../media-monitor/airtimefilemonitor/airtimeprocessevent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py index af8658c2a..cfd605cf2 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimeprocessevent.py @@ -274,7 +274,8 @@ class AirtimeProcessEvent(ProcessEvent): # check if file exist # When whole directory is copied to the organized dir, # inotify doesn't fire IN_CLOSE_WRITE, hench we need special way of - # handling those cases. + # handling those cases. We are manully calling handle_created_file + # function. if os.path.exists(k): # check if file is open command = "lsof "+k From 86d316a2f9ad3062886cc22ffd2c1477919b4325 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 9 Nov 2011 15:09:15 -0500 Subject: [PATCH 13/14] -airtime install script fixes. --- install_full/ubuntu/airtime-full-install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index f95064b17..89f98e976 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -22,6 +22,8 @@ echo "----------------------------------------------------" echo " 1. Install Packages" echo "----------------------------------------------------" +apt-get update + # Updated package list apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ php-pear php5-gd postgresql odbc-postgresql python2.6 libsoundtouch-ocaml \ @@ -30,7 +32,7 @@ libesd0 icecast2 libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ ecasound php5-curl mpg123 rabbitmq-server monit python-virtualenv patch #install packages with --force-yes option -apt-get -y --force-yes libmp3lame-dev lame +apt-get -y --force-yes install libmp3lame-dev lame if [ "$?" -ne "0" ]; then echo "" From 45d3d75d1a2b1c659fbf7358b3ce751bf6ac9b2b Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 10 Nov 2011 12:33:54 -0500 Subject: [PATCH 14/14] CC-2870: Create testing infrastructure for testing upgrades -small fix for debian. icecast2 needs to be force-yes installed. (unverified package) --- install_full/ubuntu/airtime-full-install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_full/ubuntu/airtime-full-install b/install_full/ubuntu/airtime-full-install index 89f98e976..9f0b7344d 100755 --- a/install_full/ubuntu/airtime-full-install +++ b/install_full/ubuntu/airtime-full-install @@ -28,11 +28,11 @@ apt-get update apt-get -y install tar gzip curl apache2 php5-pgsql libapache2-mod-php5 \ php-pear php5-gd postgresql odbc-postgresql python2.6 libsoundtouch-ocaml \ libvorbis-ocaml-dev libtaglib-ocaml libao-ocaml libmad-ocaml \ -libesd0 icecast2 libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ +libesd0 libportaudio2 libsamplerate0 libcamomile-ocaml-dev \ ecasound php5-curl mpg123 rabbitmq-server monit python-virtualenv patch #install packages with --force-yes option -apt-get -y --force-yes install libmp3lame-dev lame +apt-get -y --force-yes install libmp3lame-dev lame icecast2 if [ "$?" -ne "0" ]; then echo ""