bugfix-bugfix
This commit is contained in:
+3
-4
@@ -69,9 +69,8 @@ def call(method, params=None):
|
|||||||
try:
|
try:
|
||||||
response = requests.post(MOPIDY_RPC_URL, data=json, timeout=REQUEST_TIMEOUT)
|
response = requests.post(MOPIDY_RPC_URL, data=json, timeout=REQUEST_TIMEOUT)
|
||||||
logging.info('Response: ' + response.text)
|
logging.info('Response: ' + response.text)
|
||||||
except Exception as ex:
|
except requests.exceptions.Timeout:
|
||||||
logging.error('Exeption during request')
|
logging.error('The request timed out')
|
||||||
logging.error(ex.output)
|
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
@@ -174,7 +173,7 @@ try:
|
|||||||
response = requests.post(MOPIDY_RPC_URL, data='{"jsonrpc": "2.0", "id": 1, "method": "core.tracklist.clear"}', timeout=REQUEST_TIMEOUT)
|
response = requests.post(MOPIDY_RPC_URL, data='{"jsonrpc": "2.0", "id": 1, "method": "core.tracklist.clear"}', timeout=REQUEST_TIMEOUT)
|
||||||
except:
|
except:
|
||||||
logging.debug("Timeout while connecting to the server")
|
logging.debug("Timeout while connecting to the server")
|
||||||
time.sleep(1)
|
time.sleep(5)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
play_sound(SOUND_OK)
|
play_sound(SOUND_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user