1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update notifications

This commit is contained in:
Luke Pulverenti 2016-08-18 12:45:36 -04:00
parent d21f37c1bf
commit 9f68248140
12 changed files with 33 additions and 30 deletions

View file

@ -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) {