QOL changes

added opening the source url, and opening playlist folders, fixed ugly icons
This commit is contained in:
bucket
2026-02-26 21:20:48 +01:00
parent 38655756e3
commit 2be692e55c
27 changed files with 91 additions and 42 deletions
+16
View File
@@ -0,0 +1,16 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using ATL;
using Godot;
public partial class SongSource : Node{
public String TryGetSongUrl(String path){
Track theTrack = new(path);
if (theTrack.AdditionalFields.TryGetValue("comment", out string value)){
return value;
}
return "";
}
}
+1
View File
@@ -0,0 +1 @@
uid://dd38vqi4220tx
+6 -4
View File
@@ -18,14 +18,16 @@ func _ready() -> void:
CorrectlyName()
options_dropdown.get_popup().id_pressed.connect(dropdown_pressed)
func dropdown_pressed(Idx:int):
match options_dropdown.get_popup().get_item_text(Idx):
"Change Directory":
func dropdown_pressed(Id:int):
match Id:
0:
_on_select_directory_pressed()
"Delete":
1:
confirmation.show()
"Rename":
pass
2:
OS.shell_open(PlaylistLocation)
Parent.SaveEverything()
func Delete():
+5 -6
View File
@@ -6,6 +6,7 @@ var songidx:int
@onready var songname: Button = $HBoxContainer/Songname
@onready var dropdown: Button = $HBoxContainer/Dropdown
@onready var popup_menu: PopupMenu = $PopupMenu
@export var soung_source: Node
signal PlayPressed
@@ -21,12 +22,10 @@ func popupPressed(idx:int):
DeletePressed.emit(songidx)
1:
var songdir = MainScene.instance.CurrentDir + "/" + MainScene.instance.textSongs[songidx]
var song = AudioStreamMP3.load_from_file(songdir)
var meta:MusicMeta.MusicMetadata = MusicMeta.new().get_mp3_metadata(song)
print(songdir)
meta.print_info()
if meta.comments:
OS.shell_open(meta.comments)
var source:String = soung_source.TryGetSongUrl(songdir)
print("Source: "+source)
if source:
OS.shell_open(source)
# Called every frame. 'delta' is the elapsed time since the previous frame.