dev-version
This commit is contained in:
@@ -129,7 +129,6 @@ RootScreen:
|
|||||||
app.root.current = "Showcase"
|
app.root.current = "Showcase"
|
||||||
root.manager.transition.direction = "left"
|
root.manager.transition.direction = "left"
|
||||||
|
|
||||||
|
|
||||||
<ShowcaseS>:
|
<ShowcaseS>:
|
||||||
on_pre_enter: root.screen_updater_start()
|
on_pre_enter: root.screen_updater_start()
|
||||||
name: "Showcase"
|
name: "Showcase"
|
||||||
|
|||||||
17
bin/info_handler.py
Normal file
17
bin/info_handler.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import bin.csv_parsers
|
||||||
|
|
||||||
|
|
||||||
|
cvr = bin.csv_parsers.CsvRead()
|
||||||
|
cvw = bin.csv_parsers.CsvWrite()
|
||||||
|
|
||||||
|
|
||||||
|
class InfoHandler:
|
||||||
|
def __init__(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def infohandler(self, infos, path):
|
||||||
|
print(path, "path")
|
||||||
|
self.path = f"{path}/songlist.csv"
|
||||||
|
self.__info_doc = cvr.importing(self.path)
|
||||||
|
print(self.__info_doc)
|
||||||
|
print(infos)
|
||||||
@@ -3,7 +3,7 @@ import bin.csv_parsers
|
|||||||
import copy
|
import copy
|
||||||
import bin.filepathanalysis
|
import bin.filepathanalysis
|
||||||
import pygame
|
import pygame
|
||||||
import time
|
import bin.info_handler
|
||||||
|
|
||||||
pa = bin.filepathanalysis.PathAnalysis()
|
pa = bin.filepathanalysis.PathAnalysis()
|
||||||
cvr = bin.csv_parsers.CsvRead()
|
cvr = bin.csv_parsers.CsvRead()
|
||||||
@@ -26,10 +26,13 @@ class Player:
|
|||||||
else:
|
else:
|
||||||
pygame.init()
|
pygame.init()
|
||||||
self.path = cvr.importing("./data/temp.csv").pop(0)
|
self.path = cvr.importing("./data/temp.csv").pop(0)
|
||||||
self.__imports = pa.validsonglistcreator(self.path.pop())
|
self.pathtr = self.path.pop(0)
|
||||||
|
self.__imports = pa.validsonglistcreator(self.pathtr)
|
||||||
self.playlist = self.__imports.pop(0)
|
self.playlist = self.__imports.pop(0)
|
||||||
|
self.playlist.sort()
|
||||||
self.playlist_backup = copy.deepcopy(self.playlist)
|
self.playlist_backup = copy.deepcopy(self.playlist)
|
||||||
self.information = self.__imports.pop(0)
|
self.information = self.__imports.pop(0)
|
||||||
|
self.information.sort()
|
||||||
mx.init()
|
mx.init()
|
||||||
self.current_playing = self.playlist.pop(0)
|
self.current_playing = self.playlist.pop(0)
|
||||||
mx.music.load(self.current_playing)
|
mx.music.load(self.current_playing)
|
||||||
@@ -39,7 +42,12 @@ class Player:
|
|||||||
def infoupdater(self):
|
def infoupdater(self):
|
||||||
self.transmission = []
|
self.transmission = []
|
||||||
cvw.write_str("./data/songtemp.csv", [self.current_playing_pos])
|
cvw.write_str("./data/songtemp.csv", [self.current_playing_pos])
|
||||||
|
self.__config = cvr.importing("./data/config.csv").pop(0)
|
||||||
|
if self.__config == ["1"]:
|
||||||
cvw.app_str("./data/songtemp.csv", self.information)
|
cvw.app_str("./data/songtemp.csv", self.information)
|
||||||
|
else:
|
||||||
|
print(self.path, "path")
|
||||||
|
bin.info_handler.InfoHandler().infohandler(self.information, self.pathtr)
|
||||||
|
|
||||||
def musicmanager(self, inst, other):
|
def musicmanager(self, inst, other):
|
||||||
self.start_playing()
|
self.start_playing()
|
||||||
|
|||||||
1
data/config.csv
Normal file
1
data/config.csv
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
|
@@ -1,2 +1 @@
|
|||||||
0
|
0
|
||||||
Metaheuristic - Freedom Trail Studio.mp3,Heal You - Freedom Trail Studio.mp3,Straw Squeak.mp3
|
|
||||||
|
|||||||
|
@@ -1 +1 @@
|
|||||||
/home/janis/Downloads
|
/home/janis/Downloads/KB
|
||||||
|
|||||||
|
@@ -10,11 +10,6 @@ from kivy.clock import Clock
|
|||||||
import bin.csv_parsers
|
import bin.csv_parsers
|
||||||
import bin.filepathanalysis
|
import bin.filepathanalysis
|
||||||
import bin.player
|
import bin.player
|
||||||
import pygame
|
|
||||||
import pygame.mixer as mx
|
|
||||||
import copy
|
|
||||||
import time
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pl = bin.player.Player()
|
pl = bin.player.Player()
|
||||||
@@ -150,6 +145,7 @@ class ShowcaseS(MDScreen):
|
|||||||
self.__currents_imp = self.__info.pop(0)
|
self.__currents_imp = self.__info.pop(0)
|
||||||
self.__currents = int(self.__currents_imp.pop(0))
|
self.__currents = int(self.__currents_imp.pop(0))
|
||||||
self.__upcoming = self.__info.pop(0)
|
self.__upcoming = self.__info.pop(0)
|
||||||
|
self.__upcoming.sort()
|
||||||
self.__current = self.__upcoming.pop(self.__currents)
|
self.__current = self.__upcoming.pop(self.__currents)
|
||||||
self.ids.current_song.text = self.__current[:(len(self.__current) - 4)]
|
self.ids.current_song.text = self.__current[:(len(self.__current) - 4)]
|
||||||
if len(self.__upcoming) <= self.__currents:
|
if len(self.__upcoming) <= self.__currents:
|
||||||
|
|||||||
Reference in New Issue
Block a user