musora-content-services 1.0.184 → 1.0.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +15 -1
- package/src/services/sanity.js +3 -1
- package/test/sanityQueryService.test.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.186](https://github.com/railroadmedia/musora-content-services/compare/v1.0.185...v1.0.186) (2024-11-28)
|
|
6
|
+
|
|
7
|
+
### [1.0.185](https://github.com/railroadmedia/musora-content-services/compare/v1.0.176...v1.0.185) (2024-11-27)
|
|
8
|
+
|
|
5
9
|
### [1.0.184](https://github.com/railroadmedia/musora-content-services/compare/v1.0.183...v1.0.184) (2024-11-25)
|
|
6
10
|
|
|
7
11
|
### [1.0.183](https://github.com/railroadmedia/musora-content-services/compare/v1.0.182...v1.0.183) (2024-11-25)
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
@@ -290,6 +290,7 @@ const contentMetadata = {
|
|
|
290
290
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/gear.jpg',
|
|
291
291
|
name: 'Gear Guides',
|
|
292
292
|
icon: 'icon-shows',
|
|
293
|
+
url: '/gear-guides',
|
|
293
294
|
description: "Drummers love their gear - and in here you will find videos on gear demos, reviews, maintenance, tuning tips and much more.",
|
|
294
295
|
allowableFilters: ['difficulty', 'genre'],
|
|
295
296
|
sortBy: '-published_on',
|
|
@@ -344,6 +345,7 @@ const contentMetadata = {
|
|
|
344
345
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/bootcamps.jpg',
|
|
345
346
|
name: 'Boot Camps',
|
|
346
347
|
icon: 'icon-shows',
|
|
348
|
+
url: '/boot-camps',
|
|
347
349
|
description: "Grab your sticks and practice along while watching a lesson! These boot camps are designed like workout videos so you can follow along and push your drumming at the same time.",
|
|
348
350
|
allowableFilters: ['difficulty', 'genre', 'essential'],
|
|
349
351
|
sortBy: '-published_on',
|
|
@@ -378,6 +380,7 @@ const contentMetadata = {
|
|
|
378
380
|
description: "Enjoy our official Drumeo Podcasts in video form! Whether it be discussions about drum topics or interviews with the greats you are looking for, these are an entertaining and educational way to pass the time.",
|
|
379
381
|
allowableFilters: [],
|
|
380
382
|
sortBy: '-sort',
|
|
383
|
+
url: '/podcasts',
|
|
381
384
|
},
|
|
382
385
|
'on-the-road': {
|
|
383
386
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/on-the-road.jpg',
|
|
@@ -409,6 +412,7 @@ const contentMetadata = {
|
|
|
409
412
|
'live': {
|
|
410
413
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/show-live.jpg',
|
|
411
414
|
name: 'Live',
|
|
415
|
+
url: '/live-streams',
|
|
412
416
|
shortname: 'Live Lessons',
|
|
413
417
|
icon: 'icon-shows',
|
|
414
418
|
description: "Practice sessions, Q&A, celebrations, and more are available during Drumeo live lessons. Subscribe to an event or the whole calendar, so you don’t miss out!",
|
|
@@ -438,6 +442,7 @@ const contentMetadata = {
|
|
|
438
442
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/solos.jpg',
|
|
439
443
|
name: 'Solos',
|
|
440
444
|
icon: 'icon-shows',
|
|
445
|
+
url: '/solos',
|
|
441
446
|
description: "Watch drum solos performed by the many different artists we have had out on Drumeo! A great way to be entertained, motivated, and to learn through amazing performances.",
|
|
442
447
|
allowableFilters: ['difficulty', 'genre'],
|
|
443
448
|
sortBy: '-published_on',
|
|
@@ -465,6 +470,7 @@ const contentMetadata = {
|
|
|
465
470
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/performances.jpg',
|
|
466
471
|
name: 'Performances',
|
|
467
472
|
icon: 'icon-shows',
|
|
473
|
+
url: '/performances',
|
|
468
474
|
description: "Watch the world's best drummers perform songs, duets, and other inspirational pieces. Sit back, relax, and get ready to be inspired by these amazing performances!",
|
|
469
475
|
allowableFilters: ['difficulty', 'genre'],
|
|
470
476
|
sortBy: '-published_on',
|
|
@@ -504,6 +510,7 @@ const contentMetadata = {
|
|
|
504
510
|
description: "Take a closer look at Sonor Drums with Jared as he explores the Sonor Factory in Bad Berleburg Germany and interviews the people behind the amazing brand.",
|
|
505
511
|
allowableFilters: [],
|
|
506
512
|
sortBy: 'published_on',
|
|
513
|
+
url: '/sonor-drums',
|
|
507
514
|
},
|
|
508
515
|
'paiste-cymbals': {
|
|
509
516
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/paiste-cymbals.jpg',
|
|
@@ -531,6 +538,7 @@ const contentMetadata = {
|
|
|
531
538
|
description: "Take a closer look at Tama Drums with Jared as he explores the Tama factory in Japan, learns about Japanese Culture, experiments with traditional Taiko drummers, and interviews the people behind the amazing brand.",
|
|
532
539
|
allowableFilters: [],
|
|
533
540
|
sortBy: 'published_on',
|
|
541
|
+
url: '/tama-drums',
|
|
534
542
|
},
|
|
535
543
|
'question-and-answer': {
|
|
536
544
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/question-answer.jpg',
|
|
@@ -546,6 +554,7 @@ const contentMetadata = {
|
|
|
546
554
|
description: "Collaborate with the community with Drumeo Monthly Collaborations! Each month a new Play-Along is chosen and members are tasked to submit their videos playing along to the song. At the end of each month, every video is joined together to create a single performance!",
|
|
547
555
|
allowableFilters: [],
|
|
548
556
|
sortBy: '-published_on',
|
|
557
|
+
url: '/student-collaborations',
|
|
549
558
|
trailer1: {
|
|
550
559
|
vimeo_video_id: 448684113,
|
|
551
560
|
video_playback_endpoints: [
|
|
@@ -639,6 +648,7 @@ const contentMetadata = {
|
|
|
639
648
|
description: "Step into David Raouf’s workshop where he will show you how to repurpose old and broken drum gear into usable and functional items! Whether you are a handyman or not, this show will give you unique and creative ideas and drum hacks that you have never seen before!",
|
|
640
649
|
allowableFilters: [],
|
|
641
650
|
sortBy: 'sort',
|
|
651
|
+
url: '/diy-drum-experiments',
|
|
642
652
|
},
|
|
643
653
|
'rhythmic-adventures-of-captain-carson': {
|
|
644
654
|
thumbnailUrl: 'https://dpwjbsxqtam5n.cloudfront.net/shows/raocc-showcard.jpg',
|
|
@@ -666,6 +676,7 @@ const contentMetadata = {
|
|
|
666
676
|
description: "Join the roadies of Rush and get a firsthand look at what it's like to be part of one of our favorite bands. You’re going on an exciting, behind-the-scenes journey to their 2008 Snakes & Arrows Concert Tour - an exclusive invitation to witness the reveal of all of the band’s backstage secrets. Roadies are the unsung heroes of any band - and being a roadie with a top-rated, world-famous rock and roll band is a highly coveted job. It may appear to be all glamour and adventure, but it can be a grueling marathon of 18-hour workdays!",
|
|
667
677
|
allowableFilters: [],
|
|
668
678
|
sortBy: 'sort',
|
|
679
|
+
url: '/backstage-secrets',
|
|
669
680
|
},
|
|
670
681
|
'the-history-of-electronic-drums': {
|
|
671
682
|
thumbnailUrl: 'https://imagedelivery.net/0Hon__GSkIjm-B_W77SWCA/31847ba4-02d4-4c6a-4507-32b40284a000/width=500,height=500,quality=95,fit=cover',
|
|
@@ -795,6 +806,7 @@ const contentMetadata = {
|
|
|
795
806
|
allowableFilters: ['difficulty', 'genre', 'essential'],
|
|
796
807
|
sortBy: '-published_on',
|
|
797
808
|
shortname: 'Bootcamps',
|
|
809
|
+
url: '/boot-camps',
|
|
798
810
|
icon: 'icon-chords-scales-icon',
|
|
799
811
|
description: "These bootcamps deliver results, but they also require commitment. Select a topic that you want to become an expert in, and get ready to learn!",
|
|
800
812
|
amountOfFutureLessonsToShow: 3,
|
|
@@ -826,6 +838,7 @@ const contentMetadata = {
|
|
|
826
838
|
sortBy: '-published_on',
|
|
827
839
|
shortname: 'Podcast',
|
|
828
840
|
icon: 'icon-podcast',
|
|
841
|
+
url: '/podcasts',
|
|
829
842
|
description: "Join Lisa in her quest to unify piano players around the world, build community, and make playing the piano cool!",
|
|
830
843
|
amountOfFutureLessonsToShow: 3,
|
|
831
844
|
showFutureLessonAtTopOrBottom: 'bottom',
|
|
@@ -1131,7 +1144,8 @@ function processMetadata(brand, type, withFilters = false)
|
|
|
1131
1144
|
type,
|
|
1132
1145
|
thumbnailUrl: brandMetaData.thumbnailUrl || null,
|
|
1133
1146
|
name: brandMetaData.name || null,
|
|
1134
|
-
description: brandMetaData.description || null
|
|
1147
|
+
description: brandMetaData.description || null,
|
|
1148
|
+
url: brandMetaData.url ? (brand + brandMetaData.url): (brand +'/'+ type)
|
|
1135
1149
|
};
|
|
1136
1150
|
|
|
1137
1151
|
if (withFilters) {
|
package/src/services/sanity.js
CHANGED
|
@@ -1347,9 +1347,11 @@ export async function fetchByReference(brand, {
|
|
|
1347
1347
|
const includedFieldsFilter = includedFields.length > 0
|
|
1348
1348
|
? includedFields.join(' && ')
|
|
1349
1349
|
: "";
|
|
1350
|
+
|
|
1350
1351
|
const filter = `brand == '${brand}' ${searchFilter} && references(*[${includedFieldsFilter}]._id)`;
|
|
1352
|
+
const filterWithRestrictions = await new FilterBuilder(filter).buildFilter();
|
|
1351
1353
|
const query = buildEntityAndTotalQuery(
|
|
1352
|
-
|
|
1354
|
+
filterWithRestrictions,
|
|
1353
1355
|
fieldsString,
|
|
1354
1356
|
{
|
|
1355
1357
|
sortOrder: getSortOrder(sortOrder),
|
|
@@ -830,6 +830,8 @@ describe('MetaData', function () {
|
|
|
830
830
|
test('onlyCommon', async () => {
|
|
831
831
|
const guitareoMetaData = processMetadata('guitareo', 'challenge');
|
|
832
832
|
const drumeoMetaData = processMetadata('drumeo', 'challenge');
|
|
833
|
+
guitareoMetaData.url = ''
|
|
834
|
+
drumeoMetaData.url = ''
|
|
833
835
|
expect(guitareoMetaData).toStrictEqual(drumeoMetaData);
|
|
834
836
|
expect(guitareoMetaData.type).toBe('challenge');
|
|
835
837
|
expect(guitareoMetaData.name).toBe('Challenges');
|
|
@@ -841,6 +843,8 @@ describe('MetaData', function () {
|
|
|
841
843
|
expect(guitareoMetaData.description).not.toBe(drumeoMetaData.description);
|
|
842
844
|
guitareoMetaData.description = ''
|
|
843
845
|
drumeoMetaData.description = ''
|
|
846
|
+
guitareoMetaData.url = ''
|
|
847
|
+
drumeoMetaData.url = ''
|
|
844
848
|
expect(guitareoMetaData).toStrictEqual(drumeoMetaData);
|
|
845
849
|
});
|
|
846
850
|
|