mirror of
https://github.com/9001/copyparty.git
synced 2025-10-06 03:50:30 +02:00
prevent dupe tags from mtp (replace id3 tags)
This commit is contained in:
parent
90c5f2b9d2
commit
a83d3f8801
2 changed files with 21 additions and 0 deletions
|
@ -700,6 +700,16 @@ class Up2k(object):
|
|||
# indicate scanned without tags
|
||||
tags = {"x": 0}
|
||||
|
||||
if not tags:
|
||||
return 0
|
||||
|
||||
for k in tags.keys():
|
||||
q = "delete from mt where w = ? and ({})".format(
|
||||
" or ".join(["k = ?"] * len(tags))
|
||||
)
|
||||
args = [wark[:16]] + list(tags.keys())
|
||||
write_cur.execute(q, tuple(args))
|
||||
|
||||
ret = 0
|
||||
for k, v in tags.items():
|
||||
q = "insert into mt values (?,?,?)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue