AppleMusicRichPresence: add option to disable large/small image (#2562)
This commit is contained in:
parent
c54650b29a
commit
40db2f5078
1 changed files with 16 additions and 8 deletions
|
@ -68,6 +68,7 @@ export interface TrackData {
|
||||||
const enum AssetImageType {
|
const enum AssetImageType {
|
||||||
Album = "Album",
|
Album = "Album",
|
||||||
Artist = "Artist",
|
Artist = "Artist",
|
||||||
|
Disabled = "Disabled"
|
||||||
}
|
}
|
||||||
|
|
||||||
const applicationId = "1239490006054207550";
|
const applicationId = "1239490006054207550";
|
||||||
|
@ -126,7 +127,8 @@ const settings = definePluginSettings({
|
||||||
description: "Activity assets large image type",
|
description: "Activity assets large image type",
|
||||||
options: [
|
options: [
|
||||||
{ label: "Album artwork", value: AssetImageType.Album, default: true },
|
{ label: "Album artwork", value: AssetImageType.Album, default: true },
|
||||||
{ label: "Artist artwork", value: AssetImageType.Artist }
|
{ label: "Artist artwork", value: AssetImageType.Artist },
|
||||||
|
{ label: "Disabled", value: AssetImageType.Disabled }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
largeTextString: {
|
largeTextString: {
|
||||||
|
@ -139,7 +141,8 @@ const settings = definePluginSettings({
|
||||||
description: "Activity assets small image type",
|
description: "Activity assets small image type",
|
||||||
options: [
|
options: [
|
||||||
{ label: "Album artwork", value: AssetImageType.Album },
|
{ label: "Album artwork", value: AssetImageType.Album },
|
||||||
{ label: "Artist artwork", value: AssetImageType.Artist, default: true }
|
{ label: "Artist artwork", value: AssetImageType.Artist, default: true },
|
||||||
|
{ label: "Disabled", value: AssetImageType.Disabled }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
smallTextString: {
|
smallTextString: {
|
||||||
|
@ -207,12 +210,17 @@ export default definePlugin({
|
||||||
getImageAsset(settings.store.smallImageType, trackData)
|
getImageAsset(settings.store.smallImageType, trackData)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const assets: ActivityAssets = {
|
const assets: ActivityAssets = {};
|
||||||
large_image: largeImageAsset,
|
|
||||||
large_text: customFormat(settings.store.largeTextString, trackData),
|
if (settings.store.largeImageType !== AssetImageType.Disabled) {
|
||||||
small_image: smallImageAsset,
|
assets.large_image = largeImageAsset;
|
||||||
small_text: customFormat(settings.store.smallTextString, trackData),
|
assets.large_text = customFormat(settings.store.largeTextString, trackData);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
if (settings.store.smallImageType !== AssetImageType.Disabled) {
|
||||||
|
assets.small_image = smallImageAsset;
|
||||||
|
assets.small_text = customFormat(settings.store.smallTextString, trackData);
|
||||||
|
}
|
||||||
|
|
||||||
const buttons: ActivityButton[] = [];
|
const buttons: ActivityButton[] = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue