mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 01:28:27 +01:00
update to latest js api client
This commit is contained in:
@@ -1572,6 +1572,30 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Reports the user has started playing something
|
||||
* @param {String} userId
|
||||
* @param {String} itemId
|
||||
*/
|
||||
self.reportPlaybackStart = function (userId, itemId) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
}
|
||||
|
||||
if (!itemId) {
|
||||
throw new Error("null itemId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Users/" + userId + "/PlayingItems/" + itemId);
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Reports progress viewing an item
|
||||
* @param {String} userId
|
||||
|
||||
Reference in New Issue
Block a user