Beta-1.0.2:
- added more keyboard shortcuts & some backend optimisations
This commit is contained in:
@@ -103,10 +103,17 @@ RootScreen:
|
||||
md_bg_color: app.theme_cls.accent_color
|
||||
GridLayout:
|
||||
cols: 1
|
||||
Label:
|
||||
text: "MusicPlayer"
|
||||
font_size: 40
|
||||
color: app.theme_cls.primary_color
|
||||
GridLayout:
|
||||
cols: 1
|
||||
Label:
|
||||
text: "MusicPlayer"
|
||||
font_size: 40
|
||||
color: app.theme_cls.primary_color
|
||||
Label:
|
||||
text: "playing song will appear here"
|
||||
id: current_song
|
||||
font_size: 25
|
||||
color: app.theme_cls.primary_dark
|
||||
FloatLayout:
|
||||
GridLayout:
|
||||
size_hint: 0.8, 0.9
|
||||
@@ -151,7 +158,6 @@ RootScreen:
|
||||
root.manager.transition.direction = "left"
|
||||
|
||||
<ShowcaseS>:
|
||||
on_pre_enter: root.screen_updater_start()
|
||||
name: "Showcase"
|
||||
md_bg_color: (0, 0, 0, 1)
|
||||
FloatLayout:
|
||||
@@ -195,3 +201,6 @@ RootScreen:
|
||||
|
||||
<SettingsS>:
|
||||
name: "Settings"
|
||||
md_bg_color: app.theme_cls.accent_color
|
||||
ToggleButton:
|
||||
text: "Songinfo = Filename"
|
||||
@@ -1,2 +1,2 @@
|
||||
8
|
||||
9
|
||||
Tennessee Waltz - New 101 Strings Orchestra | Slow Walz (lansam),Morning has broken - Cat Stevens | Walzer (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Say So - Doja Cat | Discofox (Langsam),Save Your Tears (Remix) - The Weeknd & Ariana Grande | Discofox (Langsam),Shivers - Ed Sheeran | Jive/ Rocknroll (Mittel),I feel good - Ray Charles | Jive/Rocknroll (Mittel),Muevelo - Rey Ruiz | Cha cha cha (Mittel),Suelta la cintura - Ruben leon | Cha cha cha (Mittel),Como Volver a Ser Feliz - Luis Enrique | Salsa (Mittel),Mas que nada - black eyed peas | Salsa/Discofox (Mittel),Moon River - Henry Mancini | Slow Walz (Langsam),Dancing Queen - ABBA | Discofox (Langsam),Don't Call Me Up - Mabel | Discofox (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Lets have a Party - Wanda Jackson | Jive (mittel),Crazy Little Thing Called Love - Queen | Jive / Rocknroll (Schnell),El Diablo Anda Suelto - Rey Ruiz | Cha cha cha (Mittel),Lets get loud - jennifer Lopez | Cha cha cha (Schnell),Enamorame - Somos del Barrio | Salsa (Mittel),Something Stupid (feat. Reese Witherspoon) - Michael Bublé | Rumba/cha cha cha (Langsam),When a man loves a woman - Percy Sledge | Langsam (Langsam),Scharlachrot - Patent Ochsner | Walzer (Langsam),Ily (i love you baby) [feat. Emilee] - Surf Mesa | Discofox (Mittel),Like a sex machine - James Brown | Discofox (Mittel),Uptown Funk (feat. Bruno Mars) - Discofox | Discofox (Schnell),Tutti Frutti - Little Richard | Jive/ Rocknroll (Mittel),Jailhouse Rock - Elvis Presley | Jive/ Rocknroll (Schnell),Are you lonesome - Elvis Presley | walzer/slow (Langsam),Ay Mujer - Rey Ruiz | Cha cha cha (Mittel),Rico Vacilon - Pedro Garcia & His Del Prado Orchestra | Cha cha cha (Mittel),Jeepers creepers - Benny Goodmann | Foxtrott (Mittel),An der schönen blauen Donau - New 101 Strings Orchestra | Wiener Walzer (Schnell),The Last Waltz - Engelbert Humperdinck | Walzer (Mittel),Stand by me - Sam Brown | Cha cha cha (Lansam),Staiin' Alive - Begees | Discofox (Mittel),Easy On Me - Adele | Langsam (Langsam),Magia - Alvaro Soler | Flashmob (Mittel),Friday (feat. Mufasa & Hypeman) [Dopamine Re-Edit] - Riton & Nightcrawlers | Party (Mittel),YMCA - Village People | Party (Mittel),Cotton eyed Joe (Hennustall zermatt mix) - Rednex | Party (Mittel),Gangnam style - PSY | Party (Mittel),Take On Me - a-ha | Jive (Schnell),Rock Around the Clock - Bill Haley & His Comets | Jive/Rocknroll (Schnell),Satisfaction - Rolling Stones | Party (Mittel),"Un, dos, tres - Ricky Martin | Party (Mittel)",Party Rock anthem - LFMBQ | Party (Mittel),I don't care - Icona Pop | Party (Mittel),Love tonight - Shouse&David Guetta | Party (Mittel),Insomnia - Faithless | Party (Mittel),Angels - Robbie Williams | Slow (Langsam),Nothing compares to you - Sinead O'Connor | Slow (Langsam)
|
||||
|
||||
|
@@ -12,7 +12,6 @@ from kivy.clock import Clock
|
||||
import bin.csv_parsers
|
||||
import bin.filepathanalysis
|
||||
import bin.player
|
||||
import sys
|
||||
|
||||
|
||||
pl = bin.player.Player()
|
||||
@@ -103,17 +102,34 @@ class Main(MDScreen):
|
||||
self.rewindsong()
|
||||
elif self.key == "left":
|
||||
self.previoussong()
|
||||
elif self.key == "escape":
|
||||
self.back_here()
|
||||
elif self.key == "s":
|
||||
if self.manager.current == "Main":
|
||||
self.manager.current = "Showcase"
|
||||
self.manager.transition.direction = "left"
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
|
||||
def initialize(self):
|
||||
try:
|
||||
if self.mplayer.is_alive() == True:
|
||||
Clock.schedule_interval(self.screen_updating, 2)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
if self.mplayer.is_alive() is True:
|
||||
pass
|
||||
else:
|
||||
self.instructions = multiprocessing.Value('i', 0)
|
||||
self.others = multiprocessing.Value('i', 0)
|
||||
self.mplayer = multiprocessing.Process(name="player", target=pl.musicmanager, args=(self.instructions, self.others,))
|
||||
self.mplayer.start()
|
||||
except:
|
||||
self.instructions = multiprocessing.Value('i', 0)
|
||||
self.others = multiprocessing.Value('i', 0)
|
||||
self.mplayer = multiprocessing.Process(name="player", target=pl.musicmanager, args=(self.instructions, self.others,))
|
||||
self.mplayer.start()
|
||||
|
||||
@@ -140,25 +156,10 @@ class Main(MDScreen):
|
||||
self.mplayer.kill()
|
||||
except:
|
||||
pass
|
||||
self.ids.pp_button.text = "Play"
|
||||
self.manager.current = "Home"
|
||||
self.manager.transition.direction = "right"
|
||||
|
||||
def show_current_song(self):
|
||||
self.__config = cvr.importing("./data/config.csv").pop(0)
|
||||
self.__info = cvr.importing("./data/songtemp.csv")
|
||||
self.__currents_imp = self.__info.pop(0)
|
||||
self.__currents = int(self.__currents_imp.pop(0))
|
||||
self.__upcoming = self.__info.pop(0)
|
||||
self.__current = self.__upcoming.pop(self.__currents)
|
||||
if self.__config == ["1"]:
|
||||
self.ids.current_song.text = self.__current[:(len(self.__current) - 4)]
|
||||
else:
|
||||
self.ids.current_song.text = self.__current
|
||||
|
||||
class ShowcaseS(MDScreen):
|
||||
def screen_updater_start(self):
|
||||
Clock.schedule_interval(self.screen_updating, 2)
|
||||
|
||||
def screen_updating(self, waste):
|
||||
self.__config = cvr.importing("./data/config.csv").pop(0)
|
||||
self.__info = cvr.importing("./data/songtemp.csv")
|
||||
@@ -168,10 +169,12 @@ class ShowcaseS(MDScreen):
|
||||
self.__current = self.__upcoming.pop(self.__currents)
|
||||
if self.__config == ["1"]:
|
||||
self.ids.current_song.text = self.__current[:(len(self.__current) - 4)]
|
||||
self.manager.get_screen("Showcase").ids.current_song.text = self.__current[:(len(self.__current) - 4)]
|
||||
else:
|
||||
self.ids.current_song.text = self.__current
|
||||
self.manager.get_screen("Showcase").ids.current_song.text = self.__current
|
||||
if len(self.__upcoming) <= self.__currents:
|
||||
self.ids.upcoming_songs.text = "No more songs in Queue"
|
||||
self.manager.get_screen("Showcase").ids.upcoming_songs.text = "No more songs in Queue"
|
||||
else:
|
||||
self.__upcoming2 = str(self.__upcoming.pop(self.__currents))
|
||||
if self.__config == ["1"]:
|
||||
@@ -190,7 +193,20 @@ class ShowcaseS(MDScreen):
|
||||
else:
|
||||
self.__upcoming_output += f"\n{self.__upcoming2}"
|
||||
self.__length_output += 1
|
||||
self.ids.upcoming_songs.text = self.__upcoming_output
|
||||
self.manager.get_screen("Showcase").ids.upcoming_songs.text = self.__upcoming_output
|
||||
|
||||
def back_here(self):
|
||||
if self.manager.current == "Showcase":
|
||||
self.manager.current = "Main"
|
||||
self.manager.transition.direction = "right"
|
||||
elif self.manager.current == "Main":
|
||||
self.go_back()
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
class ShowcaseS(MDScreen):
|
||||
pass
|
||||
|
||||
|
||||
class RootScreen(ScreenManager):
|
||||
|
||||
Reference in New Issue
Block a user