commit
8ec9b73eae
|
@ -135,12 +135,9 @@ namespace MediaBrowser.Api.Movies
|
|||
IncludeItemTypes = new[] { typeof(Movie).Name }
|
||||
};
|
||||
|
||||
if (user.Configuration.IncludeTrailersInSuggestions)
|
||||
{
|
||||
var includeList = query.IncludeItemTypes.ToList();
|
||||
includeList.Add(typeof(Trailer).Name);
|
||||
query.IncludeItemTypes = includeList.ToArray();
|
||||
}
|
||||
|
||||
var parentIds = string.IsNullOrWhiteSpace(request.ParentId) ? new string[] { } : new[] { request.ParentId };
|
||||
var movies = _libraryManager.GetItemList(query, parentIds)
|
||||
|
@ -188,12 +185,9 @@ namespace MediaBrowser.Api.Movies
|
|||
IncludeItemTypes = new[] { typeof(Movie).Name }
|
||||
};
|
||||
|
||||
if (user == null || user.Configuration.IncludeTrailersInSuggestions)
|
||||
{
|
||||
var includeList = query.IncludeItemTypes.ToList();
|
||||
includeList.Add(typeof(Trailer).Name);
|
||||
query.IncludeItemTypes = includeList.ToArray();
|
||||
}
|
||||
|
||||
var list = _libraryManager.GetItemList(query)
|
||||
.OrderBy(i => (int)i.SourceType)
|
||||
|
|
|
@ -26,6 +26,7 @@ using System.Threading.Tasks;
|
|||
using CommonIO;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using MediaBrowser.Model.Providers;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
@ -2212,5 +2213,10 @@ namespace MediaBrowser.Controller.Entities
|
|||
DeleteFileLocation = false
|
||||
});
|
||||
}
|
||||
|
||||
public virtual List<ExternalUrl> GetRelatedUrls()
|
||||
{
|
||||
return new List<ExternalUrl>();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ using System.Runtime.Serialization;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Model.Providers;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities.Movies
|
||||
{
|
||||
|
@ -163,5 +164,22 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
|
||||
return hasChanges;
|
||||
}
|
||||
|
||||
public override List<ExternalUrl> GetRelatedUrls()
|
||||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||
using System.Globalization;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Controller.Entities.Movies;
|
||||
using MediaBrowser.Model.Providers;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
|
@ -110,5 +111,22 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
return hasChanges;
|
||||
}
|
||||
|
||||
public override List<ExternalUrl> GetRelatedUrls()
|
||||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Providers;
|
||||
|
||||
namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
|
@ -235,5 +236,25 @@ namespace MediaBrowser.Controller.LiveTv
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override List<ExternalUrl> GetRelatedUrls()
|
||||
{
|
||||
var list = base.GetRelatedUrls();
|
||||
|
||||
var imdbId = this.GetProviderId(MetadataProviders.Imdb);
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
{
|
||||
if (IsMovie)
|
||||
{
|
||||
list.Add(new ExternalUrl
|
||||
{
|
||||
Name = "Trakt",
|
||||
Url = string.Format("https://trakt.tv/movies/{0}", imdbId)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ namespace MediaBrowser.Controller.Providers
|
|||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <returns>IEnumerable{ExternalUrl}.</returns>
|
||||
IEnumerable<ExternalUrl> GetExternalUrls(IHasProviderIds item);
|
||||
IEnumerable<ExternalUrl> GetExternalUrls(BaseItem item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the external identifier infos.
|
||||
|
|
|
@ -39,8 +39,6 @@ namespace MediaBrowser.Model.Configuration
|
|||
|
||||
public string[] OrderedViews { get; set; }
|
||||
|
||||
public bool IncludeTrailersInSuggestions { get; set; }
|
||||
|
||||
public string[] LatestItemsExcludes { get; set; }
|
||||
public string[] PlainFolderViews { get; set; }
|
||||
|
||||
|
@ -68,8 +66,6 @@ namespace MediaBrowser.Model.Configuration
|
|||
|
||||
PlainFolderViews = new string[] { };
|
||||
|
||||
IncludeTrailersInSuggestions = true;
|
||||
|
||||
GroupedFolders = new string[] { };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -830,7 +830,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
});
|
||||
}
|
||||
|
||||
public IEnumerable<ExternalUrl> GetExternalUrls(IHasProviderIds item)
|
||||
public IEnumerable<ExternalUrl> GetExternalUrls(BaseItem item)
|
||||
{
|
||||
return GetExternalIds(item)
|
||||
.Select(i =>
|
||||
|
@ -853,7 +853,7 @@ namespace MediaBrowser.Providers.Manager
|
|||
Url = string.Format(i.UrlFormatString, value)
|
||||
};
|
||||
|
||||
}).Where(i => i != null);
|
||||
}).Where(i => i != null).Concat(item.GetRelatedUrls());
|
||||
}
|
||||
|
||||
public IEnumerable<ExternalIdInfo> GetExternalIdInfos(IHasProviderIds item)
|
||||
|
|
|
@ -548,9 +548,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
{
|
||||
PostPaddingSeconds = Math.Max(config.PostPaddingSeconds, 0),
|
||||
PrePaddingSeconds = Math.Max(config.PrePaddingSeconds, 0),
|
||||
RecordAnyChannel = false,
|
||||
RecordAnyTime = false,
|
||||
RecordNewOnly = false
|
||||
RecordAnyChannel = true,
|
||||
RecordAnyTime = true,
|
||||
RecordNewOnly = false,
|
||||
|
||||
Days = new List<DayOfWeek>
|
||||
{
|
||||
DayOfWeek.Sunday,
|
||||
DayOfWeek.Monday,
|
||||
DayOfWeek.Tuesday,
|
||||
DayOfWeek.Wednesday,
|
||||
DayOfWeek.Thursday,
|
||||
DayOfWeek.Friday,
|
||||
DayOfWeek.Saturday
|
||||
}
|
||||
};
|
||||
|
||||
if (program != null)
|
||||
|
@ -1215,6 +1226,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
if (!seriesTimer.RecordAnyTime)
|
||||
{
|
||||
allPrograms = allPrograms.Where(epg => Math.Abs(seriesTimer.StartDate.TimeOfDay.Ticks - epg.StartDate.TimeOfDay.Ticks) < TimeSpan.FromMinutes(5).Ticks);
|
||||
|
||||
allPrograms = allPrograms.Where(i => seriesTimer.Days.Contains(i.StartDate.ToLocalTime().DayOfWeek));
|
||||
}
|
||||
|
||||
if (seriesTimer.RecordNewOnly)
|
||||
|
@ -1227,8 +1240,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||
allPrograms = allPrograms.Where(epg => string.Equals(epg.ChannelId, seriesTimer.ChannelId, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
allPrograms = allPrograms.Where(i => seriesTimer.Days.Contains(i.StartDate.ToLocalTime().DayOfWeek));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(seriesTimer.SeriesId))
|
||||
{
|
||||
_logger.Error("seriesTimer.SeriesId is null. Cannot find programs for series");
|
||||
|
|
|
@ -248,7 +248,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||
"create index if not exists idx_PresentationUniqueKey on TypedBaseItems(PresentationUniqueKey)",
|
||||
"create index if not exists idx_Type on TypedBaseItems(Type)",
|
||||
"create index if not exists idx_TopParentId on TypedBaseItems(TopParentId)",
|
||||
//"create index if not exists idx_TypeTopParentId on TypedBaseItems(Type,TopParentId)"
|
||||
"create index if not exists idx_TypeTopParentId on TypedBaseItems(Type,TopParentId)"
|
||||
};
|
||||
|
||||
_connection.RunQueries(postQueries, Logger);
|
||||
|
|
|
@ -483,6 +483,11 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
|
||||
private async Task ProcessJobItem(SyncJobItem jobItem, bool enableConversion, IProgress<double> progress, CancellationToken cancellationToken)
|
||||
{
|
||||
if (jobItem == null)
|
||||
{
|
||||
throw new ArgumentNullException("jobItem");
|
||||
}
|
||||
|
||||
var item = _libraryManager.GetItemById(jobItem.ItemId);
|
||||
if (item == null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user