From 6f8df2b55cb6a91379264dcc10a10b20a16420a2 Mon Sep 17 00:00:00 2001 From: 9and3r <9and3r@gmail.com> Date: Tue, 29 Jul 2014 15:09:25 +0200 Subject: [PATCH] Fixed cache folder from config file --- mopidy_touchscreen/.idea/workspace.xml | 56 ++++++++++++++++++-------- mopidy_touchscreen/screen_manager.py | 4 +- mopidy_touchscreen/touch_screen.py | 2 +- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/mopidy_touchscreen/.idea/workspace.xml b/mopidy_touchscreen/.idea/workspace.xml index ff3b213..a07965a 100644 --- a/mopidy_touchscreen/.idea/workspace.xml +++ b/mopidy_touchscreen/.idea/workspace.xml @@ -23,11 +23,11 @@ - + - - + + @@ -35,11 +35,23 @@ - - + + - - + + + + + + + + + + + + + + @@ -60,6 +72,7 @@ @@ -342,13 +355,6 @@ - - - - - - - @@ -378,16 +384,34 @@ + + + + + + + + - - + + + + + + + + + + + + diff --git a/mopidy_touchscreen/screen_manager.py b/mopidy_touchscreen/screen_manager.py index f4001c9..791bec9 100644 --- a/mopidy_touchscreen/screen_manager.py +++ b/mopidy_touchscreen/screen_manager.py @@ -15,7 +15,7 @@ logger = logging.getLogger(__name__) class ScreenManager(): - def __init__(self, size, core, backend): + def __init__(self, size, core, backend, cache): self.size = size self.core = core self.backend = backend @@ -27,7 +27,7 @@ class ScreenManager(): self.fonts['base'] = pygame.font.SysFont("verdana", self.base_size) self.fonts['icon'] = pygame.font.Font(font, self.base_size) try: - self.screens = [MainScreen(size, self, "/home/ander", core, self.fonts), + self.screens = [MainScreen(size, self, cache, core, self.fonts), Tracklist(size, self.base_size, self), PlaylistScreen(size, self.base_size, self), MenuScreen(size, self.base_size, self)] diff --git a/mopidy_touchscreen/touch_screen.py b/mopidy_touchscreen/touch_screen.py index 3f676d6..37b31e7 100644 --- a/mopidy_touchscreen/touch_screen.py +++ b/mopidy_touchscreen/touch_screen.py @@ -24,7 +24,7 @@ class TouchScreen(pykka.ThreadingActor, core.CoreListener): self.fullscreen = config['touchscreen']['fullscreen'] pygame.init() pygame.mouse.set_visible(config['touchscreen']['cursor']) - self.screen_manager = ScreenManager(self.screen_size,self.core, self.backend) + self.screen_manager = ScreenManager(self.screen_size,self.core, self.backend, self.cache_dir) def start_thread(self): clock = pygame.time.Clock()