diff --git a/bemani/backend/jubeat/base.py b/bemani/backend/jubeat/base.py index 5b46c35..4d76b33 100644 --- a/bemani/backend/jubeat/base.py +++ b/bemani/backend/jubeat/base.py @@ -360,9 +360,9 @@ class JubeatBase(CoreHandler, CardManagerHandler, PASELIHandler, Base): normalindex = 2 premiumindex = 1 if normalemblems: - normalindex = random.sample(normalemblems, 1)[0] + normalindex = random.sample(list(normalemblems), 1)[0] if premiumemblems: - premiumindex = random.sample(premiumemblems, 1)[0] + premiumindex = random.sample(list(premiumemblems), 1)[0] return normalindex, premiumindex diff --git a/bemani/backend/jubeat/clan.py b/bemani/backend/jubeat/clan.py index 284695f..3fb518d 100644 --- a/bemani/backend/jubeat/clan.py +++ b/bemani/backend/jubeat/clan.py @@ -95,10 +95,12 @@ class JubeatClan( # range, but it will be a different ID depending on the prefecture set in settings. This means its not safe to send # these song IDs, so we explicitly exclude them. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set( - song.id - for song in data.local.music.get_all_songs(cls.game, cls.version) - if song.id not in cls.FIVE_PLAYS_UNLOCK_EVENT_SONG_IDS + all_songs = list( + set( + song.id + for song in data.local.music.get_all_songs(cls.game, cls.version) + if song.id not in cls.FIVE_PLAYS_UNLOCK_EVENT_SONG_IDS + ) ) if len(all_songs) >= 2: daily_songs = random.sample(all_songs, 2) diff --git a/bemani/backend/jubeat/festo.py b/bemani/backend/jubeat/festo.py index 3850a3b..77085d2 100644 --- a/bemani/backend/jubeat/festo.py +++ b/bemani/backend/jubeat/festo.py @@ -151,7 +151,7 @@ class JubeatFesto( if data.local.network.should_schedule(cls.game, cls.version, "fc_challenge", "daily"): # Generate a new list of two FC challenge songs. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if len(all_songs) >= 2: daily_songs = random.sample(all_songs, 2) data.local.game.put_time_sensitive_settings( diff --git a/bemani/backend/jubeat/prop.py b/bemani/backend/jubeat/prop.py index a35e729..7c321f0 100644 --- a/bemani/backend/jubeat/prop.py +++ b/bemani/backend/jubeat/prop.py @@ -335,7 +335,7 @@ class JubeatProp( if data.local.network.should_schedule(cls.game, cls.version, "league_course", "weekly"): # Generate a new league course list, save it to the DB. start_time, end_time = data.local.network.get_schedule_duration("weekly") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if len(all_songs) >= 3: league_songs = random.sample(all_songs, 3) data.local.game.put_time_sensitive_settings( @@ -382,7 +382,7 @@ class JubeatProp( if data.local.network.should_schedule(cls.game, cls.version, "fc_challenge", "daily"): # Generate a new list of two FC challenge songs. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if len(all_songs) >= 2: daily_songs = random.sample(all_songs, 2) data.local.game.put_time_sensitive_settings( diff --git a/bemani/backend/jubeat/qubell.py b/bemani/backend/jubeat/qubell.py index cf99d91..2b2dd2f 100644 --- a/bemani/backend/jubeat/qubell.py +++ b/bemani/backend/jubeat/qubell.py @@ -64,7 +64,7 @@ class JubeatQubell( if data.local.network.should_schedule(cls.game, cls.version, "fc_challenge", "daily"): # Generate a new list of two FC challenge songs. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if len(all_songs) >= 2: daily_songs = random.sample(all_songs, 2) data.local.game.put_time_sensitive_settings( diff --git a/bemani/backend/jubeat/saucer.py b/bemani/backend/jubeat/saucer.py index 85d99b3..367dabf 100644 --- a/bemani/backend/jubeat/saucer.py +++ b/bemani/backend/jubeat/saucer.py @@ -42,7 +42,7 @@ class JubeatSaucer( if data.local.network.should_schedule(cls.game, cls.version, "fc_challenge", "daily"): # Generate a new list of two FC challenge songs. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if all_songs: today_song = random.sample(all_songs, 1)[0] data.local.game.put_time_sensitive_settings( diff --git a/bemani/backend/jubeat/saucerfulfill.py b/bemani/backend/jubeat/saucerfulfill.py index 2160736..4a839e8 100644 --- a/bemani/backend/jubeat/saucerfulfill.py +++ b/bemani/backend/jubeat/saucerfulfill.py @@ -54,7 +54,7 @@ class JubeatSaucerFulfill( if data.local.network.should_schedule(cls.game, cls.version, "fc_challenge", "daily"): # Generate a new list of two FC challenge songs. start_time, end_time = data.local.network.get_schedule_duration("daily") - all_songs = set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version)) + all_songs = list(set(song.id for song in data.local.music.get_all_songs(cls.game, cls.version))) if len(all_songs) >= 2: daily_songs = random.sample(all_songs, 2) data.local.game.put_time_sensitive_settings(