Skip scheduled work for games when music DB for that game was not imported.
This commit is contained in:
parent
6d258f1027
commit
c27bac1cf5
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user