mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 03:35:35 +00:00
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:
parent
bf6aaea4ff
commit
2e512bc223
@ -7,27 +7,33 @@ Although it's quite usable, it's not quite ready for use yet. I'm working on get
|
||||
Assuming you won't look at those broken buttons twice, here are some screenshots of the current state of the app:
|
||||
|
||||
### 1. The folder page
|
||||
|
||||

|
||||
|
||||
This pages allows you to navigate through your music folders the same way you would on your computer. It doesn't show the directories without playable files. At this point, only FLAC and MP3 files are supported. (For experimenting purposes only, other formats will be added before the stable release)
|
||||
|
||||
### 2. The Album page
|
||||
|
||||

|
||||
|
||||
This page shows the album details including tracks, album artist, featured artists and Last FM album bio. The UI may look a bit rough but it will do for now.
|
||||
|
||||
### 3. The Playlists list page
|
||||
|
||||

|
||||
This page lists all the playlists you have created. More features will be added to this page in the future. These "might" include Folders, Search, etc.
|
||||
|
||||
### 4. The Playlist page
|
||||
|
||||

|
||||
This page shows the details of the playlist. It includes the playlist name, description, and the songs in the playlist. You can update your playlist details from this page.
|
||||
|
||||
### A little narration
|
||||
|
||||
The app features two sidebars. The one on the left and one on the right. The left sidebar is the classic navigation bar while the right sidebar acts as a quick access menu. The queue and the global search components are fixed here. Although they might switch to other locations in the future, the current position will work for now.
|
||||
|
||||
Here are some other functional features already implemented:
|
||||
|
||||
- Track context menu
|
||||
- Global search (😅 buggy as fuck)
|
||||
- Basic playback controls
|
||||
@ -36,7 +42,9 @@ Here are some other functional features already implemented:
|
||||
There may be a few more, but I can't remember them at the moment.
|
||||
|
||||
### Dev Setup
|
||||
|
||||
I'm working on this section. I'll be adding instructions soon. Please check back later!
|
||||
|
||||
### Contributing
|
||||
|
||||
The app runs on Python, Vue, Flask, MongoDB and Nginx. If you want to contribute, please open an issue or pull request. Your contribution is highly valued.
|
||||
|
@ -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,7 +1,6 @@
|
||||
"""
|
||||
This library contains all the functions related to playlists.
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -22,4 +22,4 @@ export enum ContextSrc {
|
||||
PHeader = "PHeader",
|
||||
Track = "Track",
|
||||
AHeader = "AHeader",
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ function formatSeconds(seconds) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getCurrentDate(){
|
||||
export function getCurrentDate() {
|
||||
const date = new Date();
|
||||
|
||||
const yyyy = date.getFullYear();
|
||||
@ -169,5 +169,5 @@ export default {
|
||||
focusCurrent,
|
||||
formatSeconds,
|
||||
getElem,
|
||||
getCurrentDate
|
||||
getCurrentDate,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user