Adding magazine covers
[watersofshiloah] / src / mormonchannel_gtk.py
index ccc49b8..7c570cd 100755 (executable)
@@ -3,7 +3,6 @@
 
 """
 @bug Fix segfault on closing of window while playing
-@todo Add images for Magazines and Issues
 @todo Need to confirm id's are persistent (not just for todos but broken behavior on transition)
        @todo Track recent
        @todo Persisted Pause
@@ -15,6 +14,7 @@
 
 from __future__ import with_statement
 
+import os
 import gc
 import logging
 import ConfigParser
@@ -47,10 +47,13 @@ class MormonChannelProgram(hildonize.get_app_class()):
 
        def __init__(self):
                super(MormonChannelProgram, self).__init__()
-               self._store = imagestore.ImageStore("../data", "../data")
+               currentPath = os.path.abspath(__file__)
+               storePath = os.path.join(os.path.split(os.path.dirname(currentPath))[0], "data")
+               self._store = imagestore.ImageStore(storePath, constants._cache_path_)
                self._index = stream_index.AudioIndex()
                self._player = player.Player(self._index)
 
+               self._store.start()
                self._index.start()
                try:
                        if not hildonize.IS_HILDON_SUPPORTED:
@@ -71,6 +74,7 @@ class MormonChannelProgram(hildonize.get_app_class()):
                        self._load_settings()
                except:
                        self._index.stop()
+                       self._store.stop()
                        raise
 
        def _save_settings(self):
@@ -109,6 +113,7 @@ class MormonChannelProgram(hildonize.get_app_class()):
                        self._save_settings()
 
                        self._index.stop()
+                       self._store.stop()
 
                        try:
                                self._deviceState.close()