commit
22e0df5349
|
@ -202,14 +202,19 @@ namespace MediaBrowser.Api
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
Logger.Info("Setting provider id's to item {0}-{1}: {2}", item.Id, item.Name, _json.SerializeToString(request.ProviderIds));
|
Logger.Info("Setting provider id's to item {0}-{1}: {2}", item.Id, item.Name, _json.SerializeToString(request.ProviderIds));
|
||||||
|
|
||||||
|
// Since the refresh process won't erase provider Ids, we need to set this explicitly now.
|
||||||
item.ProviderIds = request.ProviderIds;
|
item.ProviderIds = request.ProviderIds;
|
||||||
|
//item.ProductionYear = request.ProductionYear;
|
||||||
|
//item.Name = request.Name;
|
||||||
|
|
||||||
var task = _providerManager.RefreshFullItem(item, new MetadataRefreshOptions(_fileSystem)
|
var task = _providerManager.RefreshFullItem(item, new MetadataRefreshOptions(_fileSystem)
|
||||||
{
|
{
|
||||||
MetadataRefreshMode = MetadataRefreshMode.FullRefresh,
|
MetadataRefreshMode = MetadataRefreshMode.FullRefresh,
|
||||||
ImageRefreshMode = ImageRefreshMode.FullRefresh,
|
ImageRefreshMode = ImageRefreshMode.FullRefresh,
|
||||||
ReplaceAllMetadata = true,
|
ReplaceAllMetadata = true,
|
||||||
ReplaceAllImages = request.ReplaceAllImages
|
ReplaceAllImages = request.ReplaceAllImages,
|
||||||
|
SearchResult = request
|
||||||
|
|
||||||
}, CancellationToken.None);
|
}, CancellationToken.None);
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace MediaBrowser.Controller.Channels
|
||||||
Name = id,
|
Name = id,
|
||||||
Id = id,
|
Id = id,
|
||||||
ReadAtNativeFramerate = ReadAtNativeFramerate,
|
ReadAtNativeFramerate = ReadAtNativeFramerate,
|
||||||
SupportsDirectStream = Protocol == MediaProtocol.File || Protocol == MediaProtocol.Http,
|
SupportsDirectStream = Protocol == MediaProtocol.File,
|
||||||
SupportsDirectPlay = SupportsDirectPlay
|
SupportsDirectPlay = SupportsDirectPlay
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
|
using MediaBrowser.Model.Providers;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Providers
|
namespace MediaBrowser.Controller.Providers
|
||||||
{
|
{
|
||||||
|
@ -13,6 +14,7 @@ namespace MediaBrowser.Controller.Providers
|
||||||
public bool IsPostRecursiveRefresh { get; set; }
|
public bool IsPostRecursiveRefresh { get; set; }
|
||||||
|
|
||||||
public MetadataRefreshMode MetadataRefreshMode { get; set; }
|
public MetadataRefreshMode MetadataRefreshMode { get; set; }
|
||||||
|
public RemoteSearchResult SearchResult { get; set; }
|
||||||
|
|
||||||
public bool ForceSave { get; set; }
|
public bool ForceSave { get; set; }
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ namespace MediaBrowser.Controller.Providers
|
||||||
ImageRefreshMode = copy.ImageRefreshMode;
|
ImageRefreshMode = copy.ImageRefreshMode;
|
||||||
ReplaceAllImages = copy.ReplaceAllImages;
|
ReplaceAllImages = copy.ReplaceAllImages;
|
||||||
ReplaceImages = copy.ReplaceImages.ToList();
|
ReplaceImages = copy.ReplaceImages.ToList();
|
||||||
|
SearchResult = copy.SearchResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -978,9 +978,12 @@ namespace MediaBrowser.Dlna.Didl
|
||||||
item = item.GetParents().FirstOrDefault(i => i.HasImage(ImageType.Primary));
|
item = item.GetParents().FirstOrDefault(i => i.HasImage(ImageType.Primary));
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
{
|
||||||
|
if (item.HasImage(ImageType.Primary))
|
||||||
{
|
{
|
||||||
return GetImageInfo(item, ImageType.Primary);
|
return GetImageInfo(item, ImageType.Primary);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ using System.Threading.Tasks;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
using MediaBrowser.Model.Providers;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.Manager
|
namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
|
@ -136,6 +137,11 @@ namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
var id = itemOfType.GetLookupInfo();
|
var id = itemOfType.GetLookupInfo();
|
||||||
|
|
||||||
|
if (refreshOptions.SearchResult != null)
|
||||||
|
{
|
||||||
|
ApplySearchResult(id, refreshOptions.SearchResult);
|
||||||
|
}
|
||||||
|
|
||||||
//await FindIdentities(id, cancellationToken).ConfigureAwait(false);
|
//await FindIdentities(id, cancellationToken).ConfigureAwait(false);
|
||||||
id.IsAutomated = refreshOptions.IsAutomated;
|
id.IsAutomated = refreshOptions.IsAutomated;
|
||||||
|
|
||||||
|
@ -207,6 +213,13 @@ namespace MediaBrowser.Providers.Manager
|
||||||
return updateType;
|
return updateType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ApplySearchResult(ItemLookupInfo lookupInfo, RemoteSearchResult result)
|
||||||
|
{
|
||||||
|
lookupInfo.ProviderIds = result.ProviderIds;
|
||||||
|
lookupInfo.Name = result.Name;
|
||||||
|
lookupInfo.Year = result.ProductionYear;
|
||||||
|
}
|
||||||
|
|
||||||
private async Task FindIdentities(TIdType id, CancellationToken cancellationToken)
|
private async Task FindIdentities(TIdType id, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -60,9 +60,8 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
return GetSearchResultsInternal(searchInfo, type, true, cancellationToken);
|
return GetSearchResultsInternal(searchInfo, type, true, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<IEnumerable<RemoteSearchResult>> GetSearchResultsInternal(ItemLookupInfo searchInfo, string type, bool enableMultipleResults, CancellationToken cancellationToken)
|
private async Task<IEnumerable<RemoteSearchResult>> GetSearchResultsInternal(ItemLookupInfo searchInfo, string type, bool isSearch, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
bool isSearch = false;
|
|
||||||
var episodeSearchInfo = searchInfo as EpisodeInfo;
|
var episodeSearchInfo = searchInfo as EpisodeInfo;
|
||||||
|
|
||||||
var list = new List<RemoteSearchResult>();
|
var list = new List<RemoteSearchResult>();
|
||||||
|
@ -95,10 +94,9 @@ namespace MediaBrowser.Providers.Omdb
|
||||||
}
|
}
|
||||||
|
|
||||||
// &s means search and returns a list of results as opposed to t
|
// &s means search and returns a list of results as opposed to t
|
||||||
if (enableMultipleResults)
|
if (isSearch)
|
||||||
{
|
{
|
||||||
url += "&s=" + WebUtility.UrlEncode(name);
|
url += "&s=" + WebUtility.UrlEncode(name);
|
||||||
isSearch = true;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace MediaBrowser.Providers.People
|
||||||
|
|
||||||
var requestCount = _requestCount;
|
var requestCount = _requestCount;
|
||||||
|
|
||||||
if (requestCount >= 20)
|
if (requestCount >= 30)
|
||||||
{
|
{
|
||||||
//_logger.Debug("Throttling Tmdb people");
|
//_logger.Debug("Throttling Tmdb people");
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,17 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||||
{
|
{
|
||||||
var address = _config.Configuration.WanDdns;
|
var address = _config.Configuration.WanDdns;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(address))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
address = new Uri(address).Host;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null)
|
if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null)
|
||||||
{
|
{
|
||||||
if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6)
|
if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6)
|
||||||
|
|
|
@ -344,6 +344,19 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
LoggerUtils.LogRequest(_logger, urlToLog, httpReq.HttpMethod, httpReq.UserAgent);
|
LoggerUtils.LogRequest(_logger, urlToLog, httpReq.HttpMethod, httpReq.UserAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.Equals(localPath, "/emby/", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
httpRes.RedirectToUrl(DefaultRedirectPath);
|
||||||
|
return Task.FromResult(true);
|
||||||
|
}
|
||||||
|
if (string.Equals(localPath, "/emby", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
|
||||||
|
return Task.FromResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase) ||
|
if (string.Equals(localPath, "/mediabrowser/", StringComparison.OrdinalIgnoreCase) ||
|
||||||
string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
string.Equals(localPath, "/mediabrowser", StringComparison.OrdinalIgnoreCase) ||
|
||||||
localPath.IndexOf("mediabrowser/web", StringComparison.OrdinalIgnoreCase) != -1 ||
|
localPath.IndexOf("mediabrowser/web", StringComparison.OrdinalIgnoreCase) != -1 ||
|
||||||
|
@ -363,16 +376,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(localPath, "/emby/", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
httpRes.RedirectToUrl(DefaultRedirectPath);
|
|
||||||
return Task.FromResult(true);
|
|
||||||
}
|
|
||||||
if (string.Equals(localPath, "/emby", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
|
|
||||||
return Task.FromResult(true);
|
|
||||||
}
|
|
||||||
if (string.Equals(localPath, "/web", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(localPath, "/web", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
httpRes.RedirectToUrl(DefaultRedirectPath);
|
httpRes.RedirectToUrl(DefaultRedirectPath);
|
||||||
|
|
|
@ -352,6 +352,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
users.Add(user);
|
users.Add(user);
|
||||||
|
|
||||||
user.Policy.IsAdministrator = true;
|
user.Policy.IsAdministrator = true;
|
||||||
|
user.Policy.EnableContentDeletion = true;
|
||||||
user.Policy.EnableRemoteControlOfOtherUsers = true;
|
user.Policy.EnableRemoteControlOfOtherUsers = true;
|
||||||
await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false);
|
await UpdateUserPolicy(user, user.Policy, false).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||||
lineup = lineup.Where(i => i.Favorite).ToList();
|
lineup = lineup.Where(i => i.Favorite).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return lineup;
|
return lineup.Where(i => !i.DRM).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2283,7 +2283,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
|
|
||||||
private static Dictionary<string, string[]> GetTypeMapDictionary()
|
private static Dictionary<string, string[]> GetTypeMapDictionary()
|
||||||
{
|
{
|
||||||
var dict = new Dictionary<string, string[]>();
|
var dict = new Dictionary<string, string[]>(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
foreach (var t in KnownTypes)
|
foreach (var t in KnownTypes)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user