|
|
@ -1338,7 +1338,7 @@ class MetadataFile(DataFile):
|
|
|
|
logger.error(f"Metadata Error: Season: {season_id} not found")
|
|
|
|
logger.error(f"Metadata Error: Season: {season_id} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
season_methods = {sm.lower(): sm for sm in season_dict}
|
|
|
|
season_methods = {sm.lower(): sm for sm in season_dict}
|
|
|
|
season.batchEdits()
|
|
|
|
#season.batchEdits()
|
|
|
|
add_edit("title", season, season_dict, season_methods)
|
|
|
|
add_edit("title", season, season_dict, season_methods)
|
|
|
|
add_edit("summary", season, season_dict, season_methods)
|
|
|
|
add_edit("summary", season, season_dict, season_methods)
|
|
|
|
add_edit("user_rating", season, season_dict, season_methods, key="userRating", var_type="float")
|
|
|
|
add_edit("user_rating", season, season_dict, season_methods, key="userRating", var_type="float")
|
|
|
@ -1372,7 +1372,7 @@ class MetadataFile(DataFile):
|
|
|
|
logger.error(f"Metadata Error: Episode {episode_str} in Season {season_id} not found")
|
|
|
|
logger.error(f"Metadata Error: Episode {episode_str} in Season {season_id} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
episode_methods = {em.lower(): em for em in episode_dict}
|
|
|
|
episode_methods = {em.lower(): em for em in episode_dict}
|
|
|
|
episode.batchEdits()
|
|
|
|
#episode.batchEdits()
|
|
|
|
add_edit("title", episode, episode_dict, episode_methods)
|
|
|
|
add_edit("title", episode, episode_dict, episode_methods)
|
|
|
|
add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort")
|
|
|
|
add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort")
|
|
|
|
add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating")
|
|
|
|
add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating")
|
|
|
@ -1415,7 +1415,7 @@ class MetadataFile(DataFile):
|
|
|
|
logger.error(f"Metadata Error: episode {episode_id} of season {season_id} not found")
|
|
|
|
logger.error(f"Metadata Error: episode {episode_id} of season {season_id} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
episode_methods = {em.lower(): em for em in episode_dict}
|
|
|
|
episode_methods = {em.lower(): em for em in episode_dict}
|
|
|
|
episode.batchEdits()
|
|
|
|
#episode.batchEdits()
|
|
|
|
add_edit("title", episode, episode_dict, episode_methods)
|
|
|
|
add_edit("title", episode, episode_dict, episode_methods)
|
|
|
|
add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort")
|
|
|
|
add_edit("sort_title", episode, episode_dict, episode_methods, key="titleSort")
|
|
|
|
add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating")
|
|
|
|
add_edit("content_rating", episode, episode_dict, episode_methods, key="contentRating")
|
|
|
@ -1456,7 +1456,7 @@ class MetadataFile(DataFile):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logger.error(f"Metadata Error: Album: {album_name} not found")
|
|
|
|
logger.error(f"Metadata Error: Album: {album_name} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
album.batchEdits()
|
|
|
|
#album.batchEdits()
|
|
|
|
add_edit("title", album, album_dict, album_methods, value=title)
|
|
|
|
add_edit("title", album, album_dict, album_methods, value=title)
|
|
|
|
add_edit("sort_title", album, album_dict, album_methods, key="titleSort")
|
|
|
|
add_edit("sort_title", album, album_dict, album_methods, key="titleSort")
|
|
|
|
add_edit("critic_rating", album, album_dict, album_methods, key="rating", var_type="float")
|
|
|
|
add_edit("critic_rating", album, album_dict, album_methods, key="rating", var_type="float")
|
|
|
@ -1501,7 +1501,7 @@ class MetadataFile(DataFile):
|
|
|
|
logger.error(f"Metadata Error: Track: {track_num} not found")
|
|
|
|
logger.error(f"Metadata Error: Track: {track_num} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
track.batchEdits()
|
|
|
|
#track.batchEdits()
|
|
|
|
add_edit("title", track, track_dict, track_methods, value=title)
|
|
|
|
add_edit("title", track, track_dict, track_methods, value=title)
|
|
|
|
add_edit("user_rating", track, track_dict, track_methods, key="userRating", var_type="float")
|
|
|
|
add_edit("user_rating", track, track_dict, track_methods, key="userRating", var_type="float")
|
|
|
|
add_edit("track", track, track_dict, track_methods, key="index", var_type="int")
|
|
|
|
add_edit("track", track, track_dict, track_methods, key="index", var_type="int")
|
|
|
@ -1561,7 +1561,7 @@ class MetadataFile(DataFile):
|
|
|
|
race = race_lookup[season.seasonNumber]
|
|
|
|
race = race_lookup[season.seasonNumber]
|
|
|
|
title = race.format_name(round_prefix, shorten_gp)
|
|
|
|
title = race.format_name(round_prefix, shorten_gp)
|
|
|
|
updated = False
|
|
|
|
updated = False
|
|
|
|
season.batchEdits()
|
|
|
|
#season.batchEdits()
|
|
|
|
add_edit("title", season, value=title)
|
|
|
|
add_edit("title", season, value=title)
|
|
|
|
finish_edit(season, f"Season: {title}")
|
|
|
|
finish_edit(season, f"Season: {title}")
|
|
|
|
_, _, ups = self.library.item_images(season, {}, {}, asset_location=asset_location, title=title,
|
|
|
|
_, _, ups = self.library.item_images(season, {}, {}, asset_location=asset_location, title=title,
|
|
|
@ -1572,7 +1572,7 @@ class MetadataFile(DataFile):
|
|
|
|
for episode in season.episodes():
|
|
|
|
for episode in season.episodes():
|
|
|
|
if len(episode.locations) > 0:
|
|
|
|
if len(episode.locations) > 0:
|
|
|
|
ep_title, session_date = race.session_info(episode.locations[0], sprint_weekend)
|
|
|
|
ep_title, session_date = race.session_info(episode.locations[0], sprint_weekend)
|
|
|
|
episode.batchEdits()
|
|
|
|
#episode.batchEdits()
|
|
|
|
add_edit("title", episode, value=ep_title)
|
|
|
|
add_edit("title", episode, value=ep_title)
|
|
|
|
add_edit("originally_available", episode, key="originallyAvailableAt", var_type="date", value=session_date)
|
|
|
|
add_edit("originally_available", episode, key="originallyAvailableAt", var_type="date", value=session_date)
|
|
|
|
finish_edit(episode, f"Season: {season.seasonNumber} Episode: {episode.episodeNumber}")
|
|
|
|
finish_edit(episode, f"Season: {season.seasonNumber} Episode: {episode.episodeNumber}")
|
|
|
|