mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Removed unneeded calls to getSortValues on playbackManager calls that only play 1 item
This commit is contained in:
parent
ee791f9d0d
commit
4488a586a4
2 changed files with 2 additions and 30 deletions
|
@ -569,29 +569,6 @@ function deleteSeriesTimer(apiClient, item, resolve, command) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSettingsKey(item) {
|
|
||||||
if (item.IsFolder) {
|
|
||||||
return 'Folder';
|
|
||||||
}
|
|
||||||
const itemType = item.MediaType;
|
|
||||||
switch (itemType) {
|
|
||||||
case 'Movie':
|
|
||||||
case 'BoxSet':
|
|
||||||
case 'Video':
|
|
||||||
return 'movies';
|
|
||||||
case 'Audio':
|
|
||||||
return 'songs';
|
|
||||||
case 'MusicAlbum':
|
|
||||||
return 'musicalbums';
|
|
||||||
case 'MusicArtist':
|
|
||||||
return 'musicartists';
|
|
||||||
case 'MusicGenre':
|
|
||||||
return 'genres';
|
|
||||||
case 'MusicPlaylist':
|
|
||||||
return 'musicplaylists';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function play(item, resume, queue, queueNext) {
|
function play(item, resume, queue, queueNext) {
|
||||||
let method = 'play';
|
let method = 'play';
|
||||||
if (queue) {
|
if (queue) {
|
||||||
|
@ -614,12 +591,9 @@ function play(item, resume, queue, queueNext) {
|
||||||
serverId: item.ServerId
|
serverId: item.ServerId
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const sortParentId = item.IsFolder ? ('items-' + item.Id) : libraryMenu.getTopParentId() + '-' + getSettingsKey(item);
|
|
||||||
const sortValues = userSettings.getSortValues(sortParentId);
|
|
||||||
playbackManager[method]({
|
playbackManager[method]({
|
||||||
items: [item],
|
items: [item],
|
||||||
startPositionTicks: startPosition,
|
startPositionTicks: startPosition
|
||||||
queryOptions: sortValues
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -722,13 +722,11 @@ class ItemsView {
|
||||||
|
|
||||||
function play() {
|
function play() {
|
||||||
const currentItem = self.currentItem;
|
const currentItem = self.currentItem;
|
||||||
const values = self.getSortValues();
|
|
||||||
|
|
||||||
if (currentItem && !self.hasFilters) {
|
if (currentItem && !self.hasFilters) {
|
||||||
playbackManager.play({
|
playbackManager.play({
|
||||||
items: [currentItem],
|
items: [currentItem],
|
||||||
autoplay: true,
|
autoplay: true
|
||||||
queryOptions: values
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getItems(self, self.params, currentItem, null, 0, 300).then(function (result) {
|
getItems(self, self.params, currentItem, null, 0, 300).then(function (result) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue