From 90997f548debdcc4ec80398dd1d6d7e9ce2ee683 Mon Sep 17 00:00:00 2001 From: joyfuI Date: Thu, 15 Jul 2021 23:13:22 +0900 Subject: [PATCH] =?UTF-8?q?=5F=5F=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- info.json | 10 +++++++++- my_youtube_dl.py | 18 +++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/info.json b/info.json index fcf8b36..d90bb4d 100644 --- a/info.json +++ b/info.json @@ -1 +1,9 @@ -{"version": "3.0.1", "name": "youtube-dl", "category_name": "vod", "developer": "joyfuI", "description": "\uc720\ud29c\ube0c, \ub124\uc774\ubc84TV \ub4f1 \ub3d9\uc601\uc0c1 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ub3d9\uc601\uc0c1 \ub2e4\uc6b4\ub85c\ub4dc", "home": "https://github.com/joyfuI/youtube-dl", "more": ""} \ No newline at end of file +{ + "version": "3.0.1", + "name": "youtube-dl", + "category_name": "vod", + "developer": "joyfuI", + "description": "유튜브, 네이버TV 등 동영상 사이트에서 동영상 다운로드", + "home": "https://github.com/joyfuI/youtube-dl", + "more": "" +} \ No newline at end of file diff --git a/my_youtube_dl.py b/my_youtube_dl.py index 3699ffd..c8494ef 100644 --- a/my_youtube_dl.py +++ b/my_youtube_dl.py @@ -41,7 +41,7 @@ class Status(Enum): class MyYoutubeDL(object): DEFAULT_FILENAME = '%(title)s-%(id)s.%(ext)s' - __index = 0 + _index = 0 _last_msg = '' def __init__(self, plugin, type_name, url, filename, temp_path, save_path=None, opts=None, dateafter=None, @@ -67,10 +67,10 @@ class MyYoutubeDL(object): self.opts = opts if dateafter or datebefore: self.opts['daterange'] = DateRange(start=dateafter, end=datebefore) - self.index = MyYoutubeDL.__index - MyYoutubeDL.__index += 1 - self.__status = Status.READY - self.__thread = None + self.index = MyYoutubeDL._index + MyYoutubeDL._index += 1 + self._status = Status.READY + self._thread = None self.key = None self.start_time = None # 시작 시간 self.end_time = None # 종료 시간 @@ -97,8 +97,8 @@ class MyYoutubeDL(object): def start(self): if self.status != Status.READY: return False - self.__thread = Thread(target=self.run) - self.__thread.start() + self._thread = Thread(target=self.run) + self._thread.start() return True def run(self): @@ -211,13 +211,13 @@ class MyYoutubeDL(object): @property def status(self): - return self.__status + return self._status @status.setter def status(self, value): from .plugin import socketio_emit - self.__status = value + self._status = value socketio_emit('status', self)