dev-version

This commit is contained in:
janis
2022-03-11 11:57:09 +01:00
parent 17b2bb1fa2
commit 014640466c
7 changed files with 31 additions and 11 deletions

View File

@@ -129,7 +129,6 @@ RootScreen:
app.root.current = "Showcase"
root.manager.transition.direction = "left"
<ShowcaseS>:
on_pre_enter: root.screen_updater_start()
name: "Showcase"

17
bin/info_handler.py Normal file
View 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)

View File

@@ -3,7 +3,7 @@ import bin.csv_parsers
import copy
import bin.filepathanalysis
import pygame
import time
import bin.info_handler
pa = bin.filepathanalysis.PathAnalysis()
cvr = bin.csv_parsers.CsvRead()
@@ -26,10 +26,13 @@ class Player:
else:
pygame.init()
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.sort()
self.playlist_backup = copy.deepcopy(self.playlist)
self.information = self.__imports.pop(0)
self.information.sort()
mx.init()
self.current_playing = self.playlist.pop(0)
mx.music.load(self.current_playing)
@@ -39,7 +42,12 @@ class Player:
def infoupdater(self):
self.transmission = []
cvw.write_str("./data/songtemp.csv", [self.current_playing_pos])
cvw.app_str("./data/songtemp.csv", self.information)
self.__config = cvr.importing("./data/config.csv").pop(0)
if self.__config == ["1"]:
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):
self.start_playing()