Skip to content

Commit

Permalink
feat(lidarr): add MusicBrainz to links
Browse files Browse the repository at this point in the history
  • Loading branch information
JagandeepBrar committed Sep 24, 2022
1 parent c062b3d commit c76418d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
Binary file modified assets/LunaBrandIcons.ttf
Binary file not shown.
14 changes: 14 additions & 0 deletions assets/images/brands/config.json
Expand Up @@ -131,6 +131,20 @@
"search": [
"tvmaze"
]
},
{
"uid": "5d832b893437e33c4a22b7029c2b781b",
"css": "musicbrainz",
"code": 59401,
"src": "custom_icons",
"selected": true,
"svg": {
"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",
"width": 1000
},
"search": [
"musicbrainz"
]
}
]
}
1 change: 1 addition & 0 deletions assets/images/brands/musicbrainz.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions lib/modules/lidarr/sheets/links.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:lunasea/extensions/string/links.dart';
import 'package:lunasea/modules/lidarr/core/api.dart';
import 'package:lunasea/utils/links.dart';
import 'package:lunasea/widgets/ui.dart';

class LinksSheet extends LunaBottomModalSheet {
Expand Down Expand Up @@ -38,6 +39,12 @@ class LinksSheet extends LunaBottomModalSheet {
leading: const LunaIconButton(icon: LunaIcons.LASTFM),
onTap: artist.lastfmURI!.openLink,
),
LunaBlock(
title: 'MusicBrainz',
leading: const LunaIconButton(icon: LunaIcons.MUSICBRAINZ),
onTap:
LunaLinkedContent.musicBrainz(artist.foreignArtistID)!.openLink,
),
],
);
}
Expand Down
7 changes: 7 additions & 0 deletions lib/utils/links.dart
Expand Up @@ -40,6 +40,13 @@ enum LunaLinkedContent {
return '$base/tmdb/$id';
}

static String? musicBrainz(String? id) {
if (id == null) return null;
String base = 'https://musicbrainz.org/artist';

return '$base/$id';
}

static String? theMovieDB(dynamic id, LinkedContentType type) {
if (id == null) return null;
String base = 'https://www.themoviedb.org';
Expand Down
1 change: 1 addition & 0 deletions lib/widgets/ui/icons/icon.dart
Expand Up @@ -67,6 +67,7 @@ class LunaIcons {

// Brands - Custom
static const IconData LIDARR = IconData(0xe805, fontFamily: _fontFamily);
static const IconData MUSICBRAINZ = IconData(0xe809, fontFamily: _fontFamily);
static const IconData NZBGET = IconData(0xe807, fontFamily: _fontFamily);
static const IconData OVERSEERR = IconData(0xe808, fontFamily: _fontFamily);
static const IconData RADARR = IconData(0xe80a, fontFamily: _fontFamily);
Expand Down

0 comments on commit c76418d

Please sign in to comment.