mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-13 01:33:04 +01:00
added a notifications service
This commit is contained in:
@@ -468,6 +468,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"musicgenres.js",
|
||||
"musicrecommended.js",
|
||||
"musicvideos.js",
|
||||
"notifications.js",
|
||||
"playlist.js",
|
||||
"plugincatalogpage.js",
|
||||
"pluginspage.js",
|
||||
@@ -524,6 +525,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"detailtable.css",
|
||||
"posteritem.css",
|
||||
"tileitem.css",
|
||||
"notifications.css",
|
||||
"search.css",
|
||||
"pluginupdates.css",
|
||||
"remotecontrol.css",
|
||||
|
||||
@@ -243,6 +243,61 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||
});
|
||||
};
|
||||
|
||||
self.getNotificationSummary = function (userId) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Notifications/" + userId + "/Summary");
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getNotifications = function (userId, options) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Notifications/" + userId, options || {});
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.markNotificationsRead = function (userId, idList, isRead) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
|
||||
if (!idList || !idList.length) {
|
||||
throw new Error("null idList");
|
||||
}
|
||||
|
||||
var suffix = isRead ? "Read" : "Unread";
|
||||
|
||||
var params = {
|
||||
UserId: userId,
|
||||
Ids: idList.join(',')
|
||||
};
|
||||
|
||||
var url = self.getUrl("Notifications/" + userId + "/" + suffix, params);
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the current server status
|
||||
*/
|
||||
@@ -1937,7 +1992,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||
if (!item) {
|
||||
throw new Error("null item");
|
||||
}
|
||||
|
||||
|
||||
var url = self.getUrl("Artists/" + self.encodeName(item.Name));
|
||||
|
||||
return self.ajax({
|
||||
|
||||
@@ -84,6 +84,9 @@
|
||||
<Content Include="dashboard-ui\boxsets.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\css\notifications.css">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\edititempeople.html">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -354,6 +357,9 @@
|
||||
<Content Include="dashboard-ui\scripts\alphapicker.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\directorybrowser.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\edititempeople.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -375,6 +381,9 @@
|
||||
<Content Include="dashboard-ui\scripts\musicvideos.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\notifications.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="dashboard-ui\scripts\remotecontrol.js">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.131" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.135" targetFramework="net45" />
|
||||
<package id="ServiceStack.Common" version="3.9.54" targetFramework="net45" />
|
||||
<package id="ServiceStack.Text" version="3.9.54" targetFramework="net45" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user