fix(interface): incorrect loading of episode during replat

This commit is contained in:
Benex254
2024-08-16 13:50:58 +03:00
parent 0087728aa8
commit e17ea4bb89
2 changed files with 10 additions and 3 deletions

View File

@@ -98,8 +98,14 @@ def media_player_controls(
current_episode_number,
)
start_time = config.watch_history[str(anime_id_anilist)]["start_time"]
print("[green]Continuing from:[/] ", start_time)
if (
config.watch_history[str(anime_id_anilist)]["episode"]
== current_episode_number
):
start_time = config.watch_history[str(anime_id_anilist)]["start_time"]
print("[green]Continuing from:[/] ", start_time)
else:
start_time = "0"
custom_args = []
if config.skip:
if args := aniskip(
@@ -1142,7 +1148,7 @@ def media_actions_menu(
f"{'💠 ' if icons else ''}Toggle auto next episode": _toggle_auto_next,
f"{'🔘 ' if icons else ''}Toggle continue from history": _toggle_continue_from_history,
f"{'🔙 ' if icons else ''}Back": anilist_results_menu,
f"{'' if icons else ''}Exit": exit_app,
f"{'' if icons else ''}Exit": lambda *_: exit_app(),
}
choices = list(options.keys())
if config.use_fzf:

View File

@@ -141,6 +141,7 @@ class MpvPlayer(object):
return
self.mpv_player._set_property("start", "0")
stream_link = stream_link_["link"]
fastanime_runtime_state.provider_current_episode_stream_link = stream_link
return stream_link
def create_player(