refactor: Improve code readability and structure across TTS modules
This commit is contained in:
@@ -244,7 +244,10 @@ class PlaylistService:
|
||||
if was_current:
|
||||
main_playlist = await self.get_main_playlist()
|
||||
await self.playlist_repo.update(main_playlist, {"is_current": True})
|
||||
logger.info("Set main playlist as current after deleting current playlist %s", playlist_id)
|
||||
logger.info(
|
||||
"Set main playlist as current after deleting current playlist %s",
|
||||
playlist_id,
|
||||
)
|
||||
|
||||
# Reload player to reflect the change
|
||||
await _reload_player_playlist()
|
||||
@@ -562,7 +565,11 @@ class PlaylistService:
|
||||
await self.session.delete(playlist_sound)
|
||||
|
||||
await self.session.commit()
|
||||
logger.info("Deleted %d playlist_sound records for playlist %s", len(playlist_sounds), playlist_id)
|
||||
logger.info(
|
||||
"Deleted %d playlist_sound records for playlist %s",
|
||||
len(playlist_sounds),
|
||||
playlist_id,
|
||||
)
|
||||
|
||||
async def _unset_current_playlist(self) -> None:
|
||||
"""Unset any current playlist globally."""
|
||||
|
||||
Reference in New Issue
Block a user