Skip to content
Open
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
76 changes: 0 additions & 76 deletions websites/L/Lunar/metadata.json

This file was deleted.

19 changes: 15 additions & 4 deletions websites/L/Lunar/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ presence.on('UpdateData', async () => {
updateTimestamp('privacy')
presence.setActivity({
largeImageKey: ActivityAssets.Logo,
largeImageText: 'lunarx.to',
details: 'Browsing Lunar',
startTimestamp: currentTimestamp,
})
Expand All @@ -183,7 +184,10 @@ presence.on('UpdateData', async () => {
details: activity.title,
state: activity.meta,
largeImageKey,
largeImageText: activity.title,
largeImageText:
largeImageKey === ActivityAssets.Logo
? 'lunarx.to'
: activity.title,
smallImageKey: Assets.Play,
smallImageText: 'Watching',
startTimestamp: currentTimestamp,
Expand Down Expand Up @@ -221,7 +225,7 @@ presence.on('UpdateData', async () => {
{ label: 'Watch on Lunar', url: href },
{
label: 'View Anime',
url: `https://lunaranime.ru/anime/${activity.id}`,
url: `https://lunarx.to/anime/${activity.id}`,
},
]
}
Expand All @@ -234,6 +238,10 @@ presence.on('UpdateData', async () => {
details: activity.title,
state: activity.meta,
largeImageKey,
largeImageText:
largeImageKey === ActivityAssets.Logo
? 'lunarx.to'
: activity.title,
smallImageKey: Assets.Reading,
smallImageText:
activity.type === 'manga' ? 'Reading Manga' : 'Reading Novel',
Expand All @@ -245,7 +253,7 @@ presence.on('UpdateData', async () => {
{ label: 'Read on Lunar', url: href },
{
label: activity.type === 'manga' ? 'View Series' : 'View Novel',
url: `https://lunaranime.ru/${activity.type}/${activity.id}`,
url: `https://lunarx.to/${activity.type}/${activity.id}`,
},
]
}
Expand All @@ -261,6 +269,7 @@ presence.on('UpdateData', async () => {

const presenceData: PresenceData = {
largeImageKey: ActivityAssets.Logo,
largeImageText: 'lunarx.to',
details: 'Browsing Lunar',
}

Expand Down Expand Up @@ -316,8 +325,10 @@ presence.on('UpdateData', async () => {
presenceData.state = pageTitle() ?? titleFromSlug(slug)
presenceData.smallImageKey = Assets.Viewing
const detailCover = pageCover()
if (ready_to_use_posters && cover && detailCover)
if (ready_to_use_posters && cover && detailCover) {
presenceData.largeImageKey = detailCover
presenceData.largeImageText = pageTitle() ?? titleFromSlug(slug)
}
if (buttons) {
presenceData.buttons = [
{ label: 'View on Lunar', url: href },
Expand Down
Loading