hopefully fixes
This commit is contained in:
@@ -399,7 +399,7 @@ anchor_bottom = 1.0
|
||||
offset_left = -7.0
|
||||
offset_top = -5.0
|
||||
offset_right = 7.0
|
||||
offset_bottom = 46.0
|
||||
offset_bottom = 4.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.14902, 0.14902, 0.14902, 1)
|
||||
@@ -443,14 +443,14 @@ anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -31.83
|
||||
offset_left = -38.83
|
||||
offset_top = -40.0
|
||||
offset_right = 0.170044
|
||||
offset_bottom = -8.0
|
||||
offset_right = 1.17004
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
text = "?"
|
||||
script = ExtResource("17_4b8oh")
|
||||
Open = "https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md"
|
||||
|
||||
[node name="CreatePlaylistsMenu" type="Control" parent="."]
|
||||
visible = false
|
||||
|
||||
@@ -100,7 +100,6 @@ class Download extends RefCounted:
|
||||
|
||||
var _status: Status = Status.READY
|
||||
var _thread: Thread = null
|
||||
var _process_id:int
|
||||
|
||||
# Fields
|
||||
var _url: String
|
||||
@@ -188,10 +187,9 @@ class Download extends RefCounted:
|
||||
options_and_arguments.append_array(["--yes-playlist","--embed-metadata","--embed-thumbnail",str("-o" + "%(title)s.%(ext)s")])
|
||||
options_and_arguments.append_array(["--no-continue", "-P", file_path, _url])
|
||||
|
||||
var output: Array = []
|
||||
_process_id = OS.execute(executable, PackedStringArray(options_and_arguments), output)
|
||||
|
||||
print(options_and_arguments)
|
||||
var output: Array = []
|
||||
OS.execute(executable, PackedStringArray(options_and_arguments), output)
|
||||
self._thread_finished.call_deferred()
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -1,13 +1,14 @@
|
||||
extends Button
|
||||
|
||||
|
||||
@export var Open:String
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _pressed() -> void:
|
||||
OS.shell_open("https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md")
|
||||
OS.shell_open(Open)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
+1
-8
@@ -8,7 +8,6 @@ extends Button
|
||||
|
||||
var currentlyExtending:bool
|
||||
var Target:float = 50
|
||||
var CurrentDownload:YtDlp.Download
|
||||
signal ContinueProcess
|
||||
|
||||
@onready var Parent:MainScene = get_tree().root.get_child(2)
|
||||
@@ -18,10 +17,6 @@ func _ready() -> void:
|
||||
YtDlp.setup_completed.connect(YTSetupCompleted)
|
||||
yt_download.pressed.connect(DownloadYTVidFromLink)
|
||||
|
||||
func CancelDownload():
|
||||
if CurrentDownload != null:
|
||||
print("! PROCCES ID: " + str(CurrentDownload._process_id))
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
if currentlyExtending:
|
||||
@@ -45,7 +40,7 @@ func DownloadPlaylistConf():
|
||||
ContinueProcess.emit()
|
||||
|
||||
func DownloadSingleSongConf():
|
||||
var idx:int = yt_link.text.find("&list=")
|
||||
var idx:int = yt_link.text.find("list=")
|
||||
yt_link.text = yt_link.text.erase(idx,500)
|
||||
ContinueProcess.emit()
|
||||
|
||||
@@ -65,7 +60,6 @@ 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)
|
||||
@@ -77,7 +71,6 @@ func DownloadCompleted():
|
||||
yt_download.disabled = false
|
||||
owner.GetSongs(owner.PlaylistsLocation[owner.CurrentPlaylist])
|
||||
loading_img.hide()
|
||||
CurrentDownload = null
|
||||
|
||||
|
||||
func _on_toggled(toggled_on: bool) -> void:
|
||||
|
||||
Reference in New Issue
Block a user