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

switch methods to fetch

This commit is contained in:
Luke Pulverenti 2015-11-27 20:18:15 -05:00
parent 6acc4bf69d
commit dd09b038d5
91 changed files with 349 additions and 314 deletions

View file

@ -53,7 +53,7 @@
self.play = function (options) {
Dashboard.getCurrentUser().done(function (user) {
Dashboard.getCurrentUser().then(function (user) {
if (options.items) {
@ -65,7 +65,7 @@
Ids: options.ids.join(',')
}).done(function (result) {
}).then(function (result) {
options.items = result.Items;
self.playWithCommand(options, 'PlayNow');
@ -80,7 +80,7 @@
self.playWithCommand = function (options, command) {
if (!options.items) {
ApiClient.getItem(Dashboard.getCurrentUserId(), options.ids[0]).done(function (item) {
ApiClient.getItem(Dashboard.getCurrentUserId(), options.ids[0]).then(function (item) {
options.items = [item];
self.playWithCommand(options, command);
@ -220,7 +220,7 @@
var userId = Dashboard.getCurrentUserId();
ApiClient.getItem(userId, id).done(function (item) {
ApiClient.getItem(userId, id).then(function (item) {
self.playWithCommand({
@ -236,7 +236,7 @@
var userId = Dashboard.getCurrentUserId();
ApiClient.getItem(userId, id).done(function (item) {
ApiClient.getItem(userId, id).then(function (item) {
self.playWithCommand({