Commit f67398e1 authored by Marinus Schraal's avatar Marinus Schraal

window: Implement a bare-bones Tracker check

parent fdb283a0
......@@ -21,6 +21,7 @@ class CoreGrilo(GObject.GObject):
_theaudiodb_api_key = "195003"
cover_sources = GObject.Property(type=bool, default=False)
tracker_available = GObject.Property(type=bool, default=False)
def __repr__(self):
return "<CoreGrilo>"
......@@ -80,6 +81,7 @@ class CoreGrilo(GObject.GObject):
new_wrapper = GrlTrackerWrapper(
source, self._coremodel, self._coreselection, self)
self._wrappers[source.props.source_id] = new_wrapper
self.props.tracker_available = True
# elif source.props.source_id[:10] == "grl-dleyna":
# new_wrapper = GrlDLeynaWrapper(
# source, self._coremodel, self._coreselection, self)
......
......@@ -181,9 +181,12 @@ class Window(Gtk.ApplicationWindow):
def _switch_to_empty_view(self):
did_initial_state = self._settings.get_boolean('did-initial-state')
# if not grilo.props.tracker_available:
# self.views[View.EMPTY].props.state = EmptyView.State.NO_TRACKER
if did_initial_state:
# FIXME: Tracker just checks for TrackerWrapper right now.
# It should also check for the viability of certain queries to
# make sure we have a recent version available.
if not self._app.props.coremodel._grilo.props.tracker_available:
self.views[View.EMPTY].props.state = EmptyView.State.NO_TRACKER
elif did_initial_state:
self.views[View.EMPTY].props.state = EmptyView.State.EMPTY
else:
# FIXME: On switch back this view does not show properly.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment