mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
refactor: decrease the number of iterations
This commit is contained in:
parent
a7bd7e30c6
commit
fe65e0c3b3
2 changed files with 4 additions and 4 deletions
|
@ -1316,11 +1316,11 @@ class PlaybackManager {
|
||||||
|
|
||||||
const profiles = deviceProfile.DirectPlayProfiles || [];
|
const profiles = deviceProfile.DirectPlayProfiles || [];
|
||||||
|
|
||||||
return profiles.filter(function (p) {
|
return profiles.some(function (p) {
|
||||||
return p.Type === 'Video'
|
return p.Type === 'Video'
|
||||||
&& includesAny((p.Container || '').toLowerCase(), container)
|
&& includesAny((p.Container || '').toLowerCase(), container)
|
||||||
&& includesAny((p.AudioCodec || '').toLowerCase(), codec);
|
&& includesAny((p.AudioCodec || '').toLowerCase(), codec);
|
||||||
}).length > 0;
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.setAudioStreamIndex = function (index, player) {
|
self.setAudioStreamIndex = function (index, player) {
|
||||||
|
|
|
@ -617,11 +617,11 @@ function tryRemoveElement(elem) {
|
||||||
|
|
||||||
const profiles = deviceProfile.DirectPlayProfiles || [];
|
const profiles = deviceProfile.DirectPlayProfiles || [];
|
||||||
|
|
||||||
return profiles.filter(function (p) {
|
return profiles.some(function (p) {
|
||||||
return p.Type === 'Video'
|
return p.Type === 'Video'
|
||||||
&& includesAny((p.Container || '').toLowerCase(), container)
|
&& includesAny((p.Container || '').toLowerCase(), container)
|
||||||
&& includesAny((p.AudioCodec || '').toLowerCase(), codec);
|
&& includesAny((p.AudioCodec || '').toLowerCase(), codec);
|
||||||
}).length > 0;
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue