[13] fix flixpatrol time_range

pull/1265/head
meisnate12 2 years ago
parent 00e227b316
commit 02e6e419b4

@ -1 +1 @@
1.18.2-develop12 1.18.2-develop13

@ -185,8 +185,11 @@ class Operations:
if any([o.startswith("mal") for o in self.library.meta_operations]): if any([o.startswith("mal") for o in self.library.meta_operations]):
if item.ratingKey in reverse_mal: if item.ratingKey in reverse_mal:
mal_id = reverse_mal[item.ratingKey] mal_id = reverse_mal[item.ratingKey]
elif not anidb_id or anidb_id not in self.config.Convert._anidb_to_mal: elif not anidb_id:
logger.warning(f"No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}") logger.warning(f"Covert Warning: No AniDB ID to Convert to MyAnimeList ID for Guid: {item.guid}")
mal_id = None
elif anidb_id not in self.config.Convert._anidb_to_mal:
logger.warning(f"Covert Warning: No MyAnimeList Found for AniDB ID: {anidb_id} of Guid: {item.guid}")
mal_id = None mal_id = None
else: else:
mal_id = self.config.Convert._anidb_to_mal[anidb_id] mal_id = self.config.Convert._anidb_to_mal[anidb_id]

@ -404,8 +404,10 @@ def time_window(tw):
return f"{today - timedelta(weeks=1):%Y-0%V}" return f"{today - timedelta(weeks=1):%Y-0%V}"
elif tw == "this_month": elif tw == "this_month":
return f"{today:%Y-%m}" return f"{today:%Y-%m}"
elif tw == "last_month" and today.month == 1:
return f"{today.year - 1}-12"
elif tw == "last_month": elif tw == "last_month":
return f"{today.year}-{today.month - 1 or 12}" return f"{today.year}-{today.month - 1:02}"
elif tw == "this_year": elif tw == "this_year":
return f"{today.year}" return f"{today.year}"
elif tw == "last_year": elif tw == "last_year":

Loading…
Cancel
Save