Skip to content

Commit 8736aca

Browse files
committed
add/mirror exception messages for PlayableContentFeeder loading content functions
1 parent 10748b8 commit 8736aca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

librespot/audio/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ def load_episode(self, episode_id: EpisodeId,
778778
self.logger.fatal(
779779
"Couldn't find any suitable audio file, available: {}".format(
780780
episode.audio))
781+
raise FeederException("Cannot find suitable audio file")
781782
return self.load_stream(file, None, episode, preload, halt_listener)
782783

783784
def load_track(self, track_id_or_track: typing.Union[TrackId,
@@ -797,7 +798,7 @@ def load_track(self, track_id_or_track: typing.Union[TrackId,
797798
self.logger.fatal(
798799
"Couldn't find any suitable audio file, available: {}".format(
799800
track.file))
800-
raise FeederException()
801+
raise FeederException("Cannot find suitable audio file")
801802
return self.load_stream(file, track, None, preload, halt_listener)
802803

803804
def pick_alternative_if_necessary(

0 commit comments

Comments
 (0)