From cf27c18df7de72582c5976f9f0e51ebe8ba91426 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 31 Oct 2012 11:01:24 -0400 Subject: [PATCH] Refactored update_replay_gain_values --- python_apps/api_clients/api_client.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index 948237193..e29cae003 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -407,12 +407,8 @@ class AirtimeApiClient(object): 'pairs' is a list of pairs in (x, y), where x is the file's database row id and y is the file's replay_gain value in dB """ - #http://localhost/api/update-replay-gain-value/ - url = self.construct_url("update_replay_gain_value") - data = urllib.urlencode({'data': json.dumps(pairs)}) - request = urllib2.Request(url, data) - - self.logger.debug(self.get_response_from_server(request)) + self.logger.debug(self.services.update_replay_gain_value( + _post_data={'data': json.dumps(pairs)})) def notify_webstream_data(self, data, media_id):