diff --git a/.idea/.gitignore b/.idea/.gitignore old mode 100644 new mode 100755 diff --git a/.idea/MusicPlayer.iml b/.idea/MusicPlayer.iml old mode 100644 new mode 100755 diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml old mode 100644 new mode 100755 diff --git a/.idea/misc.xml b/.idea/misc.xml old mode 100644 new mode 100755 diff --git a/.idea/modules.xml b/.idea/modules.xml old mode 100644 new mode 100755 diff --git a/.idea/vcs.xml b/.idea/vcs.xml old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/MusicPlayer.spec b/MusicPlayer.spec old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bin/autocomplete.py b/bin/autocomplete.py old mode 100644 new mode 100755 diff --git a/bin/csv_parsers.py b/bin/csv_parsers.py old mode 100644 new mode 100755 diff --git a/bin/filepathanalysis.py b/bin/filepathanalysis.py old mode 100644 new mode 100755 diff --git a/bin/gui/gui.kv b/bin/gui/gui.kv old mode 100644 new mode 100755 index 0749dfc..640aa97 --- a/bin/gui/gui.kv +++ b/bin/gui/gui.kv @@ -86,6 +86,32 @@ RootScreen: on_release: root.dismiss() +: + title: "DISABLE FULLSCREEN AND LEAVE" + font_size: 50 + size_hint: 0.5, 0.4 + auto_dismiss: False + GridLayout: + cols:1 + Label: + text: "Please enter the password to leave the fullscreen mode!" + font_size: 18 + TextInput: + id: passw + multiline: False + input_filter: "string" + Label: + id: output + text: "" + Button: + text:"Ok" + on_release: + root.check_pwd() + Button: + text: "cancel" + on_release: + root.dismiss() + ########### # SCREENS ########### diff --git a/bin/info_handler.py b/bin/info_handler.py old mode 100644 new mode 100755 diff --git a/bin/player.py b/bin/player.py old mode 100644 new mode 100755 diff --git a/data/config.csv b/data/config.csv old mode 100644 new mode 100755 diff --git a/data/settings.ini b/data/settings.ini old mode 100644 new mode 100755 index 96a3105..21fa03b --- a/data/settings.ini +++ b/data/settings.ini @@ -4,14 +4,24 @@ showcaseRefreshRate = 0.5 [Display] +# General launch-display-settings (width, height of window) width = 800 height = 600 +# Choose if window launches maximized or not, Boolean property launchMaximized = True [Playback] +# Choose if you want the playback to loop at the end (1 for True, 0 for False) loopPlayback = 1 +[Security] +# Specifies if a password should be used for exiting the fullscreen mode on the showcase screen +pwdFSExit = False +# Set password here, will not be respected if above is "False" +pwd = + [Info] +# Software version version = V1.1 subVersion = diff --git a/data/songtemp.csv b/data/songtemp.csv old mode 100644 new mode 100755 diff --git a/data/temp.csv b/data/temp.csv old mode 100644 new mode 100755 index 08ab774..6b71cc6 --- a/data/temp.csv +++ b/data/temp.csv @@ -1 +1 @@ -/mnt/gamedrive/SORTED/Music/KB +/mnt/DATA/Music/ diff --git a/musicplayer.py b/musicplayer.py old mode 100644 new mode 100755 index d9e1f5d..6e96e8c --- a/musicplayer.py +++ b/musicplayer.py @@ -11,6 +11,7 @@ else: os.environ["KIVY_NO_CONSOLELOG"] = "1" import signal +import time import multiprocessing from kivy.core.window import Window, Config from kivy.uix.screenmanager import ScreenManager @@ -55,6 +56,17 @@ class invalidpathPU(Popup): pass +class LeavePU(Popup): + def check_pwd(self): + if self.ids.passw.text == config["Security"]["pwd"]: + self.manager.current = "Main" + self.manager.transition.direction = "right" + self.dismiss() + else: + time.sleep(2) + self.ids.output.text = "Password wrong, please try again!" + + ########### # SCREENS ########### @@ -264,13 +276,19 @@ class Main(MDScreen): def back_here(self): if self.manager.current == "Showcase": - self.manager.current = "Main" - self.manager.transition.direction = "right" + if config["Security"]["pwdFSExit"] == "True": + self.open_leave_popup() + else: + self.manager.current = "Main" + self.manager.transition.direction = "right" elif self.manager.current == "Main": self.go_back() else: pass + def open_leave_popup(self): + LeavePU().open() + class ShowcaseS(MDScreen): def disablefullscreen(self): @@ -303,7 +321,7 @@ if __name__ == "__main__": try: Window.size = (int(config['Display']['width']), int(config['Display']['height'])) except Exception as e: - print("Unvalid config string found for in Display settings") + print("Unvalid config string found in Display settings") Config.set('graphics', 'width', '800') Config.set('graphics', 'height', '600')