fixed bug where season to of anime caused a crash

This commit is contained in:
Zastian Pretorius
2022-08-11 16:52:54 +01:00
parent 570a8dfc4b
commit e79cdb07f5

View File

@@ -164,9 +164,9 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
.unwrap() .unwrap()
.to_string(); .to_string();
let ep_range = anime_ep_range(&app.title); let ep_range = anime_ep_range(&app.title);
app.title = app.title.replace("tv-", ""); let title = app.title.replace("tv-", "");
app.title = app.title.replace("dub", ""); let title = title.replace("dub", "");
app.anime_id = get_anime_id(&app.title); app.anime_id = get_anime_id(&title);
app.messages.items.clear(); app.messages.items.clear();
app.progress = app.progress =
get_user_anime_progress(app.anime_id, app.token.as_str()); get_user_anime_progress(app.anime_id, app.token.as_str());