1
0
mirror of synced 2024-11-12 01:00:46 +01:00

Skip scheduled work for games when music DB for that game was not imported.

This commit is contained in:
Jennifer Taylor 2021-09-06 19:06:34 +00:00
parent 6d258f1027
commit c27bac1cf5
13 changed files with 316 additions and 302 deletions

View File

@ -99,6 +99,7 @@ class IIDXCannonBallers(IIDXCourse, IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -99,6 +99,7 @@ class IIDXCopula(IIDXCourse, IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -96,6 +96,7 @@ class IIDXPendual(IIDXCourse, IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -99,6 +99,7 @@ class IIDXRootage(IIDXCourse, IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -99,6 +99,7 @@ class IIDXSinobuz(IIDXCourse, IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -95,6 +95,7 @@ class IIDXSpada(IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -94,6 +94,7 @@ class IIDXTricoro(IIDXBase):
# Generate a new list of three dailies.
start_time, end_time = data.local.network.get_schedule_duration('daily')
all_songs = list(set([song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]))
if len(all_songs) >= 3:
daily_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -97,6 +97,7 @@ class JubeatClan(
# 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)
if len(all_songs) >= 2:
daily_songs = random.sample(all_songs, 2)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -319,6 +319,7 @@ class JubeatProp(
# 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))
if len(all_songs) >= 3:
league_songs = random.sample(all_songs, 3)
data.local.game.put_time_sensitive_settings(
cls.game,
@ -363,6 +364,7 @@ class JubeatProp(
# 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))
if len(all_songs) >= 2:
daily_songs = random.sample(all_songs, 2)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -66,6 +66,7 @@ class JubeatQubell(
# 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))
if len(all_songs) >= 2:
daily_songs = random.sample(all_songs, 2)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -45,6 +45,7 @@ class JubeatSaucer(
# 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))
if all_songs:
today_song = random.sample(all_songs, 1)[0]
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -56,6 +56,7 @@ class JubeatSaucerFulfill(
# 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))
if len(all_songs) >= 2:
daily_songs = random.sample(all_songs, 2)
data.local.game.put_time_sensitive_settings(
cls.game,

View File

@ -71,6 +71,7 @@ class PopnMusicUsaNeko(PopnMusicBase):
# Generate a new course list, save it to the DB.
start_time, end_time = data.local.network.get_schedule_duration('weekly')
all_songs = [song.id for song in data.local.music.get_all_songs(cls.game, cls.version)]
if all_songs:
course_song = random.choice(all_songs)
data.local.game.put_time_sensitive_settings(
cls.game,