mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update notifications
This commit is contained in:
parent
d21f37c1bf
commit
9f68248140
12 changed files with 33 additions and 30 deletions
|
@ -86,6 +86,10 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
function showNewItemNotification(item, apiClient) {
|
||||
|
||||
if (playbackManager.isPlayingVideo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var notification = {
|
||||
title: "New " + item.Type,
|
||||
body: item.Name,
|
||||
|
@ -116,11 +120,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
var newItems = data.ItemsAdded;
|
||||
|
||||
if (!newItems.length || !window.Notification || Notification.permission !== "granted") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playbackManager.isPlayingVideo()) {
|
||||
if (!newItems.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,6 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
IsFolder: false,
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
ImageTypes: "Primary",
|
||||
Ids: newItems.join(',')
|
||||
|
||||
}).then(function (result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue