fix: add svg files

This commit is contained in:
Terry Geng 2020-03-21 01:07:38 +08:00
parent 589dcdce37
commit a6991943c5
5 changed files with 18 additions and 3 deletions

View File

@ -246,7 +246,7 @@ class MusicDatabase:
self.db_path = db_path
self.db_version_check_and_create()
self.manage_special_tags()
self.manage_special_tags() # This is super time comsuming!
def has_table(self, table):
conn = sqlite3.connect(self.db_path)
@ -435,7 +435,7 @@ class MusicDatabase:
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
results = cursor.execute("SELECT id, type, title, metadata, tags, path, keywords FROM music "
"WHERE id != 'info' AND id IN (SELECT id FROM music ORDER BY RANDOM() LIMIT ?)", (count,)).fetchall()
"WHERE id IN (SELECT id FROM music WHERE id != 'info' ORDER BY RANDOM() LIMIT ?)", (count,)).fetchall()
conn.close()
return self._result_to_dict(results)

View File

@ -561,6 +561,7 @@ def upload():
continue
var.cache.build_dir_cache(var.bot)
var.music_db.manage_special_tags()
log.info("web: Local file cache refreshed.")
return redirect("./", code=302)

View File

@ -83,7 +83,6 @@ class MusicCache(dict):
def save(self, id):
self.log.debug("library: music save into database: %s" % self[id].format_debug_string())
self.db.insert_music(self[id].to_dict())
self.db.manage_special_tags()
def free_and_delete(self, id):
item = self.get_item_by_id(None, id)

View File

@ -0,0 +1,14 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg">
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path stroke="null" id="svg_1" d="m5.700245,3.92964l0,14.150376l11.451127,-7.075188l-11.451127,-7.075188z"/>
<g stroke="null" id="svg_7">
<path stroke="null" stroke-width="46" id="svg_6" d="m20.942859,18.221072l-3.323292,0l0,3.323292l-1.107764,0l0,-3.323292l-3.323292,0l0,-1.107764l3.323292,0l0,-3.323292l1.107764,0l0,3.323292l3.323292,0l0,1.107764z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 597 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="mdi-playlist-plus" width="24" height="24" viewBox="0 0 24 24"><path d="M2,16H10V14H2M18,14V10H16V14H12V16H16V20H18V16H22V14M14,6H2V8H14M14,10H2V12H14V10Z" /></svg>

After

Width:  |  Height:  |  Size: 400 B