Skip to content

Commit ed75c8e

Browse files
authored
Merge pull request #3699 from reosarevok/MBS-14229
MBS-14229: Drop handling of Jaxsta links
2 parents 31bffee + 8a53213 commit ed75c8e

File tree

7 files changed

+2
-108
lines changed

7 files changed

+2
-108
lines changed

lib/MusicBrainz/Server/Data/URL.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ my %URL_SPECIALIZATIONS = (
105105
'iTunes' => qr{^https?://itunes\.apple\.com/}i,
106106
'Jamendo' => qr{^https?://(?:www\.)?jamendo\.com/}i,
107107
'Japameta' => qr{^https?://(?:www\.)?japanesemetal\.gooside\.com/}i,
108-
'Jaxsta' => qr{^https?://(?:www\.)?jaxsta\.(?:com|io)/}i,
109108
'JazzMusicArchives' => qr{^https?://(?:www\.)?jazzmusicarchives\.com/}i,
110109
'JLyric' => qr{^https?://(?:www\.)?j-lyric\.net/}i,
111110
'Joysound' => qr{^https?://(?:www\.)?joysound\.com/}i,

lib/MusicBrainz/Server/Entity/URL/Jaxsta.pm

Lines changed: 0 additions & 23 deletions
This file was deleted.
-538 Bytes
Binary file not shown.

root/static/scripts/common/constants.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ export const FAVICON_CLASSES: {
148148
'iss.ndl.go.jp': 'ndl',
149149
'itunes.apple.com': 'itunes',
150150
'j-lyric.net': 'jlyric',
151-
'jaxsta.com': 'jaxsta',
152-
'jaxsta.io': 'jaxsta',
153151
'jazzmusicarchives.com': 'jazzmusicarchives',
154152
'joysound.com': 'joysound',
155153
'junodownload.com': 'junodownload',

root/static/scripts/edit/URLCleanup.js

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3560,69 +3560,11 @@ export const CLEANUPS: CleanupEntries = {
35603560
return url;
35613561
},
35623562
},
3563+
// Jaxsta is gone, this is minimal support for ended links
35633564
'jaxsta': {
35643565
hostname: ['jaxsta.com', 'jaxsta.io'],
35653566
match: [/^(https?:\/\/)?(www\.)?jaxsta\.(com|io)/i],
3566-
restrict: [
3567-
LINK_TYPES.otherdatabases,
3568-
{work: [LINK_TYPES.otherdatabases.work, LINK_TYPES.lyrics.work]},
3569-
],
3570-
select(url, sourceType) {
3571-
const m = /^https:\/\/jaxsta\.com\/(\w+)\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$/.exec(url);
3572-
if (m) {
3573-
const prefix = m[1];
3574-
switch (prefix) {
3575-
case 'work':
3576-
if (sourceType === 'work') {
3577-
return LINK_TYPES.otherdatabases.work;
3578-
}
3579-
break;
3580-
}
3581-
}
3582-
return false;
3583-
},
3584-
clean(url) {
3585-
url = url.replace(/^(?:https?:\/\/)?(?:www\.)?jaxsta\.(?:com|io)\/([^#?]+).*$/, 'https://jaxsta.com/$1');
3586-
url = url.replace(/^https:\/\/jaxsta\.com\/(\w+)\/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})(\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?.*$/, 'https://jaxsta.com/$1/$2$3');
3587-
return url;
3588-
},
3589-
validate(url, id) {
3590-
const m = /^https:\/\/jaxsta\.com\/(\w+)\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$/.exec(url);
3591-
if (m) {
3592-
const type = m[1];
3593-
const hasVariant = Boolean(m[2]);
3594-
switch (id) {
3595-
case LINK_TYPES.otherdatabases.artist:
3596-
return {
3597-
result: type === 'profile',
3598-
target: ERROR_TARGETS.ENTITY,
3599-
};
3600-
case LINK_TYPES.otherdatabases.label:
3601-
return {
3602-
result: type === 'profile',
3603-
target: ERROR_TARGETS.ENTITY,
3604-
};
3605-
case LINK_TYPES.otherdatabases.recording:
3606-
return {
3607-
result: type === 'recording',
3608-
target: ERROR_TARGETS.ENTITY,
3609-
};
3610-
case LINK_TYPES.otherdatabases.release:
3611-
return {
3612-
result: type === 'release' && hasVariant,
3613-
target: ERROR_TARGETS.ENTITY,
3614-
};
3615-
case LINK_TYPES.lyrics.work:
3616-
case LINK_TYPES.otherdatabases.work:
3617-
return {
3618-
result: type === 'work',
3619-
target: ERROR_TARGETS.ENTITY,
3620-
};
3621-
}
3622-
return {result: false, target: ERROR_TARGETS.ENTITY};
3623-
}
3624-
return {result: false, target: ERROR_TARGETS.URL};
3625-
},
3567+
restrict: [LINK_TYPES.otherdatabases],
36263568
},
36273569
'jazzmusicarchives': {
36283570
hostname: 'jazzmusicarchives.com',

root/static/scripts/tests/Control/URLCleanup.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,47 +3525,26 @@ limited_link_type_combinations: [
35253525
input_url: 'http://www.jaxsta.com/profile/8a9bd5c6-1ce2-4f1d-bfdc-1a2383129c79/catalogue?role_group=Featured%20Artist&view=tile',
35263526
input_entity_type: 'artist',
35273527
expected_relationship_type: 'otherdatabases',
3528-
expected_clean_url: 'https://jaxsta.com/profile/8a9bd5c6-1ce2-4f1d-bfdc-1a2383129c79',
3529-
only_valid_entity_types: ['artist', 'label'],
3530-
},
3531-
{
3532-
input_url: 'https://jaxsta.io/profile/902b15e8-ed89-41d7-a7c0-a35caf2c2801/credits',
3533-
input_entity_type: 'artist',
3534-
expected_relationship_type: 'otherdatabases',
3535-
expected_clean_url: 'https://jaxsta.com/profile/902b15e8-ed89-41d7-a7c0-a35caf2c2801',
3536-
only_valid_entity_types: ['artist', 'label'],
35373528
},
35383529
{
35393530
input_url: 'https://jaxsta.com/profile/5a50b1be-7473-4e51-ae4b-bb8d9ac13407/catalogue?view=tile',
35403531
input_entity_type: 'label',
35413532
expected_relationship_type: 'otherdatabases',
3542-
expected_clean_url: 'https://jaxsta.com/profile/5a50b1be-7473-4e51-ae4b-bb8d9ac13407',
3543-
only_valid_entity_types: ['artist', 'label'],
35443533
},
35453534
{
35463535
input_url: 'https://jaxsta.com/recording/5b01140a-a82f-5f5c-aa81-93d61de00f94/releases',
35473536
input_entity_type: 'recording',
35483537
expected_relationship_type: 'otherdatabases',
3549-
expected_clean_url: 'https://jaxsta.com/recording/5b01140a-a82f-5f5c-aa81-93d61de00f94',
3550-
only_valid_entity_types: ['recording'],
35513538
},
35523539
{
35533540
input_url: 'https://jaxsta.com/release/66512305-5fb7-5d43-a194-d5ed56c16cab/7c5528fe-96f7-5c0c-9af2-9b756b909436/variants',
35543541
input_entity_type: 'release',
35553542
expected_relationship_type: 'otherdatabases',
3556-
expected_clean_url: 'https://jaxsta.com/release/66512305-5fb7-5d43-a194-d5ed56c16cab/7c5528fe-96f7-5c0c-9af2-9b756b909436',
3557-
only_valid_entity_types: ['release'],
35583543
},
35593544
{
35603545
input_url: 'https://jaxsta.io/work/2aa4e869-85d4-5099-92fb-5a8aa1494d32/overview',
35613546
input_entity_type: 'work',
35623547
expected_relationship_type: 'otherdatabases',
3563-
limited_link_type_combinations: [
3564-
'otherdatabases',
3565-
['lyrics', 'otherdatabases'],
3566-
],
3567-
expected_clean_url: 'https://jaxsta.com/work/2aa4e869-85d4-5099-92fb-5a8aa1494d32',
3568-
only_valid_entity_types: ['work'],
35693548
},
35703549
// Jazz Music Archives
35713550
{

root/static/styles/favicons.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
.favicon("ircam", 32);
9292
.favicon("irishtune");
9393
.favicon("itunes");
94-
.favicon("jaxsta", 32);
9594
.favicon("jazzmusicarchives");
9695
.favicon("jlyric", 32);
9796
.favicon("joysound", 32);

0 commit comments

Comments
 (0)