Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/MusicBrainz/Server/Data/URL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ my %URL_SPECIALIZATIONS = (
'iTunes' => qr{^https?://itunes\.apple\.com/}i,
'Jamendo' => qr{^https?://(?:www\.)?jamendo\.com/}i,
'Japameta' => qr{^https?://(?:www\.)?japanesemetal\.gooside\.com/}i,
'Jaxsta' => qr{^https?://(?:www\.)?jaxsta\.(?:com|io)/}i,
'JazzMusicArchives' => qr{^https?://(?:www\.)?jazzmusicarchives\.com/}i,
'JLyric' => qr{^https?://(?:www\.)?j-lyric\.net/}i,
'Joysound' => qr{^https?://(?:www\.)?joysound\.com/}i,
Expand Down
23 changes: 0 additions & 23 deletions lib/MusicBrainz/Server/Entity/URL/Jaxsta.pm

This file was deleted.

Binary file removed root/static/images/external-favicons/jaxsta-32.png
Binary file not shown.
2 changes: 0 additions & 2 deletions root/static/scripts/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export const FAVICON_CLASSES: {
'iss.ndl.go.jp': 'ndl',
'itunes.apple.com': 'itunes',
'j-lyric.net': 'jlyric',
'jaxsta.com': 'jaxsta',
'jaxsta.io': 'jaxsta',
'jazzmusicarchives.com': 'jazzmusicarchives',
'joysound.com': 'joysound',
'junodownload.com': 'junodownload',
Expand Down
62 changes: 2 additions & 60 deletions root/static/scripts/edit/URLCleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3560,69 +3560,11 @@ export const CLEANUPS: CleanupEntries = {
return url;
},
},
// Jaxsta is gone, this is minimal support for ended links
'jaxsta': {
hostname: ['jaxsta.com', 'jaxsta.io'],
match: [/^(https?:\/\/)?(www\.)?jaxsta\.(com|io)/i],
restrict: [
LINK_TYPES.otherdatabases,
{work: [LINK_TYPES.otherdatabases.work, LINK_TYPES.lyrics.work]},
],
select(url, sourceType) {
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);
if (m) {
const prefix = m[1];
switch (prefix) {
case 'work':
if (sourceType === 'work') {
return LINK_TYPES.otherdatabases.work;
}
break;
}
}
return false;
},
clean(url) {
url = url.replace(/^(?:https?:\/\/)?(?:www\.)?jaxsta\.(?:com|io)\/([^#?]+).*$/, 'https://jaxsta.com/$1');
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');
return url;
},
validate(url, id) {
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);
if (m) {
const type = m[1];
const hasVariant = Boolean(m[2]);
switch (id) {
case LINK_TYPES.otherdatabases.artist:
return {
result: type === 'profile',
target: ERROR_TARGETS.ENTITY,
};
case LINK_TYPES.otherdatabases.label:
return {
result: type === 'profile',
target: ERROR_TARGETS.ENTITY,
};
case LINK_TYPES.otherdatabases.recording:
return {
result: type === 'recording',
target: ERROR_TARGETS.ENTITY,
};
case LINK_TYPES.otherdatabases.release:
return {
result: type === 'release' && hasVariant,
target: ERROR_TARGETS.ENTITY,
};
case LINK_TYPES.lyrics.work:
case LINK_TYPES.otherdatabases.work:
return {
result: type === 'work',
target: ERROR_TARGETS.ENTITY,
};
}
return {result: false, target: ERROR_TARGETS.ENTITY};
}
return {result: false, target: ERROR_TARGETS.URL};
},
restrict: [LINK_TYPES.otherdatabases],
},
'jazzmusicarchives': {
hostname: 'jazzmusicarchives.com',
Expand Down
21 changes: 0 additions & 21 deletions root/static/scripts/tests/Control/URLCleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3525,47 +3525,26 @@ limited_link_type_combinations: [
input_url: 'http://www.jaxsta.com/profile/8a9bd5c6-1ce2-4f1d-bfdc-1a2383129c79/catalogue?role_group=Featured%20Artist&view=tile',
input_entity_type: 'artist',
expected_relationship_type: 'otherdatabases',
expected_clean_url: 'https://jaxsta.com/profile/8a9bd5c6-1ce2-4f1d-bfdc-1a2383129c79',
only_valid_entity_types: ['artist', 'label'],
},
{
input_url: 'https://jaxsta.io/profile/902b15e8-ed89-41d7-a7c0-a35caf2c2801/credits',
input_entity_type: 'artist',
expected_relationship_type: 'otherdatabases',
expected_clean_url: 'https://jaxsta.com/profile/902b15e8-ed89-41d7-a7c0-a35caf2c2801',
only_valid_entity_types: ['artist', 'label'],
},
{
input_url: 'https://jaxsta.com/profile/5a50b1be-7473-4e51-ae4b-bb8d9ac13407/catalogue?view=tile',
input_entity_type: 'label',
expected_relationship_type: 'otherdatabases',
expected_clean_url: 'https://jaxsta.com/profile/5a50b1be-7473-4e51-ae4b-bb8d9ac13407',
only_valid_entity_types: ['artist', 'label'],
},
{
input_url: 'https://jaxsta.com/recording/5b01140a-a82f-5f5c-aa81-93d61de00f94/releases',
input_entity_type: 'recording',
expected_relationship_type: 'otherdatabases',
expected_clean_url: 'https://jaxsta.com/recording/5b01140a-a82f-5f5c-aa81-93d61de00f94',
only_valid_entity_types: ['recording'],
},
{
input_url: 'https://jaxsta.com/release/66512305-5fb7-5d43-a194-d5ed56c16cab/7c5528fe-96f7-5c0c-9af2-9b756b909436/variants',
input_entity_type: 'release',
expected_relationship_type: 'otherdatabases',
expected_clean_url: 'https://jaxsta.com/release/66512305-5fb7-5d43-a194-d5ed56c16cab/7c5528fe-96f7-5c0c-9af2-9b756b909436',
only_valid_entity_types: ['release'],
},
{
input_url: 'https://jaxsta.io/work/2aa4e869-85d4-5099-92fb-5a8aa1494d32/overview',
input_entity_type: 'work',
expected_relationship_type: 'otherdatabases',
limited_link_type_combinations: [
'otherdatabases',
['lyrics', 'otherdatabases'],
],
expected_clean_url: 'https://jaxsta.com/work/2aa4e869-85d4-5099-92fb-5a8aa1494d32',
only_valid_entity_types: ['work'],
},
// Jazz Music Archives
{
Expand Down
1 change: 0 additions & 1 deletion root/static/styles/favicons.less
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
.favicon("ircam", 32);
.favicon("irishtune");
.favicon("itunes");
.favicon("jaxsta", 32);
.favicon("jazzmusicarchives");
.favicon("jlyric", 32);
.favicon("joysound", 32);
Expand Down