mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge branch 'dev' of https://github.com/MediaBrowser/MediaBrowser into dev
This commit is contained in:
commit
33f633d37a
@ -389,22 +389,28 @@ namespace MediaBrowser.Api
|
||||
game.PlayersSupported = request.Players;
|
||||
}
|
||||
|
||||
var hasAlbumArtists = item as IHasAlbumArtist;
|
||||
if (hasAlbumArtists != null)
|
||||
if (request.AlbumArtists != null)
|
||||
{
|
||||
hasAlbumArtists.AlbumArtists = request
|
||||
.AlbumArtists
|
||||
.Select(i => i.Name)
|
||||
.ToList();
|
||||
var hasAlbumArtists = item as IHasAlbumArtist;
|
||||
if (hasAlbumArtists != null)
|
||||
{
|
||||
hasAlbumArtists.AlbumArtists = request
|
||||
.AlbumArtists
|
||||
.Select(i => i.Name)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
var hasArtists = item as IHasArtist;
|
||||
if (hasArtists != null)
|
||||
if (request.ArtistItems != null)
|
||||
{
|
||||
hasArtists.Artists = request
|
||||
.ArtistItems
|
||||
.Select(i => i.Name)
|
||||
.ToList();
|
||||
var hasArtists = item as IHasArtist;
|
||||
if (hasArtists != null)
|
||||
{
|
||||
hasArtists.Artists = request
|
||||
.ArtistItems
|
||||
.Select(i => i.Name)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
var song = item as Audio;
|
||||
|
@ -233,6 +233,12 @@ namespace MediaBrowser.Server.Implementations.Devices
|
||||
}
|
||||
|
||||
var user = _userManager.GetUserById(userId);
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
throw new ArgumentException("user not found");
|
||||
}
|
||||
|
||||
if (!CanAccessDevice(user.Policy, deviceId))
|
||||
{
|
||||
var capabilities = GetCapabilities(deviceId);
|
||||
|
@ -17,6 +17,7 @@ using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System;
|
||||
|
@ -1,10 +1,12 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -21,13 +23,15 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
private readonly ILogger _logger;
|
||||
private readonly IMediaSourceManager _mediaSourceManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
private readonly IServerApplicationHost _appHost;
|
||||
|
||||
public LiveTvMediaSourceProvider(ILiveTvManager liveTvManager, IJsonSerializer jsonSerializer, ILogManager logManager, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder)
|
||||
public LiveTvMediaSourceProvider(ILiveTvManager liveTvManager, IJsonSerializer jsonSerializer, ILogManager logManager, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder, IServerApplicationHost appHost)
|
||||
{
|
||||
_liveTvManager = liveTvManager;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_mediaSourceManager = mediaSourceManager;
|
||||
_mediaEncoder = mediaEncoder;
|
||||
_appHost = appHost;
|
||||
_logger = logManager.GetLogger(GetType().Name);
|
||||
}
|
||||
|
||||
@ -74,6 +78,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
}
|
||||
|
||||
var list = sources.ToList();
|
||||
var serverUrl = _appHost.LocalApiUrl;
|
||||
|
||||
foreach (var source in list)
|
||||
{
|
||||
@ -86,6 +91,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
openKeys.Add(item.Id.ToString("N"));
|
||||
openKeys.Add(source.Id ?? string.Empty);
|
||||
source.OpenToken = string.Join("|", openKeys.ToArray());
|
||||
|
||||
// Dummy this up so that direct play checks can still run
|
||||
if (string.IsNullOrEmpty(source.Path) && source.Protocol == MediaProtocol.Http)
|
||||
{
|
||||
source.Path = serverUrl;
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Debug("MediaSources: {0}", _jsonSerializer.SerializeToString(list));
|
||||
@ -187,7 +198,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Try to estimate this
|
||||
if (!mediaSource.Bitrate.HasValue)
|
||||
{
|
||||
|
@ -458,6 +458,13 @@ namespace MediaBrowser.Server.Implementations.Sync
|
||||
|
||||
var syncOptions = _config.GetSyncOptions();
|
||||
var user = _userManager.GetUserById(job.UserId);
|
||||
if (user == null)
|
||||
{
|
||||
jobItem.Status = SyncJobItemStatus.Failed;
|
||||
_logger.Error("User not found. Cannot complete the sync job.");
|
||||
await _syncManager.UpdateSyncJobItemInternal(jobItem).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
var video = item as Video;
|
||||
if (video != null)
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Localization;
|
||||
using MediaBrowser.Model.Logging;
|
||||
@ -560,7 +559,6 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"nowplayingpage.js",
|
||||
"taskbutton.js",
|
||||
|
||||
"ratingdialog.js",
|
||||
"alphapicker.js",
|
||||
"addpluginpage.js",
|
||||
"metadataadvanced.js",
|
||||
@ -580,7 +578,6 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"dlnaserversettings.js",
|
||||
"editcollectionitems.js",
|
||||
"edititemmetadata.js",
|
||||
"edititemimages.js",
|
||||
"edititemsubtitles.js",
|
||||
|
||||
"playbackconfiguration.js",
|
||||
@ -649,9 +646,7 @@ namespace MediaBrowser.WebDashboard.Api
|
||||
"wizardagreement.js",
|
||||
"wizardfinishpage.js",
|
||||
"wizardservice.js",
|
||||
"wizardstartpage.js",
|
||||
"wizardsettings.js",
|
||||
"wizarduserpage.js"
|
||||
"wizardstartpage.js"
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user