Better failure handling
This commit is contained in:
@@ -399,7 +399,6 @@ class LibremsonicApp(Gtk.Application):
|
|||||||
# Do this the old fashioned way so that we can have access to ``reset``
|
# Do this the old fashioned way so that we can have access to ``reset``
|
||||||
# in the callback.
|
# in the callback.
|
||||||
def do_play_song(song: Child):
|
def do_play_song(song: Child):
|
||||||
# TODO force mp3 while getting chromecast working.
|
|
||||||
uri, stream = CacheManager.get_song_filename_or_stream(
|
uri, stream = CacheManager.get_song_filename_or_stream(
|
||||||
song,
|
song,
|
||||||
format='mp3',
|
format='mp3',
|
||||||
|
@@ -90,7 +90,7 @@ class Server:
|
|||||||
result = requests.get(url, params=params)
|
result = requests.get(url, params=params)
|
||||||
# TODO make better
|
# TODO make better
|
||||||
if result.status_code != 200:
|
if result.status_code != 200:
|
||||||
raise Exception(f'Fail! {result.status_code}')
|
raise Exception(f'[FAIL] get: {url} status={result.status_code}')
|
||||||
|
|
||||||
print(f'[FINISH] get: {url}')
|
print(f'[FINISH] get: {url}')
|
||||||
return result
|
return result
|
||||||
|
Reference in New Issue
Block a user