added a setting where you can change if the playback should be looped or not

This commit is contained in:
janis
2022-08-24 11:19:04 +02:00
parent 359562ec0c
commit 974e11636a
2 changed files with 18 additions and 9 deletions

View File

@@ -4,11 +4,15 @@ import copy
import bin.filepathanalysis import bin.filepathanalysis
import pygame import pygame
import bin.info_handler import bin.info_handler
import configparser
pa = bin.filepathanalysis.PathAnalysis() pa = bin.filepathanalysis.PathAnalysis()
cvr = bin.csv_parsers.CsvRead() cvr = bin.csv_parsers.CsvRead()
cvw = bin.csv_parsers.CsvWrite() cvw = bin.csv_parsers.CsvWrite()
config = configparser.ConfigParser()
config.read('./data/settings.ini')
class Player: class Player:
def __init__(self): def __init__(self):
@@ -114,6 +118,9 @@ class Player:
# Main event-checking part # Main event-checking part
if mx.music.get_busy() is False and inst.value == 1 and self.__recent_change == 0: if mx.music.get_busy() is False and inst.value == 1 and self.__recent_change == 0:
mx.music.unload() mx.music.unload()
if config["Playback"]["loopPlayback"] == "0":
pass
else:
if len(self.playlist) > 0: if len(self.playlist) > 0:
pass pass
else: else:

View File

@@ -3,6 +3,8 @@
# (lower = more up to date but higher resource usage) # (lower = more up to date but higher resource usage)
showcaseRefreshRate = 0.5 showcaseRefreshRate = 0.5
[Playback]
loopPlayback = 1
[Info] [Info]
version = V1.1 version = V1.1