diff --git a/addons/godot-yt-dlp/src/yt_dlp.gd b/addons/godot-yt-dlp/src/yt_dlp.gd index f8d7ea1..150a1e1 100644 --- a/addons/godot-yt-dlp/src/yt_dlp.gd +++ b/addons/godot-yt-dlp/src/yt_dlp.gd @@ -100,6 +100,7 @@ class Download extends RefCounted: var _status: Status = Status.READY var _thread: Thread = null + var _process_id:int # Fields var _url: String diff --git a/yt_tab_button.gd b/yt_tab_button.gd index 20742b7..32dc418 100644 --- a/yt_tab_button.gd +++ b/yt_tab_button.gd @@ -60,6 +60,7 @@ func DownloadYTVidFromLink(): return loading_img.show() yt_link.clear() + CurrentDownload = download download.set_destination(owner.PlaylistsLocation[owner.CurrentPlaylist]) print(owner.PlaylistsLocation[owner.CurrentPlaylist]) download.convert_to_audio(YtDlp.Audio.MP3) @@ -71,6 +72,7 @@ func DownloadCompleted(): yt_download.disabled = false owner.GetSongs(owner.PlaylistsLocation[owner.CurrentPlaylist]) loading_img.hide() + CurrentDownload = null func _on_toggled(toggled_on: bool) -> void: