1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added basic scrobbling function

This commit is contained in:
Krateng
2018-11-26 16:21:07 +01:00
parent 2f8720898b
commit bdf114d7fe
3 changed files with 29 additions and 1 deletions

View File

@@ -1,9 +1,21 @@
import re
def fullclean(artist,title):
artists = cleanup(removespecial(artist))
title = cleantitle(removespecial(title))
(title,moreartists) = findartistsintitle(title)
artists += moreartists
return (artists,title)
def removespecial(s):
return s.replace("\t","").replace("","").replace("\n","")
def cleanup(artiststr):
if artiststr == "":
return []
artists = [artiststr]