mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update client sync
This commit is contained in:
parent
0db16cad5a
commit
8bf9a6f51e
12 changed files with 133 additions and 206 deletions
|
@ -852,27 +852,36 @@
|
|||
|
||||
self.supportsDirectPlay = function (mediaSource) {
|
||||
|
||||
var deferred = $.Deferred();
|
||||
if (mediaSource.SupportsDirectPlay) {
|
||||
|
||||
if (mediaSource.Protocol == 'Http' && !mediaSource.RequiredHttpHeaders.length) {
|
||||
|
||||
// If this is the only way it can be played, then allow it
|
||||
if (!mediaSource.SupportsDirectStream && !mediaSource.SupportsTranscoding) {
|
||||
return true;
|
||||
deferred.resolveWith(null, [true]);
|
||||
}
|
||||
else {
|
||||
var val = mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(ApiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) == 0;
|
||||
deferred.resolveWith(null, [val]);
|
||||
}
|
||||
|
||||
return mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(ApiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) == 0;
|
||||
}
|
||||
|
||||
if (mediaSource.Protocol == 'File') {
|
||||
|
||||
var exists = FileSystemBridge.fileExists(mediaSource.Path);
|
||||
Logger.log('FileSystemBridge.fileExists: path: ' + mediaSource.Path + ' result: ' + exists);
|
||||
return exists;
|
||||
require(['localassetmanager'], function () {
|
||||
|
||||
LocalAssetManager.fileExists(mediaSource.Path).done(function (exists) {
|
||||
Logger.log('LocalAssetManager.fileExists: path: ' + mediaSource.Path + ' result: ' + exists);
|
||||
deferred.resolveWith(null, [exists]);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
else {
|
||||
deferred.resolveWith(null, [false]);
|
||||
}
|
||||
return deferred.promise();
|
||||
};
|
||||
|
||||
self.showPlayerSelection = showPlayerSelection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue