mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
chore: Filter out sessions with prerolls in JellyfinAPI
This commit is contained in:
@@ -367,8 +367,14 @@ class JellyfinAPI {
|
||||
},
|
||||
});
|
||||
let result = response.data && Array.isArray(response.data) ? response.data : [];
|
||||
|
||||
if (result.length > 0) {
|
||||
result = result.filter((session) => session.NowPlayingItem !== undefined && session.NowPlayingItem.Type != "Trailer");
|
||||
result = result.filter(
|
||||
(session) =>
|
||||
session.NowPlayingItem !== undefined &&
|
||||
session.NowPlayingItem.Type != "Trailer" &&
|
||||
session.NowPlayingItem.ProviderIds["prerolls.video"] == undefined
|
||||
);
|
||||
}
|
||||
return result;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user