diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 17:11:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 17:11:55 -0400 |
commit | 76f8421b92d8b004bc5c9132abdd9dc78b60a6f5 (patch) | |
tree | a9af0c43dd716302789deef7ec9bc7569c236cd0 /src/listing-spec.js | |
parent | ccd2235a31c004d099e2d05fb1751a85f58ee97d (diff) | |
parent | 1b191f364cf2eed746878ebc86e89ad87ef0189a (diff) |
Merge pull request #127 from hsmusic/basic-dynamics
Basic Dynamics (AKA, live reload & data updates)
Diffstat (limited to 'src/listing-spec.js')
-rw-r--r-- | src/listing-spec.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/listing-spec.js b/src/listing-spec.js index 636e5f67..1538757c 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -1,3 +1,5 @@ +import {OFFICIAL_GROUP_DIRECTORY} from './util/magic-constants.js'; + import { empty, accumulateSum, @@ -876,16 +878,20 @@ const listingSpec = [ directory: 'random', stringsKey: 'other.randomPages', - data: ({wikiData: {fandomAlbumData, officialAlbumData}}) => [ + data: ({wikiData: {albumData}}) => [ { - albums: officialAlbumData, name: 'Official', randomCode: 'official', + albums: albumData + .filter((album) => album.groups + .some((group) => group.directory === OFFICIAL_GROUP_DIRECTORY)), }, { - albums: fandomAlbumData, name: 'Fandom', randomCode: 'fandom', + albums: albumData + .filter((album) => album.groups + .every((group) => group.directory !== OFFICIAL_GROUP_DIRECTORY)), }, ], |