diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-08-31 11:05:58 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-05 21:02:55 -0300 |
commit | 5e5c2d9e1ee9dbe1c715e4d53bcb244ffcf606b0 (patch) | |
tree | 509d447c940f3ae4037a05db4b035e78410c1112 /src | |
parent | 59023bad2de5cd76edced5393cc38afc6b46fc1c (diff) |
data: misc. style consistency tweaks
Diffstat (limited to 'src')
-rw-r--r-- | src/data/things/album.js | 15 | ||||
-rw-r--r-- | src/data/things/artist.js | 6 | ||||
-rw-r--r-- | src/data/things/flash.js | 6 | ||||
-rw-r--r-- | src/data/things/track.js | 19 | ||||
-rw-r--r-- | src/data/things/wiki-info.js | 6 |
5 files changed, 11 insertions, 41 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index c012c243..06982903 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -128,6 +128,9 @@ export class Album extends Thing { commentatorArtists: Thing.common.commentatorArtists(), + groups: Thing.common.dynamicThingsFromReferenceList('groupsByRef', 'groupData', find.group), + artTags: Thing.common.dynamicThingsFromReferenceList('artTagsByRef', 'artTagData', find.artTag), + hasCoverArt: Thing.common.contribsPresent('coverArtistContribsByRef'), hasWallpaperArt: Thing.common.contribsPresent('wallpaperArtistContribsByRef'), hasBannerArt: Thing.common.contribsPresent('bannerArtistContribsByRef'), @@ -146,18 +149,6 @@ export class Album extends Thing { : [], }, }, - - groups: Thing.common.dynamicThingsFromReferenceList( - 'groupsByRef', - 'groupData', - find.group - ), - - artTags: Thing.common.dynamicThingsFromReferenceList( - 'artTagsByRef', - 'artTagData', - find.artTag - ), }); static [Thing.getSerializeDescriptors] = ({ diff --git a/src/data/things/artist.js b/src/data/things/artist.js index bde84cfa..b2383057 100644 --- a/src/data/things/artist.js +++ b/src/data/things/artist.js @@ -111,10 +111,8 @@ export class Artist extends Thing { }, }, - flashesAsContributor: Artist.filterByContrib( - 'flashData', - 'contributorContribs' - ), + flashesAsContributor: + Artist.filterByContrib('flashData', 'contributorContribs'), }); static [Thing.getSerializeDescriptors] = ({ diff --git a/src/data/things/flash.js b/src/data/things/flash.js index 445fd07c..3f870c51 100644 --- a/src/data/things/flash.js +++ b/src/data/things/flash.js @@ -141,10 +141,6 @@ export class FlashAct extends Thing { // Expose only - flashes: Thing.common.dynamicThingsFromReferenceList( - 'flashesByRef', - 'flashData', - find.flash - ), + flashes: Thing.common.dynamicThingsFromReferenceList('flashesByRef', 'flashData', find.flash), }) } diff --git a/src/data/things/track.js b/src/data/things/track.js index 3a4e1585..74713a00 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -167,11 +167,7 @@ export class Track extends Thing { // not generally relevant information). It's also not guaranteed that // dataSourceAlbum is available (depending on the Track creator to optionally // provide dataSourceAlbumByRef). - dataSourceAlbum: Thing.common.dynamicThingFromSingleReference( - 'dataSourceAlbumByRef', - 'albumData', - find.album - ), + dataSourceAlbum: Thing.common.dynamicThingFromSingleReference('dataSourceAlbumByRef', 'albumData', find.album), date: Thing.composite.from(`Track.date`, [ Thing.composite.exposeDependencyOrContinue('dateFirstReleased'), @@ -303,6 +299,8 @@ export class Track extends Thing { Thing.common.dynamicThingsFromReferenceList('sampledTracksByRef', 'trackData', find.track), ]), + artTags: Thing.common.dynamicThingsFromReferenceList('artTagsByRef', 'artTagData', find.artTag), + // Specifically exclude re-releases from this list - while it's useful to // get from a re-release to the tracks it references, re-releases aren't // generally relevant from the perspective of the tracks being referenced. @@ -342,16 +340,7 @@ export class Track extends Thing { }, }, - featuredInFlashes: Thing.common.reverseReferenceList( - 'flashData', - 'featuredTracks' - ), - - artTags: Thing.common.dynamicThingsFromReferenceList( - 'artTagsByRef', - 'artTagData', - find.artTag - ), + featuredInFlashes: Thing.common.reverseReferenceList('flashData', 'featuredTracks'), }); static composite = { diff --git a/src/data/things/wiki-info.js b/src/data/things/wiki-info.js index e906cab1..e8279987 100644 --- a/src/data/things/wiki-info.js +++ b/src/data/things/wiki-info.js @@ -59,10 +59,6 @@ export class WikiInfo extends Thing { // Expose only - divideTrackListsByGroups: Thing.common.dynamicThingsFromReferenceList( - 'divideTrackListsByGroupsByRef', - 'groupData', - find.group - ), + divideTrackListsByGroups: Thing.common.dynamicThingsFromReferenceList('divideTrackListsByGroupsByRef', 'groupData', find.group), }); } |