"bug" fixes

This commit is contained in:
notdraimdev
2024-11-02 02:36:54 +01:00
parent 424e591064
commit 891bfc7382
2 changed files with 63 additions and 78 deletions
+1 -1
View File
@@ -850,7 +850,7 @@ offset_left = -64.0
offset_top = -23.0 offset_top = -23.0
grow_horizontal = 0 grow_horizontal = 0
grow_vertical = 0 grow_vertical = 0
text = "v1.5.0" text = "v1.5.0.2"
horizontal_alignment = 2 horizontal_alignment = 2
[node name="SettingsButton" type="Button" parent="."] [node name="SettingsButton" type="Button" parent="."]
+62 -77
View File
@@ -181,42 +181,33 @@ func _ready() -> void:
child.focus_mode = child is LineEdit child.focus_mode = child is LineEdit
func setUpDiscord(): func setUpDiscord():
DiscordRPC.app_id = 13 DiscordRPC.app_id = 1276916292170809426
print("stibidiii ",DiscordRPC.get_current_user())
if DiscordUsername == "vrenthusiest" or DiscordRPC.get_current_user().get("username") == "vrenthusiest":
DiscordRPC.app_id = 1302002529378369568
else:
DiscordRPC.app_id = 1276916292170809426
DiscordRPC.refresh() DiscordRPC.refresh()
print("stiff chicks ",DiscordRPC.get_current_user()) print("stiff chicks ",DiscordRPC.get_current_user())
DiscordUsername = DiscordRPC.get_current_user().get("username") DiscordUsername = DiscordRPC.get_current_user().get("username")
DiscordRPC.refresh() DiscordRPC.refresh()
if DiscordRPC.app_id == 1302002529378369568: DiscordRPC.large_image = "logo"
DiscordRPC.large_image = "changed" # this is boolean if everything worked
DiscordRPC.start_timestamp = Time.get_unix_time_from_system() print("Discord working: " + str(DiscordRPC.get_is_discord_working()))
else: # Set the first custom text row of the activity here
DiscordRPC.large_image = "logo" if textSongs.size() >= CurrentIDX:
# this is boolean if everything worked if textSongs.size() > CurrentIDX:
print("Discord working: " + str(DiscordRPC.get_is_discord_working())) DiscordRPC.details = textSongs[CurrentIDX]
# Set the first custom text row of the activity here # Set the second custom text row of the activity here
if textSongs.size() >= CurrentIDX: DiscordRPC.state = ""
if textSongs.size() > CurrentIDX: # Image key for small image from "Art Assets" from the Discord Developer website
DiscordRPC.details = textSongs[CurrentIDX] # Tooltip text for the large image
# Set the second custom text row of the activity here SplashStrings = ["the party just started!"]
DiscordRPC.state = "" var LText = SplashStrings.pick_random()
# Image key for small image from "Art Assets" from the Discord Developer website print(LText)
# Tooltip text for the large image DiscordRPC.large_image_text = LText
SplashStrings = ["the party just started!"] # Image key for large image from "Art Assets" from the Discord Developer website
var LText = SplashStrings.pick_random() DiscordRPC.small_image = ""
print(LText) # Tooltip text for the small image
DiscordRPC.large_image_text = LText DiscordRPC.small_image_text = "Nothing"
# Image key for large image from "Art Assets" from the Discord Developer website # "02:41 elapsed" timestamp for the activity
DiscordRPC.small_image = "" # Always refresh after changing the values!
# Tooltip text for the small image DiscordRPC.refresh()
DiscordRPC.small_image_text = "Nothing"
# "02:41 elapsed" timestamp for the activity
# Always refresh after changing the values!
DiscordRPC.refresh()
func deletesong(idx:int): func deletesong(idx:int):
var currentDir:String= CurrentDir var currentDir:String= CurrentDir
@@ -256,9 +247,8 @@ func SongDragStopped(Changed:bool):
pausePlay() pausePlay()
UpdateProgressSlider = true UpdateProgressSlider = true
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value))
DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value)) DiscordRPC.refresh()
DiscordRPC.refresh()
func SongDragStarted(): func SongDragStarted():
UpdateProgressSlider = false UpdateProgressSlider = false
@@ -332,14 +322,13 @@ func PlaySongs():
Paused = true Paused = true
music_player.stream_paused = true music_player.stream_paused = true
play_list.icon = PLAY play_list.icon = PLAY
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.state = "Paused"
DiscordRPC.state = "Paused" print(DiscordRPC.get_current_user())
print(DiscordRPC.get_current_user())
else: else:
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value))
DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value)) print(DiscordRPC.get_current_user())
print(DiscordRPC.get_current_user())
DiscordRPC.state = "Listening To Music" DiscordRPC.state = "Listening To Music"
Paused = false Paused = false
music_player.stream_paused = false music_player.stream_paused = false
play_list.icon = PAUSE play_list.icon = PAUSE
@@ -366,8 +355,7 @@ func PlaySongs():
if !CurrentDir.ends_with(CurrentPlaylist): if !CurrentDir.ends_with(CurrentPlaylist):
GetSongs(PlaylistsLocation[CurrentPlaylist]) GetSongs(PlaylistsLocation[CurrentPlaylist])
var CurrentSongDir:String = PlaylistsLocation[CurrentPlaylist] + "/" + textSongs[index] var CurrentSongDir:String = PlaylistsLocation[CurrentPlaylist] + "/" + textSongs[index]
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.details = textSongs[index].replace(".mp3","")
DiscordRPC.details = textSongs[index].replace(".mp3","")
print(CurrentSongDir) print(CurrentSongDir)
var sonnname:String = textSongs[index] var sonnname:String = textSongs[index]
sonnname = sonnname.replace(".mp3", "") sonnname = sonnname.replace(".mp3", "")
@@ -488,14 +476,12 @@ func _process(_delta: float) -> void:
if music_player.playing: if music_player.playing:
TimeSpentListening += _delta TimeSpentListening += _delta
CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,0.0,0.1) CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,0.0,0.1)
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.state = "Listening To Music"
DiscordRPC.state = "Listening To Music"
else: else:
if DiscordRPC.app_id != 1302002529378369568: DiscordRPC.start_timestamp = int(0)
DiscordRPC.start_timestamp = int(0) DiscordRPC.state = "Paused"
DiscordRPC.state = "Paused" if DiscordRPC.get_is_discord_working():
if DiscordRPC.get_is_discord_working(): DiscordRPC.refresh()
DiscordRPC.refresh()
CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,1.0,0.1) CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,1.0,0.1)
if DiscordRichPresenceEnabled: if DiscordRichPresenceEnabled:
DiscordRPC.run_callbacks() DiscordRPC.run_callbacks()
@@ -535,31 +521,30 @@ func _process(_delta: float) -> void:
func UpdateSplashes(): func UpdateSplashes():
if DiscordRPC.app_id != 1302002529378369568: if DiscordRPC.get_is_discord_working():
if DiscordRPC.get_is_discord_working(): SplashStrings = ["Total listening time: %s!" % str(str(int(TimeSpentListening/60)/60 )
SplashStrings = ["Total listening time: %s!" % str(str(int(TimeSpentListening/60)/60 ) + "h : " + str((int(TimeSpentListening) / 60) % 60) + "m : " +
+ "h : " + str((int(TimeSpentListening) / 60) % 60) + "m : " + str(int(TimeSpentListening) % 60) + "s"),
str(int(TimeSpentListening) % 60) + "s"), "Version: %s" % version.text,"🤷‍♂️","This Changes every ~11 seconds",
"Version: %s" % version.text,"🤷‍♂️","This Changes every ~11 seconds", "hello everybody my name is %s" % DiscordRPC.get_current_user()["username"],
"hello everybody my name is %s" % DiscordRPC.get_current_user()["username"], "wash your dishes, i know you got some","Running on %s" % OS.get_distribution_name(),
"wash your dishes, i know you got some","Running on %s" % OS.get_distribution_name(), "%s is cooking" % DiscordRPC.get_current_user()["username"], "debugging" if OS.has_feature("editor") else "Release build",
"%s is cooking" % DiscordRPC.get_current_user()["username"], "debugging" if OS.has_feature("editor") else "Release build", "this user chose to show you all this info","Playing a Banger",
"this user chose to show you all this info","Playing a Banger", ":steamhappy:","This is a sign that crocodiles live in water",
":steamhappy:","This is a sign that crocodiles live in water", "Space? SPACE?! SPAAAAAAAAAAAAACE!!!",
"Space? SPACE?! SPAAAAAAAAAAAAACE!!!", "i love gd colonge",
"i love gd colonge", "listening with reverb" if settings_menu_child.reverb_check.button_pressed else
"listening with reverb" if settings_menu_child.reverb_check.button_pressed else "not listening with reverb","the cake is edible",
"not listening with reverb","the cake is edible", "what a great song!","this message is useless",
"what a great song!","this message is useless", "stop reading these","why are you reading these",
"stop reading these","why are you reading these", "hello from mars", "hello to mars","there is a fly in my room",
"hello from mars", "hello to mars","there is a fly in my room", "yippee!","What, are they allergic to bathtubs or something",
"yippee!","What, are they allergic to bathtubs or something", "Did you know, a 737 can land with up to 33knots of wind!",
"Did you know, a 737 can land with up to 33knots of wind!", "Welcome to todays JahresSchau",
"Welcome to todays JahresSchau", "ram is very useful","your cpu is tasty","main course: Nvidia GPU",
"ram is very useful","your cpu is tasty","main course: Nvidia GPU", "SCHOTTLAND FUER IMMER","i eat airborne vehicles","linus trovalds",
"SCHOTTLAND FUER IMMER","i eat airborne vehicles","linus trovalds", "","\(〇_o)/","Nuh Uh!","Yuh Huh","Breaching.",
"","\(〇_o)/","Nuh Uh!","Yuh Huh","Breaching.", "I get a narcissistic injury when the wall ignores me","totally not using %s" % version.text]
"I get a narcissistic injury when the wall ignores me","totally not using %s" % version.text]
func SaveEverything(): func SaveEverything():
@@ -638,4 +623,4 @@ func loadPlaylists():
print(Playlists.keys()) print(Playlists.keys())
print("Playlists") print("Playlists")
file.close() file.close()
file2.close() file2.close()