diff --git a/assets/duetnoteslyrics.svg b/assets/duetnoteslyrics.svg new file mode 100644 index 0000000..dccbf8b --- /dev/null +++ b/assets/duetnoteslyrics.svg @@ -0,0 +1,287 @@ + + + + + + + + + + +image/svg+xmlOpenclipart + + + + + + + + + + + + + + + + + + + + + +LYRICS + \ No newline at end of file diff --git a/assets/pawn.svg b/assets/pawn.svg new file mode 100644 index 0000000..a3a4b5c --- /dev/null +++ b/assets/pawn.svg @@ -0,0 +1,12 @@ + + + + + + + + + +image/svg+xmlOpenclipart \ No newline at end of file diff --git a/assets/songlisticons/duet.png b/assets/songlisticons/duet.png new file mode 100644 index 0000000..e67d949 Binary files /dev/null and b/assets/songlisticons/duet.png differ diff --git a/assets/songlisticons/duet50.png b/assets/songlisticons/duet50.png new file mode 100644 index 0000000..1c39224 Binary files /dev/null and b/assets/songlisticons/duet50.png differ diff --git a/assets/songlisticons/duetlyrics.png b/assets/songlisticons/duetlyrics.png new file mode 100644 index 0000000..3242170 Binary files /dev/null and b/assets/songlisticons/duetlyrics.png differ diff --git a/assets/songlisticons/duetlyrics50.png b/assets/songlisticons/duetlyrics50.png new file mode 100644 index 0000000..afd63c7 Binary files /dev/null and b/assets/songlisticons/duetlyrics50.png differ diff --git a/assets/songlisticons/duetnoteslyrics.png b/assets/songlisticons/duetnoteslyrics.png new file mode 100644 index 0000000..3c64bb3 Binary files /dev/null and b/assets/songlisticons/duetnoteslyrics.png differ diff --git a/assets/songlisticons/duetnoteslyrics50.png b/assets/songlisticons/duetnoteslyrics50.png new file mode 100644 index 0000000..5d9aff1 Binary files /dev/null and b/assets/songlisticons/duetnoteslyrics50.png differ diff --git a/assets/songlisticons/solo.png b/assets/songlisticons/solo.png new file mode 100644 index 0000000..32e0404 Binary files /dev/null and b/assets/songlisticons/solo.png differ diff --git a/assets/songlisticons/solo50.png b/assets/songlisticons/solo50.png new file mode 100644 index 0000000..9b6e4ab Binary files /dev/null and b/assets/songlisticons/solo50.png differ diff --git a/assets/songlisticons/sololyrics.png b/assets/songlisticons/sololyrics.png new file mode 100644 index 0000000..d16b441 Binary files /dev/null and b/assets/songlisticons/sololyrics.png differ diff --git a/assets/songlisticons/sololyrics50.png b/assets/songlisticons/sololyrics50.png new file mode 100644 index 0000000..0b4a588 Binary files /dev/null and b/assets/songlisticons/sololyrics50.png differ diff --git a/assets/songlisticons/solonoteslyrics.png b/assets/songlisticons/solonoteslyrics.png new file mode 100644 index 0000000..fdcfee8 Binary files /dev/null and b/assets/songlisticons/solonoteslyrics.png differ diff --git a/assets/songlisticons/solonoteslyrics50.png b/assets/songlisticons/solonoteslyrics50.png new file mode 100644 index 0000000..a8847fc Binary files /dev/null and b/assets/songlisticons/solonoteslyrics50.png differ diff --git a/build/ci/drone.yml b/build/ci/drone.yml index 2051452..df25bc6 100644 --- a/build/ci/drone.yml +++ b/build/ci/drone.yml @@ -31,7 +31,9 @@ steps: commands: - mkdir -p tmp - cd tmp - - wget https://github.com/ytdl-org/youtube-dl/releases/download/2020.09.14/youtube-dl.exe + # riaa getting greedy again : original url : https://github.com/ytdl-org/youtube-dl/releases/download/2020.09.14/youtube-dl.exe + # google took advantage too and broke the 09.14 release, so yeah... arms race now. + - wget -o youtube-dl.exe https://nextcloud.martyn.berlin/s/t59bd4GBaiiqKqb/download - name: build_godot_windows image: barichello/godot-ci:3.2.3 diff --git a/dlserver/main.go b/dlserver/main.go index 9ebf8d6..ab419fd 100644 --- a/dlserver/main.go +++ b/dlserver/main.go @@ -36,6 +36,7 @@ func convertFile(sourceFileName string, destinationFilename string) error { os.Remove(destinationFilename) DurationRe := regexp.MustCompile(`DURATION *: ([0-9]+):([0-9]+):([0-9]+)\.([0-9]+)`) + OtherDurationRe := regexp.MustCompile(`Duration: ([0-9]+):([0-9]+):([0-9]+)\.([0-9]+)`) FrameRe := regexp.MustCompile(`frame= ?([0-9]+) `) FPSValue := 0.0 finalFramesValue := 0.0 @@ -62,20 +63,27 @@ func convertFile(sourceFileName string, destinationFilename string) error { if len(fpses) > 0 { fmt.Printf("FPS' is %v\n", fpses) FPSValue, _ = strconv.ParseFloat(fpses[0][1], 64) + fmt.Printf("\nSet fps to %0.2f\n", FPSValue) + if lastDurationSeconds != 0 { + finalFramesValue = lastDurationSeconds * FPSValue + } } durations := DurationRe.FindAllStringSubmatch(line, 1) + if len(durations) < 1 { + durations = OtherDurationRe.FindAllStringSubmatch(line, 1) + } if len(durations) > 0 { fmt.Printf("Durations is %v\n", durations) + // we have an fps, we can work out max frames! + hrs, _ := strconv.ParseFloat(durations[0][1], 64) + mins, _ := strconv.ParseFloat(durations[0][2], 64) + secs, _ := strconv.ParseFloat(durations[0][3], 64) + aaand, _ := strconv.ParseFloat("0."+durations[0][4], 64) + lastDurationSeconds = (hrs * 60 * 60) + (mins * 60) + secs + aaand if FPSValue != 0.0 { - // we have an fps, we can work out max frames! - hrs, _ := strconv.ParseFloat(durations[0][1], 64) - mins, _ := strconv.ParseFloat(durations[0][2], 64) - secs, _ := strconv.ParseFloat(durations[0][3], 64) - aaand, _ := strconv.ParseFloat("0."+durations[0][4], 64) - lastDurationSeconds = (hrs * 60 * 60) + (mins * 60) + secs + aaand finalFramesValue = lastDurationSeconds * FPSValue - fmt.Printf("%0f:%0f:%0f%0.4f * %0.2f = %0.2f seconds = %0.2f frames\n", hrs, mins, secs, aaand, FPSValue, lastDurationSeconds, finalFramesValue) } + fmt.Printf("%0f:%0f:%0f%0.4f * %0.2f = %0.2f seconds = %0.2f frames\n", hrs, mins, secs, aaand, FPSValue, lastDurationSeconds, finalFramesValue) } currentFrames := FrameRe.FindAllStringSubmatch(line, 1) if len(currentFrames) > 0 { @@ -170,6 +178,10 @@ func downloadFile(sourceURL string, outputFile string, statusChannel chan float6 fmt.Printf(" > Failed with error: %v\n", err) return err } + if lastFilename == "" { + // we probably didn't get a merge into a single file, so it probably just streamed to the output without an extension + lastFilename = "test" + } return convertFile(lastFilename, "converted.webm") } diff --git a/godot/Components/SongList.gd b/godot/Components/SongList.gd new file mode 100644 index 0000000..f05a743 --- /dev/null +++ b/godot/Components/SongList.gd @@ -0,0 +1,31 @@ +extends Control + +const SongElement = preload("res://Components/SongListItem.tscn") + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +var songlist = "https://pastebin.pl/view/raw/40dfc4fc" + +# Called when the node enters the scene tree for the first time. +func _ready(): + $HTTPRequest.request(songlist) + print(songlist) +# var ItemListContent = ["We shall go this way","We shall go that way","which way shall we go?","I think we're lost"] +# for ItemID in range(4): +# $ItemList.add_item(ItemListContent[ItemID],null,true) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_HTTPRequest_request_completed(result, response_code, headers, body): + var json = JSON.parse(body.get_string_from_utf8()) + if json.result != null: + #print(json.result) + for song in json.result: + var thesongelement = SongElement.instance() + thesongelement.setObject(song) + $ScrollContainer/GridContainer.add_child(thesongelement) diff --git a/godot/Components/SongList.tscn b/godot/Components/SongList.tscn new file mode 100644 index 0000000..6cd005b --- /dev/null +++ b/godot/Components/SongList.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Components/SongList.gd" type="Script" id=1] + +[node name="Control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="HTTPRequest" type="HTTPRequest" parent="."] + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +scroll_horizontal_enabled = false +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="GridContainer" type="GridContainer" parent="ScrollContainer"] +__meta__ = { +"_edit_use_anchors_": false +} +[connection signal="request_completed" from="HTTPRequest" to="." method="_on_HTTPRequest_request_completed"] diff --git a/godot/Components/SongListItem.gd b/godot/Components/SongListItem.gd new file mode 100644 index 0000000..cbd5268 --- /dev/null +++ b/godot/Components/SongListItem.gd @@ -0,0 +1,74 @@ +extends HBoxContainer + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var duet = true +var lyrics = true +var score = true +var jsonObject = {} + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func setSongName(songname): + $SongName.text = songname + +func setSongArtists(songtitle): + $SongArtists.text = songtitle + +func setDuet(hasDuetMarked): + if hasDuetMarked: + duet = true + else: + duet = false + setIcon() + +func setLyrics(hasLyrics): + if hasLyrics: + lyrics = true + else: + lyrics = false + setIcon() + +func setScore(hasScore): + if hasScore: + score = true + else: + score = false + setIcon() + +func setIcon(): + var filename = "" + if duet: + filename += "duet" + else: + filename += "solo" + if score: + filename += "notes" + if lyrics: + filename += "lyrics" + filename += "50" + $SongIcon.texture_normal = load("UI/src/"+filename+".png") + +func setObject(fullObject): + jsonObject = fullObject + setDuet(fullObject.duetmarks) + setLyrics(fullObject.lyrics) + setScore(fullObject.score) + setSongName(fullObject.title) + var artists = PoolStringArray(fullObject.artists).join(", ") + setSongArtists(artists) + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_SongIcon_pressed(): + Globals.setSongObject(jsonObject) + get_tree().change_scene("res://download_video.tscn") diff --git a/godot/Components/SongListItem.tscn b/godot/Components/SongListItem.tscn new file mode 100644 index 0000000..aa89eda --- /dev/null +++ b/godot/Components/SongListItem.tscn @@ -0,0 +1,41 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Components/SongListItem.gd" type="Script" id=1] +[ext_resource path="res://UI/src/duetnoteslyrics50.png" type="Texture" id=2] + +[node name="HBoxContainer" type="HBoxContainer"] +margin_right = 883.0 +margin_bottom = 50.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="SongIcon" type="TextureButton" parent="."] +margin_right = 75.0 +margin_bottom = 50.0 +rect_min_size = Vector2( 75, 0 ) +texture_normal = ExtResource( 2 ) + +[node name="SongName" type="ToolButton" parent="."] +margin_left = 79.0 +margin_right = 479.0 +margin_bottom = 50.0 +rect_min_size = Vector2( 400, 0 ) +text = "Don't Give Up" +clip_text = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="SongArtists" type="ToolButton" parent="."] +margin_left = 483.0 +margin_right = 883.0 +margin_bottom = 50.0 +rect_min_size = Vector2( 400, 0 ) +text = "Peter Gabriel & Kate Bush" +clip_text = true +__meta__ = { +"_edit_use_anchors_": false +} +[connection signal="pressed" from="SongIcon" to="." method="_on_SongIcon_pressed"] diff --git a/godot/Globals.gd b/godot/Globals.gd index c31662b..f8d5e5b 100644 --- a/godot/Globals.gd +++ b/godot/Globals.gd @@ -10,6 +10,7 @@ var config = ConfigFile.new() # var a = 2 # var b = "text" var providers = { "mastodon" : []} +var songObject = {} # Called when the node enters the scene tree for the first time. @@ -67,3 +68,8 @@ func saveConfig(): config.set_value("providers","mastodon",providers.mastodon) config.save("user://settings.cfg") +func setSongObject(theObject): + songObject = theObject + +func getSongObject(): + return songObject diff --git a/godot/SongListScene.gd b/godot/SongListScene.gd new file mode 100644 index 0000000..fa2ca39 --- /dev/null +++ b/godot/SongListScene.gd @@ -0,0 +1,20 @@ +extends Control + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + + +func _on_Quit_pressed(): + get_tree().change_scene("res://main_menu.tscn") diff --git a/godot/SongListScene.tscn b/godot/SongListScene.tscn new file mode 100644 index 0000000..5111fd6 --- /dev/null +++ b/godot/SongListScene.tscn @@ -0,0 +1,110 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://SongListScene.gd" type="Script" id=1] +[ext_resource path="res://Components/SongList.tscn" type="PackedScene" id=2] +[ext_resource path="res://UI/src/duetnoteslyrics50.png" type="Texture" id=3] + +[node name="Control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +rect_pivot_offset = Vector2( -491.278, 0 ) +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 5.0 +margin_top = 5.0 +margin_right = -5.0 +margin_bottom = -5.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +margin_right = 1014.0 +margin_bottom = 590.0 + +[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +margin_right = 1014.0 +margin_bottom = 20.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +margin_right = 990.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 + +[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/VBoxContainer/HBoxContainer2/VBoxContainer"] +margin_right = 990.0 +margin_bottom = 15.0 +size_flags_horizontal = 3 +bbcode_enabled = true +bbcode_text = "[center]SONG LIST[/center]" +text = "SONG LIST" +fit_content_height = true +scroll_active = false + +[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"] +margin_left = 994.0 +margin_right = 1014.0 +margin_bottom = 20.0 +text = "X" + +[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] +margin_top = 24.0 +margin_right = 1014.0 +margin_bottom = 146.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="RichTextLabel2" type="RichTextLabel" parent="MarginContainer/VBoxContainer/GridContainer"] +margin_right = 1014.0 +margin_bottom = 60.0 +size_flags_horizontal = 3 +text = "This is a community-created list of backing tracks and karaoke songs published on YouTube, Vimeo, Peertube instances and elsewhere. They are not hosted by ASingCrow, and no responsibility is taken for the original uploader having permission to upload them. + +Click a song below to sing along, unlike other apps, you don't select solo/duet etc. until you are ready to publish." +fit_content_height = true +scroll_active = false + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/GridContainer"] +margin_top = 64.0 +margin_right = 1014.0 +margin_bottom = 122.0 + +[node name="ToolButton" type="ToolButton" parent="MarginContainer/VBoxContainer/GridContainer/HBoxContainer"] +margin_right = 75.0 +margin_bottom = 58.0 +rect_min_size = Vector2( 75, 0 ) +icon = ExtResource( 3 ) + +[node name="ToolButton2" type="ToolButton" parent="MarginContainer/VBoxContainer/GridContainer/HBoxContainer"] +margin_left = 79.0 +margin_right = 479.0 +margin_bottom = 58.0 +rect_min_size = Vector2( 400, 0 ) +text = "Song Title" + +[node name="ToolButton3" type="ToolButton" parent="MarginContainer/VBoxContainer/GridContainer/HBoxContainer"] +margin_left = 483.0 +margin_right = 883.0 +margin_bottom = 58.0 +rect_min_size = Vector2( 400, 0 ) +text = "Artist(s)" + +[node name="Control" parent="MarginContainer/VBoxContainer" instance=ExtResource( 2 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_top = 150.0 +margin_right = 1014.0 +margin_bottom = 590.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Quit" to="." method="_on_Quit_pressed"] diff --git a/godot/UI/src/duet50.png b/godot/UI/src/duet50.png new file mode 100644 index 0000000..1c39224 Binary files /dev/null and b/godot/UI/src/duet50.png differ diff --git a/godot/UI/src/duet50.png.import b/godot/UI/src/duet50.png.import new file mode 100644 index 0000000..2a27cd4 --- /dev/null +++ b/godot/UI/src/duet50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/duet50.png-edb0ff2589be90d0d59864f9eeefba6f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/duet50.png" +dest_files=[ "res://.import/duet50.png-edb0ff2589be90d0d59864f9eeefba6f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/UI/src/duetlyrics50.png b/godot/UI/src/duetlyrics50.png new file mode 100644 index 0000000..afd63c7 Binary files /dev/null and b/godot/UI/src/duetlyrics50.png differ diff --git a/godot/UI/src/duetlyrics50.png.import b/godot/UI/src/duetlyrics50.png.import new file mode 100644 index 0000000..b973730 --- /dev/null +++ b/godot/UI/src/duetlyrics50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/duetlyrics50.png-68ed5f957cd7c1d2d4b6c65b4bf06f74.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/duetlyrics50.png" +dest_files=[ "res://.import/duetlyrics50.png-68ed5f957cd7c1d2d4b6c65b4bf06f74.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/UI/src/duetnoteslyrics50.png b/godot/UI/src/duetnoteslyrics50.png new file mode 100644 index 0000000..5d9aff1 Binary files /dev/null and b/godot/UI/src/duetnoteslyrics50.png differ diff --git a/godot/UI/src/duetnoteslyrics50.png.import b/godot/UI/src/duetnoteslyrics50.png.import new file mode 100644 index 0000000..aaa3ea6 --- /dev/null +++ b/godot/UI/src/duetnoteslyrics50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/duetnoteslyrics50.png-49610dc0883ac4fec0b8c358e4abc946.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/duetnoteslyrics50.png" +dest_files=[ "res://.import/duetnoteslyrics50.png-49610dc0883ac4fec0b8c358e4abc946.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/UI/src/solo50.png b/godot/UI/src/solo50.png new file mode 100644 index 0000000..9b6e4ab Binary files /dev/null and b/godot/UI/src/solo50.png differ diff --git a/godot/UI/src/solo50.png.import b/godot/UI/src/solo50.png.import new file mode 100644 index 0000000..2596776 --- /dev/null +++ b/godot/UI/src/solo50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/solo50.png-4ed64106d61e2725fa73f6ea7d1f241c.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/solo50.png" +dest_files=[ "res://.import/solo50.png-4ed64106d61e2725fa73f6ea7d1f241c.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/UI/src/sololyrics50.png b/godot/UI/src/sololyrics50.png new file mode 100644 index 0000000..0b4a588 Binary files /dev/null and b/godot/UI/src/sololyrics50.png differ diff --git a/godot/UI/src/sololyrics50.png.import b/godot/UI/src/sololyrics50.png.import new file mode 100644 index 0000000..c31a5ac --- /dev/null +++ b/godot/UI/src/sololyrics50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/sololyrics50.png-0f0e2a4e271f57f4cc90cbc611d417a7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/sololyrics50.png" +dest_files=[ "res://.import/sololyrics50.png-0f0e2a4e271f57f4cc90cbc611d417a7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/UI/src/solonoteslyrics50.png b/godot/UI/src/solonoteslyrics50.png new file mode 100644 index 0000000..a8847fc Binary files /dev/null and b/godot/UI/src/solonoteslyrics50.png differ diff --git a/godot/UI/src/solonoteslyrics50.png.import b/godot/UI/src/solonoteslyrics50.png.import new file mode 100644 index 0000000..a30a382 --- /dev/null +++ b/godot/UI/src/solonoteslyrics50.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/solonoteslyrics50.png-7469c211001b33b9236e6735d4ca441a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/src/solonoteslyrics50.png" +dest_files=[ "res://.import/solonoteslyrics50.png-7469c211001b33b9236e6735d4ca441a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/godot/download_video.gd b/godot/download_video.gd index 52cb6b3..813fe0e 100644 --- a/godot/download_video.gd +++ b/godot/download_video.gd @@ -6,9 +6,17 @@ extends Control # var b = "text" var lastcheck = 0 +var songObject = {} # Called when the node enters the scene tree for the first time. func _ready(): + songObject = Globals.getSongObject() + if ("url" in songObject) and (songObject.url != null) and (songObject.url != ""): + $HBoxContainer/TextEdit.text = songObject.url + $HBoxContainer.visible = false + _on_Button_pressed() + else: + $HBoxContainer.visible = true pass # Replace with function body. @@ -42,7 +50,7 @@ func _on_Control_ready(): func _on_HTTPRequest_request_completed(result, response_code, headers, body): - #print(result) + print(result) #print(response_code) #print(headers) #print(body.get_string_from_utf8()) @@ -51,7 +59,10 @@ func _on_HTTPRequest_request_completed(result, response_code, headers, body): $VBoxContainer2/DownloadProgress.value = json.result["percentage"] if json.result["percentage"] == 100: #Globals.video_duration = json.result["duration_seconds"] - get_tree().change_scene("res://justplayer.tscn") + if $HBoxContainer.visible: + get_tree().change_scene("res://justplayer.tscn") + else: + get_tree().change_scene("res://PlayVideoRecordAudio.tscn") #print(json.result) #print(json.result["percentage"]) #pass diff --git a/godot/main_menu.gd b/godot/main_menu.gd index 05583e5..7b9ce1f 100644 --- a/godot/main_menu.gd +++ b/godot/main_menu.gd @@ -33,3 +33,7 @@ func _on_DownloadPlayVid2_pressed(): func _on_Settings_pressed(): get_tree().change_scene("res://GlobalSettings.tscn") + + +func _on_Songlist_pressed(): + get_tree().change_scene("res://SongListScene.tscn") diff --git a/godot/main_menu.tscn b/godot/main_menu.tscn index 7c01c65..ed65adb 100644 --- a/godot/main_menu.tscn +++ b/godot/main_menu.tscn @@ -57,7 +57,7 @@ script = ExtResource( 1 ) [node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer"] margin_top = 24.0 margin_right = 1014.0 -margin_bottom = 135.0 +margin_bottom = 159.0 __meta__ = { "_edit_use_anchors_": false } @@ -97,8 +97,15 @@ margin_top = 91.0 margin_right = 1014.0 margin_bottom = 111.0 text = "Settings" + +[node name="Songlist" type="Button" parent="MarginContainer/VBoxContainer/GridContainer"] +margin_top = 115.0 +margin_right = 1014.0 +margin_bottom = 135.0 +text = "Song list!" [connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Quit" to="MarginContainer/VBoxContainer/HBoxContainer2/Quit" method="_on_Quit_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/DownloadPlayVid" to="." method="_on_Button_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/DownloadPlayVid2" to="." method="_on_DownloadPlayVid2_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/MicTest" to="." method="_on_MicTest_pressed"] [connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/Settings" to="." method="_on_Settings_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/GridContainer/Songlist" to="." method="_on_Songlist_pressed"]