3.0.5387 Beta
This commit is contained in:
parent
8e41325dca
commit
0bc84b7d41
|
@ -79,7 +79,7 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||
{
|
||||
if (i is Movie)
|
||||
{
|
||||
return true;
|
||||
return !IsDuplicate(item, i);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -162,7 +162,7 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return !IsDuplicate(item, i.Item);
|
||||
})
|
||||
.OrderByDescending(i => i.Score)
|
||||
.ThenBy(i => Guid.NewGuid())
|
||||
|
@ -172,6 +172,23 @@ namespace MediaBrowser.Server.Implementations.Intros
|
|||
.Concat(customIntros.Take(1));
|
||||
}
|
||||
|
||||
private bool IsDuplicate(BaseItem playingContent, BaseItem test)
|
||||
{
|
||||
var id = playingContent.GetProviderId(MetadataProviders.Imdb);
|
||||
if (!string.IsNullOrWhiteSpace(id) && string.Equals(id, test.GetProviderId(MetadataProviders.Imdb), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
id = playingContent.GetProviderId(MetadataProviders.Tmdb);
|
||||
if (!string.IsNullOrWhiteSpace(id) && string.Equals(id, test.GetProviderId(MetadataProviders.Tmdb), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private CinemaModeConfiguration GetOptions()
|
||||
{
|
||||
return _serverConfig.GetConfiguration<CinemaModeConfiguration>("cinemamode");
|
||||
|
|
|
@ -1417,6 +1417,10 @@ namespace MediaBrowser.Server.Implementations.Session
|
|||
{
|
||||
_jsonSerializer.SerializeToFile(capabilities, path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error saving to {0}", ex, path);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_capabilitiesLock.Release();
|
||||
|
|
Loading…
Reference in New Issue
Block a user