This commit is contained in:
neersighted 2012-02-28 21:58:38 -08:00
parent 715f926846
commit 79b4f15b45
3 changed files with 17 additions and 11 deletions

View file

@ -50,11 +50,12 @@ def get_video_description(vid_id):
return out
def GetInHMS(seconds):
hours = seconds / 3600
seconds -= 3600*hours
seconds -= 3600 * hours
minutes = seconds / 60
seconds -= 60*minutes
seconds -= 60 * minutes
if hours == 0:
return "%02d:%02d" % (minutes, seconds)
return "%02d:%02d:%02d" % (hours, minutes, seconds)
@ -64,6 +65,7 @@ def GetInHMS(seconds):
def youtube_url(match):
return get_video_description(match.group(1))
@hook.command('yt')
@hook.command('y')
@hook.command