mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-16 16:46:09 -08:00
fix(jellyfin): fix jellyfin media metadata (#250)
This commit is contained in:
1 parent
2831e05124
commit
186d4a0640
29 files changed
+594
-31
No files matched your search
@@ -91,6 +91,21 @@ test('buildDiscordPresenceActivity shows media title regardless of style', () =>
|
||||
}
|
||||
});
|
||||
|
||||
test('buildDiscordPresenceActivity rejects stream URLs supplied as titles', () => {
|
||||
for (const mediaTitle of [
|
||||
'https://example.com/stream?api_key=test-secret',
|
||||
'stream?api_key=test-secret',
|
||||
]) {
|
||||
const activity = buildDiscordPresenceActivity(baseConfig, {
|
||||
...baseSnapshot,
|
||||
mediaPath: 'https://example.com/stream?api_key=test-secret',
|
||||
mediaTitle,
|
||||
});
|
||||
assert.equal(activity.details, 'Unknown media');
|
||||
assert.equal(JSON.stringify(activity).includes('test-secret'), false);
|
||||
}
|
||||
});
|
||||
|
||||
test('buildDiscordPresenceActivity never falls back to remote stream URLs', () => {
|
||||
const payload = buildDiscordPresenceActivity(baseConfig, {
|
||||
...baseSnapshot,
|
||||
|
||||
Reference in new issue
Block a user