@@ -368,19 +368,20 @@ def _init_sources(self):
368368 console .print ("[green]✓[/green] YouTube Music available" )
369369
370370 def _init_scrobbler (self ):
371- """Initialize Last.fm scrobbler."""
371+ """Initialize Last.fm scrobbler. Exits if Last.fm fails. """
372372 lastfm_config = self .config .get ("lastfm" , {})
373373 api_key = lastfm_config .get ("api_key" )
374374 api_secret = lastfm_config .get ("api_secret" )
375375 username = lastfm_config .get ("username" )
376376 password = lastfm_config .get ("password" )
377377
378378 if not all ([api_key , api_secret , username , password ]):
379- return
379+ console .print ("[red]✗[/red] Last.fm not configured (required)" )
380+ sys .exit (1 )
380381
381382 if not PYLAST_AVAILABLE :
382- console .print ("[yellow]![/yellow ] pylast not installed, scrobbling disabled " )
383- return
383+ console .print ("[red]✗[/red ] pylast not installed (required for Last.fm) " )
384+ sys . exit ( 1 )
384385
385386 password_hash = pylast .md5 (password )
386387 self .scrobbler = Scrobbler (api_key , api_secret , username , password_hash )
@@ -390,6 +391,7 @@ def _init_scrobbler(self):
390391 else :
391392 error = getattr (self .scrobbler , '_last_error' , 'unknown error' )
392393 console .print (f"[red]✗[/red] Last.fm: { error } " )
394+ sys .exit (1 )
393395
394396 def _setup_callbacks (self ):
395397 """Set up player callbacks."""
0 commit comments