-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(AniTilky): add activity #9264
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Close #9263 |
Rename title to feat(AniTilky): add activity |
websites/A/AniTilky/metadata.json
Outdated
"iFrameRegExp": "anitilky\\.xyz", | ||
"regExp": "anitilky\\.xyz", | ||
"readLogs": false, | ||
"apiVersion": "3.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"apiVersion": "3.1.0" | |
"apiVersion": 1 |
websites/A/AniTilky/presence.ts
Outdated
let lastAnimeId: string | null = null, | ||
lastAnimeData: AnimeData | null = null, | ||
lastUsername: string | null = null, | ||
lastUserData: UserData | null = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let lastAnimeId: string | null = null, | |
lastAnimeData: AnimeData | null = null, | |
lastUsername: string | null = null, | |
lastUserData: UserData | null = null; |
websites/A/AniTilky/presence.ts
Outdated
const presenceData: PresenceData = { | ||
largeImageKey: "logo" | ||
}; | ||
|
||
const baseUrl = "https://anitilky.xyz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const presenceData: PresenceData = { | |
largeImageKey: "logo" | |
}; | |
const baseUrl = "https://anitilky.xyz"; | |
const presenceData: PresenceData = { | |
largeImageKey: Assets.Logo | |
}, | |
baseUrl = "https://anitilky.xyz"; |
websites/A/AniTilky/presence.ts
Outdated
const username = document.querySelector(".profile-username")?.textContent?.trim(); | ||
|
||
presenceData.details = "Kendi profiline bakıyor"; | ||
presenceData.state = username || "Profil"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const username = document.querySelector(".profile-username")?.textContent?.trim(); | |
presenceData.details = "Kendi profiline bakıyor"; | |
presenceData.state = username || "Profil"; | |
presenceData.details = "Kendi profiline bakıyor"; | |
presenceData.state = document.querySelector(".profile-username")?.textContent?.trim() || "Profil"; |
websites/A/AniTilky/presence.ts
Outdated
} | ||
// Başka kullanıcı profili kontrolü | ||
else if (document.location.pathname.startsWith("/u/")) { | ||
const username = document.location.pathname.split('/').pop() || ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const username = document.location.pathname.split('/').pop() || ''; | |
const username = document.location.pathname.split("/").pop() || ""; |
websites/A/AniTilky/presence.ts
Outdated
async function getAnimeData(animeId: string): Promise<AnimeData> { | ||
try { | ||
const titleElement = document.querySelector(".anime-title"); | ||
if (titleElement && titleElement.textContent) { | ||
return { | ||
title: { tr: titleElement.textContent.trim() } | ||
}; | ||
} | ||
|
||
const response = await fetch(`https://backend.anitilky.xyz/api/anime/${animeId}`); | ||
if (!response.ok) throw new Error('API error'); | ||
const data = await response.json(); | ||
return data; | ||
} catch (error) { | ||
console.error("Anime verisi alınamadı:", error); | ||
return { | ||
title: { tr: "Bilinmeyen Anime" } | ||
}; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async function getAnimeData(animeId: string): Promise<AnimeData> { | |
try { | |
const titleElement = document.querySelector(".anime-title"); | |
if (titleElement && titleElement.textContent) { | |
return { | |
title: { tr: titleElement.textContent.trim() } | |
}; | |
} | |
const response = await fetch(`https://backend.anitilky.xyz/api/anime/${animeId}`); | |
if (!response.ok) throw new Error('API error'); | |
const data = await response.json(); | |
return data; | |
} catch (error) { | |
console.error("Anime verisi alınamadı:", error); | |
return { | |
title: { tr: "Bilinmeyen Anime" } | |
}; | |
} | |
} |
websites/A/AniTilky/presence.ts
Outdated
|
||
presence.on("UpdateData", async () => { | ||
const presenceData: PresenceData = { | ||
largeImageKey: "logo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
largeImageKey: "logo" | |
largeImageKey: Assets.Logo |
websites/A/AniTilky/presence.ts
Outdated
lastAnimeData: AnimeData | null = null, | ||
lastUsername: string | null = null, | ||
lastUserData: UserData | null = null; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const enum Assets { | |
Logo = "https://i.imgur.com/zZ5r866.png", | |
} |
websites/A/AniTilky/metadata.json
Outdated
}, | ||
"url": "anitilky.xyz", | ||
"version": "1.0.0", | ||
"logo": "https://i.imgur.com/zZ5r866.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logo should be 512x512.
websites/A/AniTilky/metadata.json
Outdated
@@ -0,0 +1,29 @@ | |||
{ | |||
"$schema": "https://schemas.premid.app/metadata/1.10", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$schema": "https://schemas.premid.app/metadata/1.10", | |
"$schema": "https://schemas.premid.app/metadata/1.13", |
websites/A/AniTilky/metadata.json
Outdated
"tags": ["anime", "video", "streaming", "turkish"], | ||
"iframe": true, | ||
"iFrameRegExp": "anitilky\\.xyz", | ||
"readLogs": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"readLogs": false |
websites/A/AniTilky/metadata.json
Outdated
"color": "#FF6B6B", | ||
"category": "anime", | ||
"tags": ["anime", "video", "streaming", "turkish"], | ||
"iframe": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"iframe": true, |
websites/A/AniTilky/presence.ts
Outdated
export const presence = new Presence({ | ||
clientId: '1124065204200820786', | ||
}) | ||
export const time = Math.floor(Date.now() / 1000) | ||
export const path = document.location.pathname | ||
export const videoData = { | ||
current: 0, | ||
duration: 0, | ||
isLive: false, | ||
paused: true, | ||
} | ||
export const baseUrl = 'https://anitilky.xyz' | ||
export const apiUrl = 'https://backend.anitilky.xyz/api' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these exports seem useless
Head branch was pushed to by a user without write access
websites/A/AniTilky/presence.ts
Outdated
/// <reference types="premid" /> | ||
/// <reference path="../../../@types/premid/index.d.ts" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should be unneeded?
websites/A/AniTilky/presence.ts
Outdated
largeImageKey: 'logo', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use an imgur url instead of assets from the app
websites/A/AniTilky/presence.ts
Outdated
avatar: data.data.avatar || 'logo', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
websites/A/AniTilky/presence.ts
Outdated
|
||
presenceData.details = 'Anime detayına bakıyor' | ||
presenceData.state = animeInfo?.title.romaji || animeInfo?.title.english || animeInfo?.title.native || 'Yükleniyor...' | ||
presenceData.largeImageKey = animeInfo?.coverImage || 'logo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
AniTilky Presence
Features
Özellikler
Screenshots/Ekran Görüntüleri
Click to expand/Genişletmek için tıklayın
Anime Watching/Anime İzleme
Profile View/Profil Görünümü
Anime Details/Anime Detayları