Option to choose between which service shows the poster in large image (#411)
This commit is contained in:
parent
5c6b7f5519
commit
7bc6cfb53a
1 changed files with 16 additions and 1 deletions
|
|
@ -87,6 +87,14 @@ const settings = definePluginSettings({
|
|||
type: OptionType.BOOLEAN,
|
||||
default: true,
|
||||
},
|
||||
posterSource: {
|
||||
description: "Choose which poster to display in Rich Presence",
|
||||
type: OptionType.SELECT,
|
||||
options: [
|
||||
{ label: "Jellyfin", value: "jellyfin", default: true },
|
||||
{ label: "TheMovieDB", value: "tmdb" },
|
||||
],
|
||||
},
|
||||
overrideRichPresenceType: {
|
||||
description: "Override the rich presence type",
|
||||
type: OptionType.SELECT,
|
||||
|
|
@ -310,7 +318,14 @@ export default definePlugin({
|
|||
}
|
||||
|
||||
const assets: ActivityAssets = {
|
||||
large_image: tmdbData?.posterPath ? await getApplicationAsset(tmdbData.posterPath) : mediaData.imageUrl ? await getApplicationAsset(mediaData.imageUrl) : undefined,
|
||||
large_image:
|
||||
settings.store.posterSource === "tmdb"
|
||||
? (tmdbData?.posterPath
|
||||
? await getApplicationAsset(tmdbData.posterPath)
|
||||
: undefined)
|
||||
: (mediaData.imageUrl
|
||||
? await getApplicationAsset(mediaData.imageUrl)
|
||||
: undefined),
|
||||
large_text: mediaData.seriesName || mediaData.album || undefined,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue