cc-1799 : Filesystem
avoiding useless calls to airtime about renamed files.
This commit is contained in:
parent
3f739458cd
commit
59a11663cf
3 changed files with 24 additions and 21 deletions
|
@ -369,7 +369,6 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["update_media_url"])
|
||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||
url = url.replace("%%mode%%", mode)
|
||||
logger.debug(url)
|
||||
|
||||
data = urllib.urlencode(md)
|
||||
req = urllib2.Request(url, data)
|
||||
|
@ -380,13 +379,10 @@ class AirTimeApiClient(ApiClientInterface):
|
|||
|
||||
if(is_record):
|
||||
url = "http://%s:%s/%s/%s" % (self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["upload_recorded"])
|
||||
logger.debug(url)
|
||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||
logger.debug(url)
|
||||
url = url.replace("%%fileid%%", str(response[u'id']))
|
||||
logger.debug(url)
|
||||
url = url.replace("%%showinstanceid%%", str(md['MDATA_KEY_TRACKNUMBER']))
|
||||
logger.debug(url)
|
||||
url = url.replace("%%api_key%%", self.config["api_key"])
|
||||
|
||||
req = urllib2.Request(url)
|
||||
response = urllib2.urlopen(req).read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue