mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 20:43:04 +00:00
Restyle New album page design (#77)
This commit is contained in:
committed by
Mungai Geoffrey
parent
95ad7ceadc
commit
73891aa5cf
@@ -64,12 +64,8 @@ def get_album():
|
||||
except AttributeError:
|
||||
album.duration = 0
|
||||
|
||||
if (
|
||||
album.count == 1
|
||||
and tracks[0].title == album.title
|
||||
and tracks[0].tracknumber == 1
|
||||
and tracks[0].disknumber == 1
|
||||
):
|
||||
if (album.count == 1 and tracks[0].title == album.title
|
||||
and tracks[0].tracknumber == 1 and tracks[0].disknumber == 1):
|
||||
album.is_single = True
|
||||
|
||||
return {"tracks": tracks, "info": album}
|
||||
|
||||
@@ -8,12 +8,13 @@ from app import exceptions
|
||||
from app import instances
|
||||
from app import models
|
||||
from app import serializer
|
||||
from app.helpers import create_new_date
|
||||
from app.helpers import Get
|
||||
from app.helpers import UseBisection
|
||||
from app.lib import playlistlib
|
||||
from flask import Blueprint
|
||||
from flask import request
|
||||
|
||||
from app.helpers import Get, UseBisection, create_new_date
|
||||
|
||||
playlist_bp = Blueprint("playlist", __name__, url_prefix="/")
|
||||
|
||||
PlaylistExists = exceptions.PlaylistExists
|
||||
@@ -27,7 +28,8 @@ def get_all_playlists():
|
||||
dbplaylists = [models.Playlist(p) for p in dbplaylists]
|
||||
|
||||
playlists = [
|
||||
serializer.Playlist(p, construct_last_updated=False) for p in dbplaylists
|
||||
serializer.Playlist(p, construct_last_updated=False)
|
||||
for p in dbplaylists
|
||||
]
|
||||
playlists.sort(
|
||||
key=lambda p: datetime.strptime(p.lastUpdated, "%Y-%m-%d %H:%M:%S"),
|
||||
|
||||
@@ -3,11 +3,10 @@ Contains all the track routes.
|
||||
"""
|
||||
from app import api
|
||||
from app import instances
|
||||
from app import models
|
||||
from flask import Blueprint
|
||||
from flask import send_file
|
||||
|
||||
from app import models
|
||||
|
||||
track_bp = Blueprint("track", __name__, url_prefix="/")
|
||||
|
||||
|
||||
@@ -37,6 +36,5 @@ def get_sample_track():
|
||||
Returns a sample track object.
|
||||
"""
|
||||
|
||||
return instances.tracks_instance.get_song_by_album(
|
||||
"Legends Never Die", "Juice WRLD"
|
||||
)
|
||||
return instances.tracks_instance.get_song_by_album("Legends Never Die",
|
||||
"Juice WRLD")
|
||||
|
||||
Reference in New Issue
Block a user