Handle articles without categories
This commit is contained in:
parent
baf3084f90
commit
378878c49e
4 changed files with 8 additions and 27 deletions
|
@ -440528,19 +440528,6 @@ Paper Beast - Folded Edition:
|
|||
- config
|
||||
steam:
|
||||
id: 1403830
|
||||
Paper Cut Mansion:
|
||||
gog:
|
||||
id: 1702566435
|
||||
installDir:
|
||||
PaperCutMansion: {}
|
||||
launch:
|
||||
"<base>/PaperCutMansion.exe":
|
||||
- when:
|
||||
- bit: 64
|
||||
os: windows
|
||||
store: steam
|
||||
steam:
|
||||
id: 1004370
|
||||
Paper Dungeons:
|
||||
installDir:
|
||||
Paper Dungeons: {}
|
||||
|
|
|
@ -18314,7 +18314,6 @@
|
|||
* [Paparazzi](https://www.pcgamingwiki.com/wiki/?curid=48677)
|
||||
* [Paparazzi Simulator](https://www.pcgamingwiki.com/wiki/?curid=154404)
|
||||
* [Paparazzi!: Tales of Tinseltown](https://www.pcgamingwiki.com/wiki/?curid=177406)
|
||||
* [Paper Cut Mansion](https://www.pcgamingwiki.com/wiki/?curid=182965)
|
||||
* [Paper Dungeons](https://www.pcgamingwiki.com/wiki/?curid=48170)
|
||||
* [Paper Dungeons Crawler](https://www.pcgamingwiki.com/wiki/?curid=91188)
|
||||
* [Paper Fire Rookie](https://www.pcgamingwiki.com/wiki/?curid=73302)
|
||||
|
|
|
@ -127104,10 +127104,6 @@ Paper Beast - Folded Edition:
|
|||
templates:
|
||||
- "{{Game data/config|Windows|{{p|hkcu}}\\SOFTWARE\\Pixel Reef\\Paper Beast\\}}"
|
||||
- "{{Game data/saves|Windows|{{p|userprofile}}\\AppData\\LocalLow\\Pixel Reef\\Paper Beast\\PaperBeast.save}}"
|
||||
Paper Cut Mansion:
|
||||
gog: 1702566435
|
||||
pageId: 182965
|
||||
steam: 1004370
|
||||
Paper Dungeons:
|
||||
pageId: 48170
|
||||
steam: 283040
|
||||
|
|
|
@ -76,10 +76,8 @@ async fn is_game_article(query: &str) -> Result<bool, Error> {
|
|||
{
|
||||
let title = page["title"].as_str().ok_or(Error::WikiData("query.pages[].title"))?;
|
||||
if title == query {
|
||||
for category in page["categories"]
|
||||
.as_array()
|
||||
.ok_or(Error::WikiData("query.pages[].categories"))?
|
||||
{
|
||||
if let Some(categories) = page["categories"].as_array() {
|
||||
for category in categories {
|
||||
let category_name = category["title"]
|
||||
.as_str()
|
||||
.ok_or(Error::WikiData("query.pages[].categories[].title"))?;
|
||||
|
@ -89,6 +87,7 @@ async fn is_game_article(query: &str) -> Result<bool, Error> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(false)
|
||||
}
|
||||
|
|
Reference in a new issue