implement playlist image cleaner

This commit is contained in:
Parsa Sadeghi Asl
2025-04-03 19:26:55 +03:30
parent 37a4458755
commit 0ec6eee7e9
2 changed files with 36 additions and 0 deletions
+2
View File
@@ -318,6 +318,7 @@ def update_playlist_info(path: PlaylistIDPath, form: UpdatePlaylistForm):
p_tuple = (*playlist.values(),)
PlaylistTable.update_one(playlistid, playlist)
playlistlib.cleanup_playlist_images()
playlist = models.Playlist(*p_tuple)
playlist.last_updated = date_string_to_time_passed(playlist.last_updated)
@@ -377,6 +378,7 @@ def remove_playlist(path: PlaylistIDPath):
Delete playlist
"""
PlaylistTable.remove_one(path.playlistid)
playlistlib.cleanup_playlist_images()
return {"msg": "Done"}, 200