cc-2419: media monitor import on startup

-fixed support for watched dirs
This commit is contained in:
martin 2011-07-04 17:37:05 -04:00
parent c67e711a05
commit df1dec2078
7 changed files with 38 additions and 22 deletions

View file

@ -105,7 +105,7 @@ class ApiClientInterface:
def update_media_metadata(self, md):
pass
def list_all_db_files(self):
def list_all_db_files(self, dir_id):
pass
def list_all_watched_dirs(self):
@ -409,12 +409,13 @@ class AirTimeApiClient(ApiClientInterface):
return response
def list_all_db_files(self):
def list_all_db_files(self, dir_id):
logger = logging.getLogger()
try:
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["list_all_db_files"])
url = url.replace("%%api_key%%", self.config["api_key"])
url = url.replace("%%dir_id%%", dir_id)
req = urllib2.Request(url)
response = urllib2.urlopen(req).read()