Skip to content

Commit

Permalink
Fix reads on closed a closed window
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenshin9977 committed Aug 19, 2022
1 parent fe21eed commit 10ee763
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions components_handlers/ytdlp_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

log = logging.getLogger(__name__)
LAST_SPEED = "-"
DL_PROG_WIN = create_progress_bar(get_text(GuiField.download), False)
PP_PROG_WIN = create_progress_bar(get_text(GuiField.process), False)
DL_PROG_WIN = None
PP_PROG_WIN = None
TIME_LAST_UPDATE = datetime.now()


Expand All @@ -29,11 +29,14 @@ def video_dl(opts: dict) -> None:
Args:
opts (dict): Options entered by the user
"""
global DL_PROG_WIN
global DL_PROG_WIN, PP_PROG_WIN
ydl_opts = _gen_ydl_opts(opts)
DL_PROG_WIN = create_progress_bar(get_text(GuiField.download), False)
PP_PROG_WIN = create_progress_bar(get_text(GuiField.process), False)
with YoutubeDL(ydl_opts) as ydl:
infos_ydl = ydl.extract_info(opts["url"])
DL_PROG_WIN.close()
PP_PROG_WIN.close()
if not opts["AudioOnly"]:
if infos_ydl.get("_type") == "playlist":
for infos_ydl_entry in infos_ydl["entries"]:
Expand Down
2 changes: 1 addition & 1 deletion gen_new_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

log = logging.getLogger(__name__)
APP_NAME = "video-dl"
APP_VERSION = "0.9.0"
APP_VERSION = "0.9.2"
PLATFORM = system()
ASSETS = {"Windows": ["ffmpeg.exe", "ffprobe.exe"]}
VERSIONS_ARCHIVE_NAME = "versions.zip"
Expand Down

0 comments on commit 10ee763

Please sign in to comment.