mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
cleanrup
This commit is contained in:
@@ -177,6 +177,7 @@ def get_playlist(playlistid: str):
|
||||
playlist.last_updated = date_string_to_time_passed(playlist.last_updated)
|
||||
|
||||
playlist.set_duration(duration)
|
||||
playlist.set_count(len(tracks))
|
||||
|
||||
if not playlist.has_image:
|
||||
playlist.images = get_first_4_images(tracks)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Helper functions for use with the SQLite database.
|
||||
"""
|
||||
|
||||
from pprint import pprint
|
||||
import sqlite3
|
||||
from sqlite3 import Connection, Cursor
|
||||
import time
|
||||
@@ -46,7 +45,6 @@ def tuple_to_playlist(playlist: tuple):
|
||||
"""
|
||||
Takes a tuple and returns a Playlist object
|
||||
"""
|
||||
pprint(playlist)
|
||||
return Playlist(*playlist)
|
||||
|
||||
|
||||
|
||||
@@ -41,5 +41,5 @@ def apply_migrations():
|
||||
log.info("Running new migration: %s", m.name)
|
||||
m.migrate()
|
||||
|
||||
# update migration version
|
||||
# bump migration version
|
||||
MigrationManager.set_version(len(migrations))
|
||||
|
||||
@@ -110,6 +110,7 @@ class AddSettingsToPlaylistTable:
|
||||
# (my first coroutine)
|
||||
pipeline = insert_playlist()
|
||||
transform_playlists(pipeline, playlists)
|
||||
pipeline.close()
|
||||
|
||||
cur.close()
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ class Playlist:
|
||||
|
||||
def set_duration(self, duration: int):
|
||||
self.duration = duration
|
||||
|
||||
def set_count(self, count: int):
|
||||
self.count = count
|
||||
|
||||
def clear_lists(self):
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"""
|
||||
Requests related to artists
|
||||
"""
|
||||
from pprint import pprint
|
||||
import requests
|
||||
|
||||
from app import settings
|
||||
|
||||
Reference in New Issue
Block a user