comparison src/gui/pages/now_playing.cc @ 92:2c27582a177c

pages/now_playing: fix invalid catch
author Paper <mrpapersonic@gmail.com>
date Wed, 01 Nov 2023 00:00:56 -0400
parents d02fdf1d6708
children 18979b066284
comparison
equal deleted inserted replaced
91:29e2840d9b7b 92:2c27582a177c
92 if (_id == anime.GetId() && std::to_string(_episode) == info.at("episode")) 92 if (_id == anime.GetId() && std::to_string(_episode) == info.at("episode"))
93 return; 93 return;
94 _id = anime.GetId(); 94 _id = anime.GetId();
95 try { 95 try {
96 _episode = std::stoi(info.at("episode")); 96 _episode = std::stoi(info.at("episode"));
97 } catch (std::invalid_argument) { 97 } catch (std::invalid_argument const&) {
98 _episode = 0; 98 _episode = 0;
99 } 99 }
100 _title->SetText(Strings::ToQString(anime.GetUserPreferredTitle())); 100 _title->SetText(Strings::ToQString(anime.GetUserPreferredTitle()));
101 _info->SetAnime(anime); 101 _info->SetAnime(anime);
102 _poster->SetAnime(anime); 102 _poster->SetAnime(anime);