first steps for opening the source url on songs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class_name MainScene
|
||||
extends Control
|
||||
static var instance:MainScene
|
||||
@onready var file_dialog: FileDialog = $FileDialog
|
||||
@onready var music_player: AudioStreamPlayer = $MusicPlayer
|
||||
@onready var randomize_list: Button = $RandomizeList
|
||||
@@ -83,6 +84,7 @@ var LoadingSaveFailed:bool = true
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
instance = self
|
||||
playing_now.visible = false
|
||||
get_tree().root.min_size = Vector2(850,492)
|
||||
current_progress.drag_ended.connect(SongDragStopped)
|
||||
|
||||
+12
-2
@@ -16,8 +16,18 @@ func _ready() -> void:
|
||||
popup_menu.index_pressed.connect(popupPressed)
|
||||
|
||||
func popupPressed(idx:int):
|
||||
if idx == 0:
|
||||
DeletePressed.emit(songidx)
|
||||
match idx:
|
||||
0:
|
||||
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)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
Reference in New Issue
Block a user