Merge branch '2.1.x' into devel

Conflicts:
	airtime_mvc/application/controllers/ApiController.php
	airtime_mvc/application/controllers/LibraryController.php
	airtime_mvc/application/controllers/PlaylistController.php
	airtime_mvc/application/models/Playlist.php
	python_apps/media-monitor/airtimefilemonitor/airtimemediamonitorbootstrap.py
	python_apps/media-monitor/airtimefilemonitor/airtimemetadata.py
This commit is contained in:
Martin Konecny 2012-07-16 14:31:03 -04:00
commit 4ebcb1b1f9
23 changed files with 233 additions and 124 deletions

View file

@ -362,10 +362,10 @@ class AirTimeApiClient():
return response
#returns a list of all db files for a given directory in JSON format:
#{"files":["path/to/file1", "path/to/file2"]}
#Note that these are relative paths to the given directory. The full
#path is not returned.
# returns a list of all db files for a given directory in JSON format:
# ["path/to/file1", "path/to/file2"]
# Note that these are relative paths to the given directory. The full
# path is not returned.
def list_all_db_files(self, dir_id):
logger = self.logger
try:
@ -377,10 +377,14 @@ class AirTimeApiClient():
response = self.get_response_from_server(url)
response = json.loads(response)
except Exception, e:
response = None
response = {}
logger.error("Exception: %s", e)
return response
try:
return response["files"]
except KeyError:
self.logger.error("Could not find index 'files' in dictionary: %s", str(response))
return []
def list_all_watched_dirs(self):
logger = self.logger