More work on DB, script runners

This commit is contained in:
2020-06-11 21:16:39 -04:00
parent 3f9382e6f7
commit 122004f45f
4 changed files with 78 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ def save_tags(lfm_name, tags):
cur.execute("DELETE FROM mg.lastfm_artist_tag WHERE name=%s", (lfm_name,))
cur.execute(
"INSERT INTO mg.lastfm_artist_tag VALUES %s" %
",".join("('%s', '%s')" % (n, t) for (n, t) in zip(repeat(lfm_name), tags))
",".join("('%s', '%s')" % (n, t.strip()) for (n, t) in zip(repeat(lfm_name), tags))
)