diff --git a/Icons/Download.png.import b/Icons/Download.png.import index c1606e2..1b1fe70 100644 --- a/Icons/Download.png.import +++ b/Icons/Download.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Dropdown.png.import b/Icons/Dropdown.png.import index 2d9c1f2..34e1fa2 100644 --- a/Icons/Dropdown.png.import +++ b/Icons/Dropdown.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=1.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" diff --git a/Icons/Headphones.png.import b/Icons/Headphones.png.import index 282bae7..8bd4d75 100644 --- a/Icons/Headphones.png.import +++ b/Icons/Headphones.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Loding.png.import b/Icons/Loding.png.import index e0717e3..04bd1c7 100644 --- a/Icons/Loding.png.import +++ b/Icons/Loding.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Logo2.png.import b/Icons/Logo2.png.import index e3631f3..a88d5cd 100644 --- a/Icons/Logo2.png.import +++ b/Icons/Logo2.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Loop.png.import b/Icons/Loop.png.import index ac22ecc..d94d518 100644 --- a/Icons/Loop.png.import +++ b/Icons/Loop.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/LoopPressed.png.import b/Icons/LoopPressed.png.import index 7e1bfe7..834d8b9 100644 --- a/Icons/LoopPressed.png.import +++ b/Icons/LoopPressed.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Pause.png.import b/Icons/Pause.png.import index a55e5bf..60c39a3 100644 --- a/Icons/Pause.png.import +++ b/Icons/Pause.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Play.png.import b/Icons/Play.png.import index 75a21c0..5a3689f 100644 --- a/Icons/Play.png.import +++ b/Icons/Play.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/Skip.png.import b/Icons/Skip.png.import index 4bbef24..1bfc31c 100644 --- a/Icons/Skip.png.import +++ b/Icons/Skip.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/X.png.import b/Icons/X.png.import index 915e2a9..e3d081c 100644 --- a/Icons/X.png.import +++ b/Icons/X.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/XSmall.png.import b/Icons/XSmall.png.import index a1671b5..ec35eea 100644 --- a/Icons/XSmall.png.import +++ b/Icons/XSmall.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/search.png.import b/Icons/search.png.import index 16e1aef..53b739e 100644 --- a/Icons/search.png.import +++ b/Icons/search.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Icons/settingscog.png.import b/Icons/settingscog.png.import index 109fc9b..71e3683 100644 --- a/Icons/settingscog.png.import +++ b/Icons/settingscog.png.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Images/Eveningsmall.jpg.import b/Images/Eveningsmall.jpg.import index ca27633..f674f52 100644 --- a/Images/Eveningsmall.jpg.import +++ b/Images/Eveningsmall.jpg.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Images/Nightsmall.jpg.import b/Images/Nightsmall.jpg.import index 2e666fc..b2c04a7 100644 --- a/Images/Nightsmall.jpg.import +++ b/Images/Nightsmall.jpg.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Images/pole2.jpg.import b/Images/pole2.jpg.import index 6b76aa7..6855d3f 100644 --- a/Images/pole2.jpg.import +++ b/Images/pole2.jpg.import @@ -21,7 +21,7 @@ compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index a65e554..10260cf 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -232,11 +232,6 @@ script = ExtResource("1_ubs1p") LoopPressed = ExtResource("2_iolk5") LoopNotPressed = ExtResource("5_c2g63") -[node name="OSMediaIntigration" type="Control" parent="."] -anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 40.0 - [node name="WallpaperManager" type="Node2D" parent="." node_paths=PackedStringArray("Daytime", "Evening", "Nighttime")] script = ExtResource("4_y372l") Daytime = NodePath("../Daytime") @@ -921,7 +916,7 @@ offset_left = -64.0 offset_top = -23.0 grow_horizontal = 0 grow_vertical = 0 -text = "v1.6.2" +text = "v1.6.3" horizontal_alignment = 2 [node name="SettingsButton" type="Button" parent="."] diff --git a/Scenes/PlaylistDisplay.tscn b/Scenes/PlaylistDisplay.tscn index def4168..8a9c427 100644 --- a/Scenes/PlaylistDisplay.tscn +++ b/Scenes/PlaylistDisplay.tscn @@ -72,10 +72,13 @@ custom_minimum_size = Vector2(20.505, 0) layout_mode = 2 icon = ExtResource("2_im6ur") expand_icon = true -item_count = 2 -popup/item_0/text = "Change Directory" -popup/item_1/text = "Delete" -popup/item_1/id = 1 +item_count = 3 +popup/item_0/text = "Open Directory" +popup/item_0/id = 2 +popup/item_1/text = "Change Directory" +popup/item_1/id = 0 +popup/item_2/text = "Delete" +popup/item_2/id = 1 [node name="FileDialog" type="FileDialog" parent="."] title = "Open a Directory" diff --git a/Scenes/search_item.tscn b/Scenes/search_item.tscn index 1cc8a67..3ec015c 100644 --- a/Scenes/search_item.tscn +++ b/Scenes/search_item.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=3 format=3 uid="uid://ctqcbjrmxaqsk"] +[gd_scene load_steps=4 format=3 uid="uid://ctqcbjrmxaqsk"] [ext_resource type="Script" uid="uid://c3aaxhp0oim08" path="res://Scripts/search_item.gd" id="1_j4126"] [ext_resource type="Texture2D" uid="uid://dwvy6crqhardn" path="res://Icons/Dropdown.png" id="2_hicj1"] +[ext_resource type="Script" uid="uid://dd38vqi4220tx" path="res://Scripts/SongSource.cs" id="3_ftuau"] -[node name="SearchItem" type="Control"] +[node name="SearchItem" type="Control" node_paths=PackedStringArray("soung_source")] custom_minimum_size = Vector2(0, 30) layout_mode = 3 anchors_preset = 10 @@ -12,6 +13,7 @@ grow_horizontal = 2 size_flags_horizontal = 3 size_flags_vertical = 4 script = ExtResource("1_j4126") +soung_source = NodePath("Node") [node name="HBoxContainer" type="HBoxContainer" parent="."] custom_minimum_size = Vector2(200, 32) @@ -43,11 +45,15 @@ icon_alignment = 1 expand_icon = true [node name="PopupMenu" type="PopupMenu" parent="."] +size = Vector2i(116, 100) item_count = 2 item_0/text = "DELETE" item_0/id = 0 item_1/text = "open source" item_1/id = 1 +[node name="Node" type="Node" parent="."] +script = ExtResource("3_ftuau") + [connection signal="pressed" from="HBoxContainer/Songname" to="." method="_on_songname_pressed"] [connection signal="pressed" from="HBoxContainer/Dropdown" to="." method="_on_dropdown_pressed"] diff --git a/Scripts/SongSource.cs b/Scripts/SongSource.cs new file mode 100644 index 0000000..d98c597 --- /dev/null +++ b/Scripts/SongSource.cs @@ -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 ""; + } +} diff --git a/Scripts/SongSource.cs.uid b/Scripts/SongSource.cs.uid new file mode 100644 index 0000000..277556a --- /dev/null +++ b/Scripts/SongSource.cs.uid @@ -0,0 +1 @@ +uid://dd38vqi4220tx diff --git a/Scripts/playlist_display.gd b/Scripts/playlist_display.gd index 6b92783..ea23e7f 100644 --- a/Scripts/playlist_display.gd +++ b/Scripts/playlist_display.gd @@ -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(): diff --git a/Scripts/search_item.gd b/Scripts/search_item.gd index 75f60ab..47d2aed 100644 --- a/Scripts/search_item.gd +++ b/Scripts/search_item.gd @@ -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. diff --git a/Simplaudio.csproj b/Simplaudio.csproj new file mode 100644 index 0000000..6623c24 --- /dev/null +++ b/Simplaudio.csproj @@ -0,0 +1,9 @@ + + + net8.0 + true + + + + + \ No newline at end of file diff --git a/Simplaudio.sln b/Simplaudio.sln new file mode 100644 index 0000000..a087f67 --- /dev/null +++ b/Simplaudio.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simplaudio", "Simplaudio.csproj", "{135675D8-011A-46FC-B4A1-B2D21C2CF78E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {135675D8-011A-46FC-B4A1-B2D21C2CF78E}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/readme.md b/readme.md index f0e9287..9381f9f 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,7 @@ # Simplaudio -a simple music player that just works +a simple music player -the v1.x versions are built on a bad codebase, i am working on 2.0 every now and then but it will take a bit for it to be finished -the music player is very functual though +the v1.x versions are built on a bad codebase, i am working on fixing it every now and then ## Translations I would apprechiate if you could help out with translations,