Mercurial > minori
comparison src/gui/pages/torrents.cc @ 264:9a04802848c0
*: improve multiple things
e.g. making some strings.cc functions modify strings in-place,
improving m4_ax_have_qt.m4 code, making anime_db.cc rely on
std::optional rather than std::shared_ptr (which was stupid
anyway)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Thu, 11 Apr 2024 10:15:57 -0400 |
| parents | dd211ff68b36 |
| children | f31305b9f60a |
comparison
equal
deleted
inserted
replaced
| 263:96416310ea14 | 264:9a04802848c0 |
|---|---|
| 149 | 149 |
| 150 const auto& elements = anitomy.elements(); | 150 const auto& elements = anitomy.elements(); |
| 151 | 151 |
| 152 /* todo: patch Anitomy so that it doesn't use wide strings */ | 152 /* todo: patch Anitomy so that it doesn't use wide strings */ |
| 153 torrent.SetTitle(Strings::ToUtf8String(elements.get(anitomy::kElementAnimeTitle))); | 153 torrent.SetTitle(Strings::ToUtf8String(elements.get(anitomy::kElementAnimeTitle))); |
| 154 torrent.SetEpisode( | 154 std::string episode = Strings::ToUtf8String(elements.get(anitomy::kElementEpisodeNumber)); |
| 155 Strings::RemoveLeadingChars(Strings::ToUtf8String(elements.get(anitomy::kElementEpisodeNumber)), '0')); | 155 Strings::RemoveLeadingChars(episode, '0'); |
| 156 torrent.SetEpisode(episode); | |
| 156 torrent.SetGroup(Strings::ToUtf8String(elements.get(anitomy::kElementReleaseGroup))); | 157 torrent.SetGroup(Strings::ToUtf8String(elements.get(anitomy::kElementReleaseGroup))); |
| 157 torrent.SetResolution(Strings::ToUtf8String(elements.get(anitomy::kElementVideoResolution))); | 158 torrent.SetResolution(Strings::ToUtf8String(elements.get(anitomy::kElementVideoResolution))); |
| 158 } | 159 } |
| 159 | 160 |
| 160 std::string description = item.child_value("description"); | 161 std::string description = item.child_value("description"); |
