set_games uses all games from inventory now
This commit is contained in:
1 parent
c9502c1f3e
commit
281b9274ed
1 file changed
+5
-4
@@ -203,6 +203,7 @@ class Twitch:
|
|||||||
self._state_change.clear()
|
self._state_change.clear()
|
||||||
elif self._state is State.INVENTORY_FETCH:
|
elif self._state is State.INVENTORY_FETCH:
|
||||||
await self.fetch_inventory()
|
await self.fetch_inventory()
|
||||||
|
self.gui.set_games(set(campaign.game for campaign in self.inventory))
|
||||||
self.change_state(State.GAMES_UPDATE)
|
self.change_state(State.GAMES_UPDATE)
|
||||||
elif self._state is State.GAMES_UPDATE:
|
elif self._state is State.GAMES_UPDATE:
|
||||||
# Figure out which games to watch, and claim the drops we can
|
# Figure out which games to watch, and claim the drops we can
|
||||||
@@ -222,13 +223,13 @@ class Twitch:
|
|||||||
game = campaign.game
|
game = campaign.game
|
||||||
if (
|
if (
|
||||||
game not in self.games # isn't already there
|
game not in self.games # isn't already there
|
||||||
and game.name not in exclude # isn't excluded
|
and game.name not in exclude # and isn't excluded
|
||||||
# isn't excluded by priority_only
|
# and isn't excluded by priority_only
|
||||||
and (not priority_only or game.name in priority)
|
and (not priority_only or game.name in priority)
|
||||||
and campaign.can_earn() # campaign can be progressed
|
and campaign.can_earn() # and can be progressed (active required)
|
||||||
):
|
):
|
||||||
|
# non-excluded games with no priority, are placed last, below priority ones
|
||||||
self.games[game] = priorities.get(game.name, 0)
|
self.games[game] = priorities.get(game.name, 0)
|
||||||
self.gui.set_games(self.games.keys())
|
|
||||||
full_cleanup = True
|
full_cleanup = True
|
||||||
self.change_state(State.CHANNELS_CLEANUP)
|
self.change_state(State.CHANNELS_CLEANUP)
|
||||||
elif self._state is State.CHANNELS_CLEANUP:
|
elif self._state is State.CHANNELS_CLEANUP:
|
||||||
|
|||||||
Reference in new issue
Block a user