Migrate to vite and some more stuff

- server: add a `Track` class
- server: add a create_track_class function
- client: migrate from vue-cli to vite
This commit is contained in:
geoffrey45
2022-01-25 11:51:26 +03:00
parent 7689f13fdc
commit d6204946c2
18 changed files with 638 additions and 8372 deletions
+23
View File
@@ -1,3 +1,4 @@
from dataclasses import dataclass
import pymongo
import json
from bson import ObjectId, json_util
@@ -119,3 +120,25 @@ class AllSongs(Mongo):
return True
except:
return False
@dataclass
class Track:
id: str
title: str
artists: str
album_artist: str
album: str
filepath: str
folder: str
length: int
date: int
genre: str
bitrate: int
image: str
def __post_init__(self):
self.artists = self.artists.split(', ')
self.image = "http://127.0.0.1:8900/images/thumbnails/" + self.image