mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 19:04:42 +00:00
remove pagination
This commit is contained in:
1 parent
26ab354a1d
commit
c5670e0f5f
19 files changed
+115
-127
No files matched your search
+28
-38
@@ -188,6 +188,7 @@ def populate_images():
|
|||||||
|
|
||||||
return {'sample': artists_in_db_array[:25]}
|
return {'sample': artists_in_db_array[:25]}
|
||||||
|
|
||||||
|
|
||||||
@bp.route("/artist/<artist>")
|
@bp.route("/artist/<artist>")
|
||||||
@cache.cached()
|
@cache.cached()
|
||||||
def getArtistData(artist: str):
|
def getArtistData(artist: str):
|
||||||
@@ -244,24 +245,13 @@ def getArtistData(artist: str):
|
|||||||
@bp.route("/f/<folder>")
|
@bp.route("/f/<folder>")
|
||||||
@cache.cached()
|
@cache.cached()
|
||||||
def getFolderTree(folder: str = None):
|
def getFolderTree(folder: str = None):
|
||||||
try:
|
req_dir = folder.replace('|', '/')
|
||||||
req_dir, last_id = folder.split('::')
|
print(folder)
|
||||||
|
|
||||||
req_dir = req_dir.replace('|', '/')
|
if folder == "home":
|
||||||
dir_list = req_dir.split('/')
|
req_dir = home_dir
|
||||||
requested_dir = os.path.join(home_dir, *dir_list)
|
|
||||||
|
|
||||||
if req_dir == "home":
|
dir_content = os.scandir(os.path.join(home_dir, req_dir))
|
||||||
requested_dir = home_dir
|
|
||||||
|
|
||||||
if last_id == "None":
|
|
||||||
last_id = None
|
|
||||||
|
|
||||||
except:
|
|
||||||
requested_dir = home_dir
|
|
||||||
last_id = None
|
|
||||||
|
|
||||||
dir_content = os.scandir(requested_dir)
|
|
||||||
|
|
||||||
folders = []
|
folders = []
|
||||||
|
|
||||||
@@ -286,7 +276,7 @@ def getFolderTree(folder: str = None):
|
|||||||
getTags(entry.path)
|
getTags(entry.path)
|
||||||
|
|
||||||
songs_array = all_songs_instance.find_songs_by_folder(
|
songs_array = all_songs_instance.find_songs_by_folder(
|
||||||
req_dir, last_id)
|
req_dir)
|
||||||
songs = convert_to_json(songs_array)
|
songs = convert_to_json(songs_array)
|
||||||
for song in songs:
|
for song in songs:
|
||||||
song['artists'] = song['artists'].split(', ')
|
song['artists'] = song['artists'].split(', ')
|
||||||
@@ -299,27 +289,6 @@ def getFolderTree(folder: str = None):
|
|||||||
return {"files": songs, "folders": folders}
|
return {"files": songs, "folders": folders}
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/image/<img_type>/<image_id>')
|
|
||||||
def send_image(img_type, image_id):
|
|
||||||
if img_type == "thumbnail":
|
|
||||||
song_obj = all_songs_instance.get_song_by_id(image_id)
|
|
||||||
loaded_song = convert_one_to_json(song_obj)
|
|
||||||
|
|
||||||
img_dir = app_dir + "/images/thumbnails"
|
|
||||||
image = loaded_song['image']
|
|
||||||
|
|
||||||
if img_type == "artist":
|
|
||||||
artist_obj = artist_instance.get_artist_by_id(image_id)
|
|
||||||
artist = convert_one_to_json(artist_obj)
|
|
||||||
|
|
||||||
img_dir = app_dir + "/images/artists"
|
|
||||||
|
|
||||||
image = artist['name'] + ".jpg"
|
|
||||||
print(img_dir + image)
|
|
||||||
|
|
||||||
return send_from_directory(img_dir, image)
|
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/get/queue', methods=['POST'])
|
@bp.route('/get/queue', methods=['POST'])
|
||||||
def post():
|
def post():
|
||||||
args = request.get_json()
|
args = request.get_json()
|
||||||
@@ -340,6 +309,7 @@ def post():
|
|||||||
|
|
||||||
return {'msg': 'ok'}
|
return {'msg': 'ok'}
|
||||||
|
|
||||||
|
|
||||||
@bp.route('/qwerty')
|
@bp.route('/qwerty')
|
||||||
def populateArtists():
|
def populateArtists():
|
||||||
all_songs = all_songs_instance.get_all_songs()
|
all_songs = all_songs_instance.get_all_songs()
|
||||||
@@ -358,5 +328,25 @@ def populateArtists():
|
|||||||
if a_obj not in artists:
|
if a_obj not in artists:
|
||||||
artists.append(a_obj)
|
artists.append(a_obj)
|
||||||
|
|
||||||
|
artist_instance.insert_artist(a_obj)
|
||||||
|
|
||||||
return {'songs': artists}
|
return {'songs': artists}
|
||||||
|
|
||||||
|
|
||||||
|
@bp.route('/albums')
|
||||||
|
def getAlbums():
|
||||||
|
s = all_songs_instance.get_all_songs()
|
||||||
|
ss = convert_to_json(s)
|
||||||
|
|
||||||
|
albums = []
|
||||||
|
|
||||||
|
for song in ss:
|
||||||
|
al_obj = {
|
||||||
|
"name": song['album'],
|
||||||
|
"artist": song['artists']
|
||||||
|
}
|
||||||
|
|
||||||
|
if al_obj not in albums:
|
||||||
|
albums.append(al_obj)
|
||||||
|
|
||||||
|
return {'albums': albums}
|
||||||
@@ -7,13 +7,14 @@ class Mongo:
|
|||||||
mongo_uri = pymongo.MongoClient()
|
mongo_uri = pymongo.MongoClient()
|
||||||
self.db = mongo_uri[database]
|
self.db = mongo_uri[database]
|
||||||
|
|
||||||
|
|
||||||
class Artists(Mongo):
|
class Artists(Mongo):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(Artists, self).__init__('ALL_ARTISTS')
|
super(Artists, self).__init__('ALL_ARTISTS')
|
||||||
self.collection = self.db['THEM_ARTISTS']
|
self.collection = self.db['THEM_ARTISTS']
|
||||||
|
|
||||||
def insert_artist(self, artist_obj):
|
def insert_artist(self, artist_obj):
|
||||||
self.collection.update(artist_obj, artist_obj, upsert=True)
|
self.collection.update_one(artist_obj, {'$set': artist_obj}, upsert=True)
|
||||||
|
|
||||||
def get_all_artists(self):
|
def get_all_artists(self):
|
||||||
return self.collection.find()
|
return self.collection.find()
|
||||||
@@ -48,20 +49,16 @@ class AllSongs(Mongo):
|
|||||||
return self.collection.find({'album': {'$regex': query, '$options': 'i'}})
|
return self.collection.find({'album': {'$regex': query, '$options': 'i'}})
|
||||||
|
|
||||||
def get_all_songs(self):
|
def get_all_songs(self):
|
||||||
return self.collection.find()
|
return self.collection.find().limit(25)
|
||||||
|
|
||||||
def find_songs_by_folder(self, query, last_id=None):
|
def find_songs_by_folder(self, query):
|
||||||
limit = 18
|
return self.collection.find({'folder': query})
|
||||||
if last_id is None:
|
|
||||||
return self.collection.find({'folder': query}).limit(limit)
|
|
||||||
else:
|
|
||||||
return self.collection.find({'folder': query, '_id': {'$gt': ObjectId(last_id)}}).limit(limit)
|
|
||||||
|
|
||||||
def find_songs_by_folder_og(self, query):
|
def find_songs_by_folder_og(self, query):
|
||||||
return self.collection.find({'folder': query})
|
return self.collection.find({'folder': query})
|
||||||
|
|
||||||
def find_songs_by_artist(self, query):
|
def find_songs_by_artist(self, query):
|
||||||
return self.collection.find({'artists': {'$regex': query, '$options': 'i'}})
|
return self.collection.find({'artists': query})
|
||||||
|
|
||||||
def find_songs_by_album_artist(self, query):
|
def find_songs_by_album_artist(self, query):
|
||||||
return self.collection.find({'album_artist': {'$regex': query, '$options': 'i'}})
|
return self.collection.find({'album_artist': {'$regex': query, '$options': 'i'}})
|
||||||
|
|||||||
+1
-1
@@ -15,12 +15,12 @@
|
|||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
<div class="r-sidebar">
|
<div class="r-sidebar">
|
||||||
|
<div class="m-np">
|
||||||
<Search
|
<Search
|
||||||
v-model:search="search"
|
v-model:search="search"
|
||||||
@expandSearch="expandSearch"
|
@expandSearch="expandSearch"
|
||||||
@collapseSearch="collapseSearch"
|
@collapseSearch="collapseSearch"
|
||||||
/>
|
/>
|
||||||
<div class="m-np">
|
|
||||||
<NowPlaying />
|
<NowPlaying />
|
||||||
</div>
|
</div>
|
||||||
<UpNext v-model:up_next="up_next" @expandQueue="expandQueue" />
|
<UpNext v-model:up_next="up_next" @expandQueue="expandQueue" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
$card-dark: #131313b2;
|
$card-dark: #131313b2;
|
||||||
$red: #df4646;
|
$red: #df4646;
|
||||||
$blue: #00a8ff;
|
$blue: rgb(5, 80, 150);
|
||||||
$green: rgb(67, 148, 67);
|
$green: rgb(67, 148, 67);
|
||||||
$separator: #ffffff46;
|
$separator: #ffffff46;
|
||||||
// sizes
|
// sizes
|
||||||
|
|||||||
@@ -126,11 +126,11 @@ a {
|
|||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @media (max-width: 70em) {
|
@media (max-width: 70em) {
|
||||||
// .r-sidebar {
|
.r-sidebar {
|
||||||
// display: none;
|
display: none;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
.image {
|
.image {
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg fill="#ffffff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path d="M 8.5 8 C 6.0324991 8 4 10.032499 4 12.5 L 4 35.5 C 4 37.967501 6.0324991 40 8.5 40 L 39.5 40 C 41.967501 40 44 37.967501 44 35.5 L 44 17.5 C 44 15.032499 41.967501 13 39.5 13 L 24.042969 13 L 19.572266 9.2753906 C 18.584055 8.4521105 17.339162 8 16.052734 8 L 8.5 8 z M 8.5 11 L 16.052734 11 C 16.638307 11 17.202555 11.205358 17.652344 11.580078 L 21.15625 14.5 L 17.652344 17.419922 C 17.202555 17.794642 16.638307 18 16.052734 18 L 7 18 L 7 12.5 C 7 11.653501 7.6535009 11 8.5 11 z M 24.042969 16 L 39.5 16 C 40.346499 16 41 16.653501 41 17.5 L 41 35.5 C 41 36.346499 40.346499 37 39.5 37 L 8.5 37 C 7.6535009 37 7 36.346499 7 35.5 L 7 21 L 16.052734 21 C 17.339162 21 18.584055 20.547889 19.572266 19.724609 L 24.042969 16 z"/></svg>
|
||||||
<path d="M10.4719 5.625L13.6781 8.82188L14.2219 9.375H26.25V24.375H3.75V5.625H10.4719ZM10.4719 3.75H3.75C3.25272 3.75 2.77581 3.94754 2.42417 4.29918C2.07254 4.65081 1.875 5.12772 1.875 5.625V24.375C1.875 24.8723 2.07254 25.3492 2.42417 25.7008C2.77581 26.0525 3.25272 26.25 3.75 26.25H26.25C26.7473 26.25 27.2242 26.0525 27.5758 25.7008C27.9275 25.3492 28.125 24.8723 28.125 24.375V9.375C28.125 8.87772 27.9275 8.40081 27.5758 8.04918C27.2242 7.69754 26.7473 7.5 26.25 7.5H15L11.8031 4.30313C11.6287 4.12766 11.4213 3.98844 11.1928 3.89351C10.9643 3.79858 10.7193 3.7498 10.4719 3.75V3.75Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 710 B After Width: | Height: | Size: 850 B |
@@ -1,22 +1 @@
|
|||||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg fill="#ffffff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path d="M 23.951172 4 A 1.50015 1.50015 0 0 0 23.072266 4.3222656 L 8.859375 15.519531 C 7.0554772 16.941163 6 19.113506 6 21.410156 L 6 40.5 C 6 41.863594 7.1364058 43 8.5 43 L 18.5 43 C 19.863594 43 21 41.863594 21 40.5 L 21 30.5 C 21 30.204955 21.204955 30 21.5 30 L 26.5 30 C 26.795045 30 27 30.204955 27 30.5 L 27 40.5 C 27 41.863594 28.136406 43 29.5 43 L 39.5 43 C 40.863594 43 42 41.863594 42 40.5 L 42 21.410156 C 42 19.113506 40.944523 16.941163 39.140625 15.519531 L 24.927734 4.3222656 A 1.50015 1.50015 0 0 0 23.951172 4 z M 24 7.4101562 L 37.285156 17.876953 C 38.369258 18.731322 39 20.030807 39 21.410156 L 39 40 L 30 40 L 30 30.5 C 30 28.585045 28.414955 27 26.5 27 L 21.5 27 C 19.585045 27 18 28.585045 18 30.5 L 18 40 L 9 40 L 9 21.410156 C 9 20.030807 9.6307412 18.731322 10.714844 17.876953 L 24 7.4101562 z"/></svg>
|
||||||
<g clip-path="url(#clip0_105_187)">
|
|
||||||
<g filter="url(#filter0_d_105_187)">
|
|
||||||
<path d="M6.25 27.5H23.75C24.413 27.5 25.0489 27.2366 25.5178 26.7678C25.9866 26.2989 26.25 25.6631 26.25 25V13.75C26.251 13.5855 26.2194 13.4224 26.1572 13.2701C26.095 13.1178 26.0034 12.9793 25.8875 12.8625L15.8875 2.86251C15.6533 2.6297 15.3365 2.49902 15.0063 2.49902C14.676 2.49902 14.3592 2.6297 14.125 2.86251L4.125 12.8625C4.00689 12.9783 3.91293 13.1163 3.84856 13.2687C3.78419 13.421 3.75069 13.5846 3.75 13.75V25C3.75 25.6631 4.01339 26.2989 4.48223 26.7678C4.95107 27.2366 5.58696 27.5 6.25 27.5ZM12.5 25V18.75H17.5V25H12.5ZM6.25 14.2625L15 5.51251L23.75 14.2625V25H20V18.75C20 18.087 19.7366 17.4511 19.2678 16.9822C18.7989 16.5134 18.163 16.25 17.5 16.25H12.5C11.837 16.25 11.2011 16.5134 10.7322 16.9822C10.2634 17.4511 10 18.087 10 18.75V25H6.25V14.2625Z" fill="white"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<filter id="filter0_d_105_187" x="-0.25" y="2.49902" width="30.5" height="33.001" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
||||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
||||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
||||||
<feOffset dy="4"/>
|
|
||||||
<feGaussianBlur stdDeviation="2"/>
|
|
||||||
<feComposite in2="hardAlpha" operator="out"/>
|
|
||||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
||||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_105_187"/>
|
|
||||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_105_187" result="shape"/>
|
|
||||||
</filter>
|
|
||||||
<clipPath id="clip0_105_187">
|
|
||||||
<rect width="30" height="30" rx="10" fill="white"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 941 B |
@@ -1,3 +1 @@
|
|||||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg fill="#ffffff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48px" height="48px"><path d="M 34 4.0019531 C 33.1465 4.0019531 32.293734 4.1054531 31.427734 4.3144531 C 30.805734 4.4634531 30.345203 4.9929063 30.283203 5.6289062 L 30.242188 6.0507812 C 30.195187 6.5317812 29.919 6.9630781 29.5 7.2050781 C 29.081 7.4460781 28.568859 7.4734844 28.130859 7.2714844 L 27.742188 7.0957031 C 27.163187 6.8327031 26.473203 6.9637344 26.033203 7.4277344 C 24.835203 8.6877344 23.941125 10.228813 23.453125 11.882812 C 23.271125 12.495812 23.500484 13.155344 24.021484 13.527344 L 24.371094 13.777344 C 24.764094 14.060344 25 14.517 25 15 C 25 15.256 24.930547 15.502703 24.810547 15.720703 L 24.998047 16.876953 L 26.441406 16.330078 C 26.837406 16.181078 27.251828 16.105469 27.673828 16.105469 C 27.728828 16.105469 27.782891 16.120047 27.837891 16.123047 C 27.933891 15.758047 28 15.385 28 15 C 28 13.794 27.512922 12.644641 26.669922 11.806641 C 26.909922 11.257641 27.214266 10.735 27.572266 10.25 C 28.718266 10.561 29.956 10.407688 31 9.8046875 C 32.044 9.2016875 32.797562 8.2036875 33.101562 7.0546875 C 33.710563 6.9826875 34.290391 6.9826875 34.900391 7.0546875 C 35.203391 8.2036875 35.955 9.2016875 37 9.8046875 C 38.043 10.408687 39.279734 10.561 40.427734 10.25 C 40.785734 10.734 41.090078 11.257641 41.330078 11.806641 C 40.487078 12.645641 40 13.794 40 15 C 40 16.206 40.487078 17.355359 41.330078 18.193359 C 41.090078 18.742359 40.785734 19.265 40.427734 19.75 C 39.281734 19.439 38.044 19.592312 37 20.195312 C 35.955 20.798313 35.202438 21.796313 34.898438 22.945312 C 34.554437 22.986313 34.220766 22.997187 33.884766 22.992188 C 34.055766 23.442187 34.21275 23.895422 34.34375 24.357422 C 34.49575 24.894422 34.509203 25.447609 34.408203 25.974609 C 35.121203 25.946609 35.846219 25.860547 36.574219 25.685547 C 37.195219 25.536547 37.654797 25.007094 37.716797 24.371094 L 37.757812 23.947266 C 37.804812 23.466266 38.081 23.036922 38.5 22.794922 C 38.92 22.554922 39.432141 22.528516 39.869141 22.728516 L 40.257812 22.904297 C 40.836813 23.169297 41.527797 23.037266 41.966797 22.572266 C 43.164797 21.312266 44.058875 19.771187 44.546875 18.117188 C 44.728875 17.503187 44.499516 16.843656 43.978516 16.472656 L 43.628906 16.222656 C 43.235906 15.939656 43 15.483 43 15 C 43 14.517 43.234953 14.061297 43.626953 13.779297 L 43.978516 13.527344 C 44.499516 13.156344 44.728875 12.496813 44.546875 11.882812 C 44.058875 10.228813 43.164797 8.6877344 41.966797 7.4277344 C 41.526797 6.9627344 40.835813 6.8307031 40.257812 7.0957031 L 39.871094 7.2714844 C 39.429094 7.4714844 38.918 7.4440781 38.5 7.2050781 C 38.081 6.9630781 37.804813 6.5327344 37.757812 6.0527344 L 37.716797 5.6289062 C 37.654797 4.9919063 37.194266 4.4634531 36.572266 4.3144531 C 35.706266 4.1054531 34.8535 4.0019531 34 4.0019531 z M 34 11 C 32.791667 11 31.695482 11.507133 31.003906 12.285156 C 30.312331 13.063179 30 14.041667 30 15 C 30 15.958333 30.312331 16.936821 31.003906 17.714844 C 31.695482 18.492867 32.791667 19 34 19 C 35.208333 19 36.304518 18.492867 36.996094 17.714844 C 37.687669 16.936821 38 15.958333 38 15 C 38 14.041667 37.687669 13.063179 36.996094 12.285156 C 36.304518 11.507133 35.208333 11 34 11 z M 18 14 C 16.722281 14 15.497446 14.176085 14.337891 14.466797 A 1.50015 1.50015 0 0 0 13.222656 15.679688 L 12.974609 17.197266 C 12.877133 17.791298 12.520375 18.306875 12 18.607422 C 11.479609 18.907978 10.857215 18.959049 10.292969 18.746094 L 8.8496094 18.199219 A 1.50015 1.50015 0 0 0 7.2421875 18.558594 C 5.5391667 20.313827 4.2656618 22.484198 3.5800781 24.904297 A 1.50015 1.50015 0 0 0 4.0742188 26.474609 L 5.2675781 27.451172 C 5.7317061 27.833367 6 28.399483 6 29 C 6 29.601429 5.7307373 30.167917 5.265625 30.548828 L 4.0722656 31.525391 A 1.50015 1.50015 0 0 0 3.5800781 33.095703 C 4.2665281 35.51494 5.5389397 37.685939 7.2421875 39.441406 A 1.50015 1.50015 0 0 0 8.8476562 39.798828 L 10.292969 39.253906 C 10.855597 39.041345 11.478005 39.091427 12 39.392578 C 12.521198 39.69327 12.875919 40.207764 12.972656 40.800781 L 13.220703 42.318359 A 1.50015 1.50015 0 0 0 14.335938 43.53125 C 15.497015 43.823166 16.722281 44 18 44 C 19.277719 44 20.502554 43.823915 21.662109 43.533203 A 1.50015 1.50015 0 0 0 22.777344 42.320312 L 23.025391 40.802734 C 23.122867 40.208702 23.479625 39.693125 24 39.392578 C 24.520391 39.092022 25.142785 39.040951 25.707031 39.253906 L 27.150391 39.800781 A 1.50015 1.50015 0 0 0 28.757812 39.441406 C 30.460833 37.686173 31.734338 35.515802 32.419922 33.095703 A 1.50015 1.50015 0 0 0 31.925781 31.525391 L 30.732422 30.548828 C 30.268294 30.166633 30 29.600517 30 29 C 30 28.398571 30.269263 27.832083 30.734375 27.451172 L 31.927734 26.474609 A 1.50015 1.50015 0 0 0 32.419922 24.904297 C 31.733351 22.481827 30.452429 20.315385 28.753906 18.5625 A 1.50015 1.50015 0 0 0 27.146484 18.203125 L 25.707031 18.746094 C 25.144403 18.958655 24.520042 18.908573 23.998047 18.607422 C 23.476848 18.30673 23.122128Line truncated
|
||||||
<path d="M17.275 27.5H12.725C12.4399 27.5 12.1634 27.4026 11.9412 27.2239C11.7191 27.0452 11.5647 26.796 11.5037 26.5175L10.995 24.1625C10.3163 23.8651 9.67277 23.4933 9.07623 23.0538L6.77998 23.785C6.50818 23.8717 6.21491 23.8628 5.94888 23.7598C5.68284 23.6568 5.46004 23.4659 5.31748 23.2188L3.03748 19.28C2.89641 19.0327 2.84346 18.7448 2.88728 18.4634C2.93111 18.1821 3.06911 17.924 3.27873 17.7313L5.05998 16.1063C4.97897 15.3701 4.97897 14.6274 5.05998 13.8912L3.27873 12.27C3.06882 12.0772 2.93062 11.8188 2.88679 11.5372C2.84296 11.2556 2.89609 10.9675 3.03748 10.72L5.31248 6.77875C5.45504 6.53164 5.67784 6.34074 5.94388 6.23773C6.20991 6.13473 6.50318 6.12583 6.77498 6.2125L9.07123 6.94375C9.37623 6.71875 9.69373 6.50875 10.0212 6.31875C10.3375 6.14125 10.6625 5.98 10.995 5.83625L11.505 3.48375C11.5657 3.20525 11.7198 2.95586 11.9417 2.77694C12.1636 2.59801 12.4399 2.5003 12.725 2.5H17.275C17.56 2.5003 17.8364 2.59801 18.0583 2.77694C18.2802 2.95586 18.4343 3.20525 18.495 3.48375L19.01 5.8375C19.6883 6.13487 20.3314 6.50674 20.9275 6.94625L23.225 6.215C23.4966 6.12865 23.7896 6.13771 24.0554 6.2407C24.3211 6.34369 24.5437 6.53441 24.6862 6.78125L26.9612 10.7225C27.2512 11.2312 27.1512 11.875 26.72 12.2713L24.9387 13.8962C25.0197 14.6324 25.0197 15.3751 24.9387 16.1112L26.72 17.7362C27.1512 18.1337 27.2512 18.7763 26.9612 19.285L24.6862 23.2262C24.5437 23.4734 24.3209 23.6643 24.0548 23.7673C23.7888 23.8703 23.4955 23.8792 23.2237 23.7925L20.9275 23.0612C20.3314 23.5004 19.6883 23.8719 19.01 24.1687L18.495 26.5175C18.434 26.7958 18.2798 27.0449 18.058 27.2236C17.8361 27.4022 17.5598 27.4998 17.275 27.5ZM9.52498 20.2863L10.55 21.0363C10.7812 21.2063 11.0212 21.3625 11.2712 21.505C11.5062 21.6413 11.7462 21.7638 11.995 21.875L13.1612 22.3862L13.7325 25H16.27L16.8412 22.385L18.0075 21.8738C18.5162 21.6488 19 21.37 19.4487 21.0413L20.4737 20.2913L23.0262 21.1037L24.295 18.9062L22.3162 17.1025L22.4562 15.8375C22.5187 15.2838 22.5187 14.725 22.4562 14.1725L22.3162 12.9075L24.2962 11.1L23.0262 8.90125L20.475 9.71375L19.4487 8.96375C18.9997 8.63336 18.5165 8.35217 18.0075 8.125L16.8412 7.61375L16.27 5H13.7325L13.1575 7.615L11.995 8.125C11.4852 8.34826 11.0018 8.62747 10.5537 8.9575L9.52748 9.7075L6.97748 8.895L5.70623 11.1L7.68498 12.9012L7.54498 14.1675C7.48248 14.7212 7.48248 15.28 7.54498 15.8325L7.68498 17.0975L5.70623 18.9013L6.97498 21.0987L9.52498 20.2863ZM14.995 20C13.6689 20 12.3971 19.4732 11.4594 18.5355C10.5218 17.5979 9.99498 16.3261 9.99498 15C9.99498 13.6739 10.5218 12.4021 11.4594 11.4645C12.3971 10.5268 13.6689 10 14.995 10C16.3211 10 17.5928 10.5268 18.5305 11.4645C19.4682 12.4021 19.995 13.6739 19.995 15C19.995 16.3261 19.4682 17.5979 18.5305 18.5355C17.5928 19.4732 16.3211 20 14.995 20ZM14.995 12.5C14.5054 12.5005 14.0268 12.6447 13.6185 12.9148C13.2101 13.1848 12.8901 13.5688 12.698 14.0191C12.5059 14.4694 12.4503 14.9662 12.5379 15.4478C12.6256 15.9295 12.8528 16.3747 13.1913 16.7284C13.5297 17.0821 13.9646 17.3287 14.4419 17.4375C14.9192 17.5463 15.418 17.5125 15.8763 17.3405C16.3346 17.1684 16.7323 16.8655 17.0201 16.4694C17.3078 16.0734 17.4729 15.6016 17.495 15.1125V15.6125V15C17.495 14.337 17.2316 13.7011 16.7627 13.2322C16.2939 12.7634 15.658 12.5 14.995 12.5Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 7.8 KiB |
@@ -44,6 +44,22 @@ export default {
|
|||||||
.a-header {
|
.a-header {
|
||||||
height: 14rem;
|
height: 14rem;
|
||||||
background: rgb(0, 0, 0);
|
background: rgb(0, 0, 0);
|
||||||
|
background: #355c7d; /* fallback for old browsers */
|
||||||
|
background: -webkit-linear-gradient(
|
||||||
|
to right,
|
||||||
|
#c06c84,
|
||||||
|
#6c5b7b,
|
||||||
|
#355c7d
|
||||||
|
); /* Chrome 10-25, Safari 5.1-6 */
|
||||||
|
background: linear-gradient(
|
||||||
|
to right,
|
||||||
|
#c06c84,
|
||||||
|
#6c5b7b,
|
||||||
|
#355c7d
|
||||||
|
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||||
|
|
||||||
|
background-position: 50% 10%;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 1rem 0 1rem;
|
padding: 0 1rem 0 1rem;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<input type="search" placeholder="Search albums" />
|
<input type="search" placeholder="Search albums" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="separator"></div>
|
||||||
<div class="all-albums">
|
<div class="all-albums">
|
||||||
<router-link
|
<router-link
|
||||||
:to="{ path: '/albums/1' }"
|
:to="{ path: '/albums/1' }"
|
||||||
@@ -125,7 +126,6 @@ export default {
|
|||||||
|
|
||||||
.all-albums {
|
.all-albums {
|
||||||
height: calc(100% - 4rem);
|
height: calc(100% - 4rem);
|
||||||
border-top: 1px solid $separator;
|
|
||||||
padding: $small 0 0 0;
|
padding: $small 0 0 0;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ export default {
|
|||||||
|
|
||||||
.info .top {
|
.info .top {
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
background-color: rgb(51, 129, 20);
|
background-color: $blue;
|
||||||
border-radius: $small;
|
border-radius: $small;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -126,7 +126,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgb(0, 134, 89);
|
background-color: rgb(0, 45, 104);
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
|
|
||||||
.play-icon {
|
.play-icon {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: ["folders"]
|
props: ["folders"],
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -66,6 +66,7 @@ export default {
|
|||||||
background-position: 1rem;
|
background-position: 1rem;
|
||||||
background-size: 10% 100%;
|
background-size: 10% 100%;
|
||||||
background-color: rgba(80, 80, 80, 0.247);
|
background-color: rgba(80, 80, 80, 0.247);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
.f-item-count {
|
.f-item-count {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -83,6 +84,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.f-container .f-item:hover {
|
.f-container .f-item:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.527);
|
transition: all 0.2s ease;
|
||||||
|
background: #000000; /* fallback for old browsers */
|
||||||
|
background: no-repeat 8%/100% url(../../assets/icons/folder.svg),
|
||||||
|
-webkit-linear-gradient(to bottom, #434343, #000000); /* Chrome 10-25, Safari 5.1-6 */
|
||||||
|
background: no-repeat 8%/10% url(../../assets/icons/folder.svg),
|
||||||
|
linear-gradient(to bottom, #434343, #000000); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -72,8 +72,6 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.side-nav-container .in {
|
.side-nav-container .in {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -62,7 +62,18 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
#pinned-container {
|
#pinned-container {
|
||||||
background-color: rgb(0, 0, 0);
|
background: #000000; /* fallback for old browsers */
|
||||||
|
background: -webkit-linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
#434343,
|
||||||
|
#000000
|
||||||
|
); /* Chrome 10-25, Safari 5.1-6 */
|
||||||
|
background: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
#434343,
|
||||||
|
#000000
|
||||||
|
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||||
|
|
||||||
border-top: none;
|
border-top: none;
|
||||||
margin: $small;
|
margin: $small;
|
||||||
padding: $small;
|
padding: $small;
|
||||||
|
|||||||
@@ -24,8 +24,7 @@
|
|||||||
type="range"
|
type="range"
|
||||||
:value="pos"
|
:value="pos"
|
||||||
min="0"
|
min="0"
|
||||||
max="100"
|
max="1000"
|
||||||
step="1"
|
|
||||||
@change="seek()"
|
@change="seek()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,7 +84,7 @@ export default {
|
|||||||
pos,
|
pos,
|
||||||
seek,
|
seek,
|
||||||
isPlaying,
|
isPlaying,
|
||||||
fmtMSS
|
fmtMSS,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -97,7 +96,14 @@ export default {
|
|||||||
height: 14rem;
|
height: 14rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
background-color: rgb(0, 0, 0);
|
background: rgb(14, 14, 14);
|
||||||
|
background: linear-gradient(
|
||||||
|
326deg,
|
||||||
|
rgb(0, 0, 0) 0%,
|
||||||
|
rgb(10, 10, 10) 13%,
|
||||||
|
rgba(0, 0, 0, 1) 43%,
|
||||||
|
rgba(0, 0, 0, 1) 100%
|
||||||
|
);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: 3fr 1fr;
|
grid-template-rows: 3fr 1fr;
|
||||||
|
|
||||||
@@ -130,7 +136,17 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0.25rem;
|
height: 0.25rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #3071a9;
|
background: #1488cc; /* fallback for old browsers */
|
||||||
|
background: -webkit-linear-gradient(
|
||||||
|
to right,
|
||||||
|
#1488cc,
|
||||||
|
#2b32b2
|
||||||
|
); /* Chrome 10-25, Safari 5.1-6 */
|
||||||
|
background: linear-gradient(
|
||||||
|
to right,
|
||||||
|
#1488cc,
|
||||||
|
#2b32b2
|
||||||
|
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
input::-webkit-slider-thumb {
|
input::-webkit-slider-thumb {
|
||||||
@@ -255,12 +271,13 @@ export default {
|
|||||||
|
|
||||||
#title {
|
#title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 13rem;
|
width: 22rem;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#artist {
|
#artist {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
|
width: 22rem;
|
||||||
color: rgba(255, 255, 255, 0.712);
|
color: rgba(255, 255, 255, 0.712);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
id="search"
|
id="search"
|
||||||
placeholder="Michael Jackson"
|
placeholder="find your music"
|
||||||
v-model="query"
|
v-model="query"
|
||||||
/>
|
/>
|
||||||
<div class="scrollable" :class="{ v0: !is_hidden, v1: is_hidden }">
|
<div class="scrollable" :class="{ v0: !is_hidden, v1: is_hidden }">
|
||||||
@@ -96,6 +96,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.right-search {
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
.right-search .v0 {
|
.right-search .v0 {
|
||||||
max-height: 0em;
|
max-height: 0em;
|
||||||
transition: max-height 0.5s ease;
|
transition: max-height 0.5s ease;
|
||||||
|
|||||||
@@ -2,18 +2,13 @@ import { ref } from "@vue/reactivity";
|
|||||||
|
|
||||||
let folders_uri = "http://127.0.0.1:9876";
|
let folders_uri = "http://127.0.0.1:9876";
|
||||||
|
|
||||||
const getData = async (path, last_id) => {
|
const getData = async (path) => {
|
||||||
let url;
|
let url;
|
||||||
const songs = ref(null);
|
const songs = ref(null);
|
||||||
const folders = ref(null);
|
const folders = ref(null);
|
||||||
|
|
||||||
const encoded_path = encodeURIComponent(path.replaceAll("/", "|"));
|
const encoded_path = encodeURIComponent(path.replaceAll("/", "|"));
|
||||||
|
url = url = `${folders_uri}/f/${encoded_path}`;
|
||||||
if (last_id) {
|
|
||||||
url = `${folders_uri}/f/${encoded_path}::${last_id}`;
|
|
||||||
} else {
|
|
||||||
url = url = `${folders_uri}/f/${encoded_path}::None`;
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const playAudio = (path) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
audio.ontimeupdate = () => {
|
audio.ontimeupdate = () => {
|
||||||
pos.value = (audio.currentTime / audio.duration) * 100;
|
pos.value = (audio.currentTime / audio.duration) * 1000;
|
||||||
};
|
};
|
||||||
|
|
||||||
audio.addEventListener("ended", () => {
|
audio.addEventListener("ended", () => {
|
||||||
@@ -41,7 +41,7 @@ function playPrev() {
|
|||||||
|
|
||||||
function seek(pos) {
|
function seek(pos) {
|
||||||
console.log(pos);
|
console.log(pos);
|
||||||
audio.currentTime = (pos / 100) * audio.duration;
|
audio.currentTime = (pos / 1000) * audio.duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
function playPause() {
|
function playPause() {
|
||||||
|
|||||||
@@ -63,27 +63,6 @@ export default {
|
|||||||
path.value = new_route.params.path;
|
path.value = new_route.params.path;
|
||||||
getPathFolders(path.value);
|
getPathFolders(path.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
scrollable.value.onscroll = () => {
|
|
||||||
let dom = scrollable.value;
|
|
||||||
|
|
||||||
let scrollY = dom.scrollHeight - dom.scrollTop;
|
|
||||||
let height = dom.offsetHeight;
|
|
||||||
let offset = height - scrollY;
|
|
||||||
|
|
||||||
if (offset == 0 || offset == 1) {
|
|
||||||
loading.value = true;
|
|
||||||
getData(path.value, last_song_id.value).then((data) => {
|
|
||||||
songs.value = songs.value.concat(data.songs.value);
|
|
||||||
|
|
||||||
loading.value = false;
|
|
||||||
|
|
||||||
if (songs.value.length) {
|
|
||||||
last_song_id.value = songs.value.slice(-1)[0]._id.$oid;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -105,6 +84,7 @@ export default {
|
|||||||
padding-left: $small;
|
padding-left: $small;
|
||||||
padding-right: $small;
|
padding-right: $small;
|
||||||
padding-top: 5rem;
|
padding-top: 5rem;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#f-view-parent .fixed {
|
#f-view-parent .fixed {
|
||||||
|
|||||||
Reference in new issue
Block a user