Restyle Add edit playlist modal (#28)

* Restyled by black

* Restyled by clang-format

* Restyled by isort

* Restyled by prettier

* Restyled by prettier-markdown

* Restyled by reorder-python-imports

* Restyled by whitespace

* Restyled by yapf

Co-authored-by: Restyled.io <commits@restyled.io>
This commit is contained in:
restyled-io[bot]
2022-04-09 02:19:27 +03:00
committed by GitHub
parent bf6aaea4ff
commit 2e512bc223
7 changed files with 21 additions and 6 deletions
+3 -1
View File
@@ -2,6 +2,7 @@
Contains all the playlist routes.
"""
from datetime import datetime
from app import api
from app import exceptions
from app import instances
@@ -20,7 +21,8 @@ TrackExistsInPlaylist = exceptions.TrackExistsInPlaylist
@playlist_bp.route("/playlists", methods=["GET"])
def get_all_playlists():
playlists = [
serializer.Playlist(p, construct_last_updated=False) for p in api.PLAYLISTS
serializer.Playlist(p, construct_last_updated=False)
for p in api.PLAYLISTS
]
playlists.sort(
key=lambda p: datetime.strptime(p.lastUpdated, "%Y-%m-%d %H:%M:%S"),
-1
View File
@@ -1,7 +1,6 @@
"""
This library contains all the functions related to playlists.
"""
import os
import random
import string
+4 -1
View File
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from datetime import datetime
from app import models
@@ -61,7 +62,9 @@ class Playlist:
description: str
count: int = 0
def __init__(self, p: models.Playlist, construct_last_updated: bool = True) -> None:
def __init__(self,
p: models.Playlist,
construct_last_updated: bool = True) -> None:
self.playlistid = p.playlistid
self.name = p.name
self.image = p.image
+3
View File
@@ -8,7 +8,9 @@
- [ ] Compress thumbnails
# Features +
## Needed features
- [ ] Adding songs to queue
<!-- -->
- [ ] Add keyboard shortcuts
@@ -19,6 +21,7 @@
- [ ] Playing song radio
## Future features
- [ ] Toggle shuffle
- [ ] Toggle repeat
- [ ] Suggest similar artists