mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
Merge pull request #115 from WallK/array-paths
Allowing lists and strings for video_path
This commit is contained in:
@@ -15,7 +15,7 @@ gold = false
|
|||||||
|
|
||||||
[paths]
|
[paths]
|
||||||
tja_path = ['Songs']
|
tja_path = ['Songs']
|
||||||
video_path = 'Videos'
|
video_path = ['Videos']
|
||||||
|
|
||||||
[keys]
|
[keys]
|
||||||
exit_key = 'A'
|
exit_key = 'A'
|
||||||
|
|||||||
@@ -21,10 +21,16 @@ class State:
|
|||||||
|
|
||||||
class TitleScreen:
|
class TitleScreen:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
video_dir = Path(global_data.config["paths"]["video_path"]) / "op_videos"
|
#normalize to accept both stings and lists in toml
|
||||||
self.op_video_list = [file for file in video_dir.glob("**/*.mp4")]
|
#maybe normalize centrally? but it's used only here
|
||||||
video_dir = Path(global_data.config["paths"]["video_path"]) / "attract_videos"
|
vp = global_data.config["paths"]["video_path"]
|
||||||
self.attract_video_list = [file for file in video_dir.glob("**/*.mp4")]
|
video_paths = [vp] if isinstance(vp, str) else vp
|
||||||
|
self.op_video_list = []
|
||||||
|
self.attract_video_list = []
|
||||||
|
for base in video_paths:
|
||||||
|
base = Path(base)
|
||||||
|
self.op_video_list += list((base/"op_videos").glob("**/*.mp4"))
|
||||||
|
self.attract_video_list += list((base/"attract_videos").glob("**/*.mp4"))
|
||||||
self.screen_init = False
|
self.screen_init = False
|
||||||
self.coin_overlay = CoinOverlay()
|
self.coin_overlay = CoinOverlay()
|
||||||
self.allnet_indicator = AllNetIcon()
|
self.allnet_indicator = AllNetIcon()
|
||||||
|
|||||||
Reference in New Issue
Block a user