added fullscreen showcase screen (currently in development and still buggy

This commit is contained in:
janis
2022-09-27 15:34:36 +02:00
parent 82b0e29d8d
commit 706e4da77c
20 changed files with 58 additions and 4 deletions

0
.idea/.gitignore generated vendored Normal file → Executable file
View File

0
.idea/MusicPlayer.iml generated Normal file → Executable file
View File

0
.idea/inspectionProfiles/profiles_settings.xml generated Normal file → Executable file
View File

0
.idea/misc.xml generated Normal file → Executable file
View File

0
.idea/modules.xml generated Normal file → Executable file
View File

0
.idea/vcs.xml generated Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

0
MusicPlayer.spec Normal file → Executable file
View File

0
README.md Normal file → Executable file
View File

0
bin/autocomplete.py Normal file → Executable file
View File

0
bin/csv_parsers.py Normal file → Executable file
View File

0
bin/filepathanalysis.py Normal file → Executable file
View File

26
bin/gui/gui.kv Normal file → Executable file
View File

@@ -86,6 +86,32 @@ RootScreen:
on_release:
root.dismiss()
<LeavePU>:
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
###########

0
bin/info_handler.py Normal file → Executable file
View File

0
bin/player.py Normal file → Executable file
View File

0
data/config.csv Normal file → Executable file
View File

10
data/settings.ini Normal file → Executable file
View File

@@ -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 =

0
data/songtemp.csv Normal file → Executable file
View File

2
data/temp.csv Normal file → Executable file
View File

@@ -1 +1 @@
/mnt/gamedrive/SORTED/Music/KB
/mnt/DATA/Music/
1 /mnt/gamedrive/SORTED/Music/KB /mnt/DATA/Music/

20
musicplayer.py Normal file → Executable file
View File

@@ -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,6 +276,9 @@ class Main(MDScreen):
def back_here(self):
if self.manager.current == "Showcase":
if config["Security"]["pwdFSExit"] == "True":
self.open_leave_popup()
else:
self.manager.current = "Main"
self.manager.transition.direction = "right"
elif self.manager.current == "Main":
@@ -271,6 +286,9 @@ class Main(MDScreen):
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')