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
|
- config
|
||||||
steam:
|
steam:
|
||||||
id: 1403830
|
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:
|
Paper Dungeons:
|
||||||
installDir:
|
installDir:
|
||||||
Paper Dungeons: {}
|
Paper Dungeons: {}
|
||||||
|
|
|
@ -18314,7 +18314,6 @@
|
||||||
* [Paparazzi](https://www.pcgamingwiki.com/wiki/?curid=48677)
|
* [Paparazzi](https://www.pcgamingwiki.com/wiki/?curid=48677)
|
||||||
* [Paparazzi Simulator](https://www.pcgamingwiki.com/wiki/?curid=154404)
|
* [Paparazzi Simulator](https://www.pcgamingwiki.com/wiki/?curid=154404)
|
||||||
* [Paparazzi!: Tales of Tinseltown](https://www.pcgamingwiki.com/wiki/?curid=177406)
|
* [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](https://www.pcgamingwiki.com/wiki/?curid=48170)
|
||||||
* [Paper Dungeons Crawler](https://www.pcgamingwiki.com/wiki/?curid=91188)
|
* [Paper Dungeons Crawler](https://www.pcgamingwiki.com/wiki/?curid=91188)
|
||||||
* [Paper Fire Rookie](https://www.pcgamingwiki.com/wiki/?curid=73302)
|
* [Paper Fire Rookie](https://www.pcgamingwiki.com/wiki/?curid=73302)
|
||||||
|
|
|
@ -127104,10 +127104,6 @@ Paper Beast - Folded Edition:
|
||||||
templates:
|
templates:
|
||||||
- "{{Game data/config|Windows|{{p|hkcu}}\\SOFTWARE\\Pixel Reef\\Paper Beast\\}}"
|
- "{{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}}"
|
- "{{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:
|
Paper Dungeons:
|
||||||
pageId: 48170
|
pageId: 48170
|
||||||
steam: 283040
|
steam: 283040
|
||||||
|
|
17
src/wiki.rs
17
src/wiki.rs
|
@ -76,15 +76,14 @@ async fn is_game_article(query: &str) -> Result<bool, Error> {
|
||||||
{
|
{
|
||||||
let title = page["title"].as_str().ok_or(Error::WikiData("query.pages[].title"))?;
|
let title = page["title"].as_str().ok_or(Error::WikiData("query.pages[].title"))?;
|
||||||
if title == query {
|
if title == query {
|
||||||
for category in page["categories"]
|
if let Some(categories) = page["categories"].as_array() {
|
||||||
.as_array()
|
for category in categories {
|
||||||
.ok_or(Error::WikiData("query.pages[].categories"))?
|
let category_name = category["title"]
|
||||||
{
|
.as_str()
|
||||||
let category_name = category["title"]
|
.ok_or(Error::WikiData("query.pages[].categories[].title"))?;
|
||||||
.as_str()
|
if category_name == "Category:Games" {
|
||||||
.ok_or(Error::WikiData("query.pages[].categories[].title"))?;
|
return Ok(true);
|
||||||
if category_name == "Category:Games" {
|
}
|
||||||
return Ok(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue