mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
Restyle New album page design (#76)
This commit is contained in:
committed by
Mungai Geoffrey
parent
7d59993203
commit
714775a67e
@@ -6,12 +6,12 @@ from typing import List
|
||||
|
||||
from app import api
|
||||
from app import helpers
|
||||
from app import instances
|
||||
from app import models
|
||||
from app.functions import FetchAlbumBio
|
||||
from app.lib import albumslib
|
||||
from flask import Blueprint
|
||||
from flask import request
|
||||
from app.functions import FetchAlbumBio
|
||||
from app import instances
|
||||
|
||||
album_bp = Blueprint("album", __name__, url_prefix="")
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -3,14 +3,14 @@ Contains all the search routes.
|
||||
"""
|
||||
from pprint import pprint
|
||||
from typing import List
|
||||
|
||||
from app import helpers
|
||||
from app import models
|
||||
from app import serializer
|
||||
from app.lib import searchlib
|
||||
from flask import Blueprint
|
||||
from flask import request
|
||||
|
||||
from app import models
|
||||
from app import serializer
|
||||
|
||||
search_bp = Blueprint("search", __name__, url_prefix="/")
|
||||
|
||||
SEARCH_RESULTS = {
|
||||
@@ -197,20 +197,20 @@ def search_load_more():
|
||||
if type == "tracks":
|
||||
t = SearchResults.tracks
|
||||
return {
|
||||
"tracks": t[index : index + 5],
|
||||
"tracks": t[index:index + 5],
|
||||
"more": len(t) > index + 5,
|
||||
}
|
||||
|
||||
elif type == "albums":
|
||||
a = SearchResults.albums
|
||||
return {
|
||||
"albums": a[index : index + 6],
|
||||
"albums": a[index:index + 6],
|
||||
"more": len(a) > index + 6,
|
||||
}
|
||||
|
||||
elif type == "artists":
|
||||
a = SearchResults.artists
|
||||
return {
|
||||
"artists": a[index : index + 6],
|
||||
"artists": a[index:index + 6],
|
||||
"more": len(a) > index + 6,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user