diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2025-01-28 17:48:46 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2025-01-28 17:48:46 -0400 |
commit | daa8fcfe3c9b7de2faa5bb61f6d0487c7b91ff5b (patch) | |
tree | 01a8bd4ec57a28ff9bc3cc53bb25748f3741d36f | |
parent | 270a6d0dc04198f9135be4955fd124720ab536bb (diff) |
replacer: {album,track}-referencing-tracks:<directory>
-rw-r--r-- | src/data/things/album.js | 14 | ||||
-rw-r--r-- | src/data/things/track.js | 8 | ||||
-rw-r--r-- | src/replacer.js | 20 |
3 files changed, 39 insertions, 3 deletions
diff --git a/src/data/things/album.js b/src/data/things/album.js index 5f1788f8..6bf683c5 100644 --- a/src/data/things/album.js +++ b/src/data/things/album.js @@ -348,7 +348,12 @@ export class Album extends Thing { static [Thing.findSpecs] = { album: { - referenceTypes: ['album', 'album-commentary', 'album-gallery'], + referenceTypes: [ + 'album', + 'album-commentary', + 'album-gallery', + ], + bindTo: 'albumData', getMatchableNames: album => @@ -358,7 +363,12 @@ export class Album extends Thing { }, albumWithArtwork: { - referenceTypes: ['album'], + referenceTypes: [ + 'album', + 'album-referencing-artworks', + 'album-referenced-artworks', + ], + bindTo: 'albumData', include: album => diff --git a/src/data/things/track.js b/src/data/things/track.js index ff4750db..af2206f0 100644 --- a/src/data/things/track.js +++ b/src/data/things/track.js @@ -600,6 +600,7 @@ export class Track extends Thing { static [Thing.findSpecs] = { track: { referenceTypes: ['track'], + bindTo: 'trackData', getMatchableNames: track => @@ -626,7 +627,12 @@ export class Track extends Thing { }, trackWithArtwork: { - referenceTypes: ['track'], + referenceTypes: [ + 'track', + 'track-referencing-artworks', + 'track-referenced-artworks', + ], + bindTo: 'trackData', include: track => diff --git a/src/replacer.js b/src/replacer.js index e3f5623e..68361488 100644 --- a/src/replacer.js +++ b/src/replacer.js @@ -26,6 +26,16 @@ export const replacerSpec = { link: 'linkAlbumGallery', }, + 'album-referenced-artworks': { + find: 'albumWithArtwork', + link: 'linkAlbumReferencedArtworks', + }, + + 'album-referencing-artworks': { + find: 'albumWithArtwork', + link: 'linkAlbumReferencingArtworks', + }, + 'artist': { find: 'artist', link: 'linkArtist', @@ -144,6 +154,16 @@ export const replacerSpec = { find: 'track', link: 'linkTrackDynamically', }, + + 'track-referenced-artworks': { + find: 'trackWithArtwork', + link: 'linkTrackReferencedArtworks', + }, + + 'track-referencing-artworks': { + find: 'trackWithArtwork', + link: 'linkTrackReferencingArtworks', + }, }; // Syntax literals. |