Clean up formatting
This commit is contained in:
parent
a9b6279be9
commit
77bf12f251
1 changed files with 8 additions and 9 deletions
|
|
@ -1,17 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
import asyncio
|
||||
import configparser
|
||||
import datetime
|
||||
import isodate
|
||||
import logging
|
||||
import random
|
||||
import re
|
||||
import time
|
||||
|
||||
from apiclient.discovery import build
|
||||
|
||||
import isodate
|
||||
import yaboli
|
||||
from yaboli.util import *
|
||||
from apiclient.discovery import build
|
||||
from yaboli.util import asyncify, mention
|
||||
|
||||
|
||||
class Video:
|
||||
|
|
@ -25,6 +22,7 @@ class Video:
|
|||
self.blocked = list(sorted(blocked)) if blocked is not None else None
|
||||
self.allowed = list(sorted(allowed)) if allowed is not None else None
|
||||
|
||||
|
||||
class YouTube:
|
||||
def __init__(self, api_key):
|
||||
self.service = build("youtube", "v3", developerKey=api_key)
|
||||
|
|
@ -47,6 +45,7 @@ class YouTube:
|
|||
|
||||
return videos
|
||||
|
||||
|
||||
class Playlist:
|
||||
COUNTRIES = { # according to en.wikipedia.org/wiki/ISO_3166-1_alpha-2, 2018-08-17 18:12:15 UTC
|
||||
"AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU",
|
||||
|
|
@ -273,6 +272,7 @@ class Playlist:
|
|||
video_sum = sum((video.duration for video, _ in videos), datetime.timedelta())
|
||||
return self.playtime_left() + video_sum
|
||||
|
||||
|
||||
class ArgonDJBot(yaboli.Bot):
|
||||
HELP_GENERAL = ["Keeps track of the video queue. !q <link> to queue a new video."]
|
||||
HELP_SPECIFIC = [
|
||||
|
|
@ -626,4 +626,3 @@ def main():
|
|||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue