Don't get missing media when no games are added

This commit is contained in:
Mathieu Comandon 2019-02-07 10:19:22 -08:00
parent dd382a06ba
commit 21c0ccf831

View file

@ -116,7 +116,8 @@ class GameStore(GObject.Object):
def add_games(self, games):
"""Add games to the store"""
self.media_loaded = False
AsyncCall(self.get_missing_media, None, [game["slug"] for game in games])
if games:
AsyncCall(self.get_missing_media, None, [game["slug"] for game in games])
for game in list(games):
GLib.idle_add(self.add_game, game)