wuvt: remove DJ prefix
parent
d963ac2e70
commit
df08d3e401
|
@ -16,6 +16,6 @@ class TestWuvt(unittest.TestCase):
|
||||||
wuvt(self.phenny, None)
|
wuvt(self.phenny, None)
|
||||||
|
|
||||||
out = self.phenny.say.call_args[0][0]
|
out = self.phenny.say.call_args[0][0]
|
||||||
m = re.match('^DJ .* is currently playing .* by .*$', out,
|
m = re.match('^.* is currently playing .* by .*$', out,
|
||||||
flags=re.UNICODE)
|
flags=re.UNICODE)
|
||||||
self.assertTrue(m)
|
self.assertTrue(m)
|
||||||
|
|
|
@ -17,12 +17,8 @@ def wuvt(phenny, input):
|
||||||
except:
|
except:
|
||||||
raise GrumbleError("Failed to fetch current track from WUVT")
|
raise GrumbleError("Failed to fetch current track from WUVT")
|
||||||
|
|
||||||
dj = trackinfo['dj'].strip()
|
|
||||||
if dj[0:3] != 'DJ ':
|
|
||||||
dj = 'DJ {}'.format(dj)
|
|
||||||
|
|
||||||
phenny.say("{dj} is currently playing {title} by {artist}".format(
|
phenny.say("{dj} is currently playing {title} by {artist}".format(
|
||||||
dj=dj,
|
dj=trackinfo['dj'].strip(),
|
||||||
title=trackinfo['title'].strip(),
|
title=trackinfo['title'].strip(),
|
||||||
artist=trackinfo['artist'].strip()))
|
artist=trackinfo['artist'].strip()))
|
||||||
wuvt.commands = ['wuvt']
|
wuvt.commands = ['wuvt']
|
||||||
|
|
Loading…
Reference in New Issue