Fix article rename logic

This commit is contained in:
mtkennerly 2023-12-22 21:38:35 +08:00
parent 24bfb3e006
commit c1f9367c56
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
4 changed files with 69 additions and 19 deletions

View file

@ -1240,6 +1240,27 @@ $1 Ride:
- store: steam
steam:
id: 1126840
12 Is Better than 6:
files:
"<winAppData>/_12ibt6/savedata.ini":
tags:
- save
when:
- os: windows
"<winAppData>/_12ibt6/settings.ini":
tags:
- config
when:
- os: windows
id:
steamExtra:
- 411110
- 450820
- 450830
installDir:
12 is Better Than 6: {}
steam:
id: 410110
12 Labours of Hercules:
files:
"<home>/.Saves/ZOG/Hercules":
@ -178929,6 +178950,26 @@ Enigma:
- save
when:
- os: windows
Enigma (2015):
files:
"<base>/ENIGMA.cf":
tags:
- config
when:
- os: windows
"<base>/savedata":
tags:
- save
when:
- os: windows
installDir:
ENIGMA: {}
launch:
"<base>/ENIGMA.exe":
- when:
- store: steam
steam:
id: 494100
Enigma Prison:
steam:
id: 500740

View file

@ -99055,22 +99055,22 @@
- config:
oslist: windows
description: 12 is Better Than 6 (High Resolution)
executable: "12ibt6Hi\\\\12ibt6.exe"
executable: "12ibt6Hi\\12ibt6.exe"
type: option1
- config:
oslist: linux
description: 12 is Better Than 6 (High Resolution)
executable: "12ibt6Hi\\\\runner"
executable: "12ibt6Hi\\runner"
type: option1
- config:
oslist: windows
description: 12 is Better Than 6 (Low Resolution)
executable: "12ibt6Low\\\\12ibt6.exe"
executable: "12ibt6Low\\12ibt6.exe"
type: option2
- config:
oslist: linux
description: 12 is Better Than 6 (Low Resolution)
executable: "12ibt6Low\\\\runner"
executable: "12ibt6Low\\runner"
type: option2
- config:
oslist: macos

View file

@ -362,6 +362,18 @@ $1 Ride:
12 HOURS 2:
pageId: 143957
steam: 1126840
12 Is Better than 6:
pageId: 38569
renamedFrom:
- 12 is Better Than 6
steam: 410110
steamSide:
- 411110
- 450820
- 450830
templates:
- "{{Game data/config|Windows|{{p|appdata}}\\_12ibt6\\settings.ini}}"
- "{{Game data/saves|Windows|{{p|appdata}}\\_12ibt6\\savedata.ini}}"
12 Labours of Hercules:
pageId: 31758
steam: 342580
@ -419,16 +431,6 @@ $1 Ride:
- "{{Game data/saves|Windows|{{p|hkcu}}\\Software\\Roman Uhlig\\12 orbits}}"
- "{{Game data/saves|OS X|{{p|osxhome}}/.config/unity3d/Roman Uhlig/12 orbits}}"
- "{{Game data/saves|Linux|{{p|linuxhome}}/Library/Preferences/unity.Roman Uhlig.12 orbits.plist}}"
12 is Better Than 6:
pageId: 38569
steam: 410110
steamSide:
- 411110
- 450820
- 450830
templates:
- "{{Game data/config|Windows|{{p|appdata}}\\_12ibt6\\settings.ini}}"
- "{{Game data/saves|Windows|{{p|appdata}}\\_12ibt6\\savedata.ini}}"
123 Slaughter Me Street:
pageId: 34869
steam: 405180
@ -53176,6 +53178,12 @@ Enigma:
templates:
- "{{Game data/config|Windows|{{p|appdata}}\\Roaming\\Enigma\\}}"
- "{{Game data/saves|Windows|{{p|appdata}}\\Roaming\\Enigma\\}}"
Enigma (2015):
pageId: 39785
steam: 494100
templates:
- "{{Game data/config|Windows|{{Path|Game}}\\ENIGMA.cf}}"
- "{{Game data/saves|Windows|{{Path|Game}}\\savedata\\}}"
Enigma Prison:
pageId: 39654
steam: 500740

View file

@ -182,11 +182,12 @@ impl WikiCache {
}
}
Some(old_name) => {
self.0.entry(title.to_string()).and_modify(|x| {
x.page_id = page_id;
x.state = State::Outdated;
x.renamed_from.push(old_name);
});
if let Some(mut info) = self.0.remove(&old_name) {
info.page_id = page_id;
info.state = State::Outdated;
info.renamed_from.push(old_name);
self.0.insert(title, info);
}
}
}
}