Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit c76418d

Browse files
committed
feat(lidarr): add MusicBrainz to links
1 parent c062b3d commit c76418d

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed

assets/LunaBrandIcons.ttf

412 Bytes
Binary file not shown.

assets/images/brands/config.json

+14
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@
131131
"search": [
132132
"tvmaze"
133133
]
134+
},
135+
{
136+
"uid": "5d832b893437e33c4a22b7029c2b781b",
137+
"css": "musicbrainz",
138+
"code": 59401,
139+
"src": "custom_icons",
140+
"selected": true,
141+
"svg": {
142+
"path": "M475.1 106.5C469 110.1 462.8 113.7 461.1 114.5 459.5 115.2 456.5 117 454.3 118.4 449.9 121.3 436.7 129.1 426.7 134.6 423.1 136.7 408.2 145.3 393.7 153.9 379.2 162.5 366.3 170 365.1 170.5 363.9 171.1 360.9 172.9 358.5 174.5 356.1 176.1 353.1 177.9 351.9 178.5 350 179.4 330.3 191 319.9 197.2 315.9 199.6 301.8 207.7 295.5 211.2 282.4 218.4 276.4 222.1 275.9 223.2 275.6 223.8 274.8 224.3 274 224.3 273.2 224.3 263.9 229.5 253.2 235.8 242.6 242.1 232.9 247.7 231.7 248.3 230.5 248.8 227.5 250.6 225.1 252.2 222.7 253.8 219.7 255.6 218.5 256.2 214.9 258 196.6 268.8 192.3 271.6 190.2 273 187.4 274.6 186.2 275.2 185 275.8 178.7 279.4 172.3 283.1 165.8 286.9 156.9 292 152.5 294.5L144.4 298.9 144.4 500 144.4 701.1 152.5 705.5C156.9 708 165.8 713.1 172.3 716.9 178.7 720.6 185 724.2 186.2 724.8 187.4 725.4 190.2 727 192.3 728.4 196.6 731.2 214.9 742 218.5 743.8 219.7 744.4 222.7 746.2 225.1 747.8 227.5 749.4 230.5 751.2 231.7 751.7 232.9 752.3 242.6 757.9 253.2 764.2 263.9 770.5 273.2 775.7 274 775.7 274.8 775.7 275.6 776.2 275.9 776.8 276.4 777.9 282.4 781.6 295.5 788.8 301.8 792.3 315.9 800.4 319.9 802.8 330.3 809 350 820.6 351.9 821.5 353.1 822.1 356.1 823.9 358.5 825.5 360.9 827.1 363.9 828.9 365.1 829.5 366.3 830 379.2 837.5 393.7 846.1 408.2 854.7 423.1 863.3 426.7 865.4 436.7 870.9 449.9 878.7 454.3 881.6 456.5 883 459.5 884.8 461.1 885.5 462.8 886.3 469 889.9 475.1 893.5L486.1 900 486.4 700C486.6 590 486.6 410 486.4 300L486.1 100 475.1 106.5M513.2 500L513.2 900.4 520.2 896.4C524 894.2 529.6 890.9 532.6 889 535.6 887.2 538.5 885.6 538.9 885.6 539.4 885.6 543.2 883.4 547.4 880.7 557.1 874.4 570.3 866.6 571 866.6 571.3 866.6 585.4 858.5 602.2 848.5 619 838.6 633.7 830 634.9 829.5 636.1 828.9 639.1 827.1 641.5 825.5 643.9 823.9 646.9 822.1 648.1 821.5 650 820.6 669.7 809 680.1 802.8 684.1 800.4 698.2 792.3 704.5 788.8 717.6 781.6 723.6 777.9 724.1 776.8 724.4 776.2 725.2 775.7 726 775.7 726.8 775.7 736.1 770.5 746.8 764.2 757.4 757.9 767.1 752.3 768.3 751.7 769.5 751.2 772.5 749.4 774.9 747.8 777.3 746.2 780.3 744.4 781.5 743.8 785.1 742 803.4 731.2 807.7 728.4 809.8 727 812.6 725.4 813.8 724.8 815 724.2 821.3 720.6 827.7 716.9 834.2 713.1 843.1 708 847.5 705.5L855.6 701.1 855.6 500 855.6 298.9 847.5 294.5C843.1 292 834.2 286.9 827.7 283.1 821.3 279.4 815 275.8 813.8 275.2 812.6 274.6 809.8 273 807.7 271.6 803.4 268.8 785.1 258 781.5 256.2 780.3 255.6 777.3 253.8 774.9 252.2 772.5 250.6 769.5 248.8 768.3 248.3 767.1 247.7 757.4 242.1 746.8 235.8 736.1 229.5 726.8 224.3 726 224.3 725.2 224.3 724.4 223.8 724.1 223.2 723.6 222.1 717.6 218.4 704.5 211.2 698.2 207.7 684.1 199.6 680.1 197.2 669.7 191 650 179.4 648.1 178.5 646.9 177.9 643.9 176.1 641.5 174.5 639.1 172.9 636.1 171.1 634.9 170.5 633.7 170 619 161.4 602.2 151.5 585.4 141.5 571.3 133.4 571 133.4 570.3 133.4 557.1 125.6 547.4 119.3 543.2 116.6 539.4 114.4 538.9 114.4 538.5 114.4 535.6 112.8 532.6 111 529.6 109.1 524 105.8 520.2 103.6L513.2 99.6 513.2 500",
143+
"width": 1000
144+
},
145+
"search": [
146+
"musicbrainz"
147+
]
134148
}
135149
]
136150
}

assets/images/brands/musicbrainz.svg

+1
Loading

lib/modules/lidarr/sheets/links.dart

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:lunasea/extensions/string/links.dart';
33
import 'package:lunasea/modules/lidarr/core/api.dart';
4+
import 'package:lunasea/utils/links.dart';
45
import 'package:lunasea/widgets/ui.dart';
56

67
class LinksSheet extends LunaBottomModalSheet {
@@ -38,6 +39,12 @@ class LinksSheet extends LunaBottomModalSheet {
3839
leading: const LunaIconButton(icon: LunaIcons.LASTFM),
3940
onTap: artist.lastfmURI!.openLink,
4041
),
42+
LunaBlock(
43+
title: 'MusicBrainz',
44+
leading: const LunaIconButton(icon: LunaIcons.MUSICBRAINZ),
45+
onTap:
46+
LunaLinkedContent.musicBrainz(artist.foreignArtistID)!.openLink,
47+
),
4148
],
4249
);
4350
}

lib/utils/links.dart

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ enum LunaLinkedContent {
4040
return '$base/tmdb/$id';
4141
}
4242

43+
static String? musicBrainz(String? id) {
44+
if (id == null) return null;
45+
String base = 'https://musicbrainz.org/artist';
46+
47+
return '$base/$id';
48+
}
49+
4350
static String? theMovieDB(dynamic id, LinkedContentType type) {
4451
if (id == null) return null;
4552
String base = 'https://www.themoviedb.org';

lib/widgets/ui/icons/icon.dart

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class LunaIcons {
6767

6868
// Brands - Custom
6969
static const IconData LIDARR = IconData(0xe805, fontFamily: _fontFamily);
70+
static const IconData MUSICBRAINZ = IconData(0xe809, fontFamily: _fontFamily);
7071
static const IconData NZBGET = IconData(0xe807, fontFamily: _fontFamily);
7172
static const IconData OVERSEERR = IconData(0xe808, fontFamily: _fontFamily);
7273
static const IconData RADARR = IconData(0xe80a, fontFamily: _fontFamily);

0 commit comments

Comments
 (0)