summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-10-02 12:54:41 +0200
committerYorhel <git@yorhel.nl>2018-10-02 12:56:38 +0200
commit6bd0b0cd1f3892253d881f71533940f0cf07c13d (patch)
tree852ffd40f3aaa4aea6c04245e71a45ef73a7e372 /data
parent815f9b1496c75026c9e3ea57bac2f5d5348085ba (diff)
DB: Convert resolution into an enum
Been wanting to do this for a long time - using an integer index into an array that changes once in a while is way too fragile. Doubly so when said indices are also used in filters and URLs that can't be updated every time a new resolution is added.
Diffstat (limited to 'data')
-rw-r--r--data/global.pl38
1 files changed, 19 insertions, 19 deletions
diff --git a/data/global.pl b/data/global.pl
index 7624be77..18e128ad 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -197,25 +197,25 @@ our %S;
in => [ 0, 'Internet download', '', 'download' ],
otc => [ 0, 'Other', '', 'cartridge'],
),
- resolutions => [
- [ 'Unknown / console / handheld', '' ], # hardcoded to 0 in many places
- [ 'Non-standard', '' ], # hardcoded to 1 in VNPage.pm
- [ '640x480', '4:3' ],
- [ '800x600', '4:3' ],
- [ '1024x768', '4:3' ],
- [ '1280x960', '4:3' ],
- [ '1600x1200', '4:3' ],
- [ '640x400', 'widescreen' ],
- [ '960x600', 'widescreen' ],
- [ '1024x576', 'widescreen' ],
- [ '1024x600', 'widescreen' ],
- [ '1024x640', 'widescreen' ],
- [ '1280x720', 'widescreen' ],
- [ '1280x800', 'widescreen' ],
- [ '1366x768', 'widescreen' ],
- [ '1600x900', 'widescreen' ],
- [ '1920x1080', 'widescreen' ],
- ],
+ resolutions => ordhash(
+ unknown => [ 'Unknown / console / handheld', '' ], # hardcoded in many places
+ nonstandard => [ 'Non-standard', '' ], # hardcoded in VNPage.pm
+ '640x480' => [ '640x480', '4:3' ],
+ '800x600' => [ '800x600', '4:3' ],
+ '1024x768' => [ '1024x768', '4:3' ],
+ '1280x960' => [ '1280x960', '4:3' ],
+ '1600x1200' => [ '1600x1200', '4:3' ],
+ '640x400' => [ '640x400', 'widescreen' ],
+ '960x600' => [ '960x600', 'widescreen' ],
+ '1024x576' => [ '1024x576', 'widescreen' ],
+ '1024x600' => [ '1024x600', 'widescreen' ],
+ '1024x640' => [ '1024x640', 'widescreen' ],
+ '1280x720' => [ '1280x720', 'widescreen' ],
+ '1280x800' => [ '1280x800', 'widescreen' ],
+ '1366x768' => [ '1366x768', 'widescreen' ],
+ '1600x900' => [ '1600x900', 'widescreen' ],
+ '1920x1080' => [ '1920x1080', 'widescreen' ],
+ ),
tag_categories => ordhash(
cont => 'Content',
ero => 'Sexual content',