mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
add setting to control import of missing episodes
This commit is contained in:
parent
70df357e1e
commit
3f68882fa8
@ -289,7 +289,9 @@ namespace Emby.Dlna
|
|||||||
var allFiles = _fileSystem.GetFiles(path)
|
var allFiles = _fileSystem.GetFiles(path)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var xmlFies = allFiles
|
var xmlFies = type == DeviceProfileType.System ?
|
||||||
|
new List<FileSystemMetadata>() :
|
||||||
|
allFiles
|
||||||
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
|
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
@ -332,7 +334,7 @@ namespace Emby.Dlna
|
|||||||
|
|
||||||
if (string.Equals(Path.GetExtension(path), ".xml", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(Path.GetExtension(path), ".xml", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var tempProfile = (Emby.Dlna.ProfileSerialization.DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(Emby.Dlna.ProfileSerialization.DeviceProfile), path);
|
var tempProfile = (ProfileSerialization.DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(Emby.Dlna.ProfileSerialization.DeviceProfile), path);
|
||||||
|
|
||||||
var json = _jsonSerializer.SerializeToString(tempProfile);
|
var json = _jsonSerializer.SerializeToString(tempProfile);
|
||||||
profile = (DeviceProfile)_jsonSerializer.DeserializeFromString<DeviceProfile>(json);
|
profile = (DeviceProfile)_jsonSerializer.DeserializeFromString<DeviceProfile>(json);
|
||||||
|
@ -30,8 +30,8 @@ namespace Emby.Dlna.Profiles
|
|||||||
MaxIconWidth = 48;
|
MaxIconWidth = 48;
|
||||||
MaxIconHeight = 48;
|
MaxIconHeight = 48;
|
||||||
|
|
||||||
MaxStreamingBitrate = 20000000;
|
MaxStreamingBitrate = 24000000;
|
||||||
MaxStaticBitrate = 20000000;
|
MaxStaticBitrate = 24000000;
|
||||||
MusicStreamingTranscodingBitrate = 192000;
|
MusicStreamingTranscodingBitrate = 192000;
|
||||||
|
|
||||||
EnableAlbumArtInDidl = false;
|
EnableAlbumArtInDidl = false;
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
{"Name":"Dish Hopper-Joey","Identification":{"Manufacturer":"Echostar Technologies LLC","ManufacturerUrl":"http://www.echostar.com","Headers":[{"Name":"User-Agent","Value":"XiP","Match":"Substring"}]},"Manufacturer":"Emby","ManufacturerUrl":"http://emby.media/","ModelName":"Emby Server","ModelDescription":"Emby","ModelNumber":"Emby","ModelUrl":"http://emby.media/","EnableAlbumArtInDidl":false,"EnableSingleAlbumArtLimit":false,"EnableSingleSubtitleLimit":false,"SupportedMediaTypes":"Audio,Photo,Video","AlbumArtPn":"JPEG_SM","MaxAlbumArtWidth":480,"MaxAlbumArtHeight":480,"MaxIconWidth":48,"MaxIconHeight":48,"MaxStreamingBitrate":20000000,"MaxStaticBitrate":20000000,"MusicStreamingTranscodingBitrate":192000,"XDlnaDoc":"DMS-1.50","ProtocolInfo":"http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*","TimelineOffsetSeconds":0,"RequiresPlainVideoItems":false,"RequiresPlainFolders":false,"EnableMSMediaReceiverRegistrar":false,"IgnoreTranscodeByteRangeRequests":false,"XmlRootAttributes":[],"DirectPlayProfiles":[{"Container":"mp4,mkv,mpeg,ts","AudioCodec":"mp3,ac3,aac,he-aac,pcm","VideoCodec":"h264,mpeg2video","Type":"Video"},{"Container":"mp3","AudioCodec":"mp3","Type":"Audio"},{"Container":"alac","AudioCodec":"alac","Type":"Audio"},{"Container":"flac","AudioCodec":"flac","Type":"Audio"},{"Container":"jpeg","Type":"Photo"}],"TranscodingProfiles":[{"Container":"mp3","Type":"Audio","AudioCodec":"mp3","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false},{"Container":"mp4","Type":"Video","VideoCodec":"h264","AudioCodec":"aac","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false},{"Container":"jpeg","Type":"Photo","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false}],"ContainerProfiles":[],"CodecProfiles":[{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"1920","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"1080","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"30","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoBitrate","Value":"20000000","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoLevel","Value":"41","IsRequired":true}],"ApplyConditions":[],"Codec":"h264"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"1920","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"1080","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"30","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoBitrate","Value":"20000000","IsRequired":true}],"ApplyConditions":[]},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"ac3,he-aac"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"2","IsRequired":true}],"ApplyConditions":[],"Codec":"aac"}],"ResponseProfiles":[{"Container":"mkv,ts","Type":"Video","MimeType":"video/mp4","Conditions":[]}],"SubtitleProfiles":[{"Format":"srt","Method":"Embed"}]}
|
{"Name":"Dish Hopper-Joey","Identification":{"Manufacturer":"Echostar Technologies LLC","ManufacturerUrl":"http://www.echostar.com","Headers":[{"Name":"User-Agent","Value":"XiP","Match":"Substring"}]},"Manufacturer":"Emby","ManufacturerUrl":"http://emby.media/","ModelName":"Emby Server","ModelDescription":"Emby","ModelNumber":"Emby","ModelUrl":"http://emby.media/","EnableAlbumArtInDidl":false,"EnableSingleAlbumArtLimit":false,"EnableSingleSubtitleLimit":false,"SupportedMediaTypes":"Audio,Photo,Video","AlbumArtPn":"JPEG_SM","MaxAlbumArtWidth":480,"MaxAlbumArtHeight":480,"MaxIconWidth":48,"MaxIconHeight":48,"MaxStreamingBitrate":24000000,"MaxStaticBitrate":24000000,"MusicStreamingTranscodingBitrate":192000,"XDlnaDoc":"DMS-1.50","ProtocolInfo":"http-get:*:video/mp2t:*,http-get:*:video/MP1S:*,http-get:*:video/mpeg2:*,http-get:*:video/mp4:*,http-get:*:video/x-matroska:*,http-get:*:audio/mpeg:*,http-get:*:audio/mpeg3:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/mp4a-latm:*,http-get:*:image/jpeg:*","TimelineOffsetSeconds":0,"RequiresPlainVideoItems":false,"RequiresPlainFolders":false,"EnableMSMediaReceiverRegistrar":false,"IgnoreTranscodeByteRangeRequests":false,"XmlRootAttributes":[],"DirectPlayProfiles":[{"Container":"mp4,mkv,mpeg,ts","AudioCodec":"mp3,ac3,aac,he-aac,pcm","VideoCodec":"h264,mpeg2video","Type":"Video"},{"Container":"mp3","AudioCodec":"mp3","Type":"Audio"},{"Container":"alac","AudioCodec":"alac","Type":"Audio"},{"Container":"flac","AudioCodec":"flac","Type":"Audio"},{"Container":"jpeg","Type":"Photo"}],"TranscodingProfiles":[{"Container":"mp3","Type":"Audio","AudioCodec":"mp3","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false},{"Container":"mp4","Type":"Video","VideoCodec":"h264","AudioCodec":"aac","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false},{"Container":"jpeg","Type":"Photo","EstimateContentLength":false,"EnableMpegtsM2TsMode":false,"TranscodeSeekInfo":"Auto","CopyTimestamps":false,"Context":"Streaming","EnableSubtitlesInManifest":false,"EnableSplittingOnNonKeyFrames":false}],"ContainerProfiles":[],"CodecProfiles":[{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"1920","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"1080","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"30","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoBitrate","Value":"20000000","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoLevel","Value":"41","IsRequired":true}],"ApplyConditions":[],"Codec":"h264"},{"Type":"Video","Conditions":[{"Condition":"LessThanEqual","Property":"Width","Value":"1920","IsRequired":true},{"Condition":"LessThanEqual","Property":"Height","Value":"1080","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoFramerate","Value":"30","IsRequired":true},{"Condition":"LessThanEqual","Property":"VideoBitrate","Value":"20000000","IsRequired":true}],"ApplyConditions":[]},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"6","IsRequired":true}],"ApplyConditions":[],"Codec":"ac3,he-aac"},{"Type":"VideoAudio","Conditions":[{"Condition":"LessThanEqual","Property":"AudioChannels","Value":"2","IsRequired":true}],"ApplyConditions":[],"Codec":"aac"}],"ResponseProfiles":[{"Container":"mkv,ts","Type":"Video","MimeType":"video/mp4","Conditions":[]}],"SubtitleProfiles":[{"Format":"srt","Method":"Embed"}]}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -95,13 +95,13 @@ namespace Emby.Server.Implementations.Data
|
|||||||
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
|
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
|
||||||
}
|
}
|
||||||
|
|
||||||
//protected override bool AllowLockRecursion
|
protected override bool AllowLockRecursion
|
||||||
//{
|
{
|
||||||
// get
|
get
|
||||||
// {
|
{
|
||||||
// return true;
|
return true;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
private const string ChaptersTableName = "Chapters2";
|
private const string ChaptersTableName = "Chapters2";
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
public bool SaveLocalMetadata { get; set; }
|
public bool SaveLocalMetadata { get; set; }
|
||||||
public bool EnableInternetProviders { get; set; }
|
public bool EnableInternetProviders { get; set; }
|
||||||
|
public bool ImportMissingEpisodes { get; set; }
|
||||||
|
|
||||||
public LibraryOptions()
|
public LibraryOptions()
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,7 @@ namespace MediaBrowser.Model.Configuration
|
|||||||
|
|
||||||
HidePlayedInLatest = true;
|
HidePlayedInLatest = true;
|
||||||
PlayDefaultAudioTrack = true;
|
PlayDefaultAudioTrack = true;
|
||||||
|
DisplayMissingEpisodes = true;
|
||||||
|
|
||||||
LatestItemsExcludes = new string[] { };
|
LatestItemsExcludes = new string[] { };
|
||||||
OrderedViews = new string[] { };
|
OrderedViews = new string[] { };
|
||||||
|
@ -120,10 +120,13 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
var hasBadData = HasInvalidContent(seriesList);
|
var hasBadData = HasInvalidContent(seriesList);
|
||||||
|
|
||||||
|
// Be conservative here to avoid creating missing episodes for ones they already have
|
||||||
|
var addMissingEpisodes = !hasBadData && seriesList.All(i => _libraryManager.GetLibraryOptions(i).ImportMissingEpisodes);
|
||||||
|
|
||||||
var anySeasonsRemoved = await RemoveObsoleteOrMissingSeasons(seriesList, episodeLookup)
|
var anySeasonsRemoved = await RemoveObsoleteOrMissingSeasons(seriesList, episodeLookup)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(seriesList, episodeLookup)
|
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(seriesList, episodeLookup, addMissingEpisodes)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
var hasNewEpisodes = false;
|
var hasNewEpisodes = false;
|
||||||
@ -134,7 +137,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (seriesConfig == null || !seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
if (seriesConfig == null || !seriesConfig.DisabledMetadataFetchers.Contains(TvdbSeriesProvider.Current.Name, StringComparer.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
hasNewEpisodes = await AddMissingEpisodes(seriesList, hasBadData, seriesDataPath, episodeLookup, cancellationToken)
|
hasNewEpisodes = await AddMissingEpisodes(seriesList, addMissingEpisodes, seriesDataPath, episodeLookup, cancellationToken)
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -180,13 +183,9 @@ namespace MediaBrowser.Providers.TV
|
|||||||
/// Adds the missing episodes.
|
/// Adds the missing episodes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="series">The series.</param>
|
/// <param name="series">The series.</param>
|
||||||
/// <param name="seriesHasBadData">if set to <c>true</c> [series has bad data].</param>
|
|
||||||
/// <param name="seriesDataPath">The series data path.</param>
|
|
||||||
/// <param name="episodeLookup">The episode lookup.</param>
|
|
||||||
/// <param name="cancellationToken">The cancellation token.</param>
|
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
private async Task<bool> AddMissingEpisodes(List<Series> series,
|
private async Task<bool> AddMissingEpisodes(List<Series> series,
|
||||||
bool seriesHasBadData,
|
bool addMissingEpisodes,
|
||||||
string seriesDataPath,
|
string seriesDataPath,
|
||||||
IEnumerable<Tuple<int, int>> episodeLookup,
|
IEnumerable<Tuple<int, int>> episodeLookup,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
@ -240,8 +239,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
if (airDate.Value < now)
|
if (airDate.Value < now)
|
||||||
{
|
{
|
||||||
// Be conservative here to avoid creating missing episodes for ones they already have
|
if (addMissingEpisodes)
|
||||||
if (!seriesHasBadData)
|
|
||||||
{
|
{
|
||||||
// tvdb has a lot of nearly blank episodes
|
// tvdb has a lot of nearly blank episodes
|
||||||
_logger.Info("Creating virtual missing episode {0} {1}x{2}", targetSeries.Name, tuple.Item1, tuple.Item2);
|
_logger.Info("Creating virtual missing episode {0} {1}x{2}", targetSeries.Name, tuple.Item1, tuple.Item2);
|
||||||
@ -278,7 +276,8 @@ namespace MediaBrowser.Providers.TV
|
|||||||
/// Removes the virtual entry after a corresponding physical version has been added
|
/// Removes the virtual entry after a corresponding physical version has been added
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task<bool> RemoveObsoleteOrMissingEpisodes(IEnumerable<Series> series,
|
private async Task<bool> RemoveObsoleteOrMissingEpisodes(IEnumerable<Series> series,
|
||||||
IEnumerable<Tuple<int, int>> episodeLookup)
|
IEnumerable<Tuple<int, int>> episodeLookup,
|
||||||
|
bool allowMissingEpisodes)
|
||||||
{
|
{
|
||||||
var existingEpisodes = (from s in series
|
var existingEpisodes = (from s in series
|
||||||
let seasonOffset = TvdbSeriesProvider.GetSeriesOffset(s.ProviderIds) ?? ((s.AnimeSeriesIndex ?? 1) - 1)
|
let seasonOffset = TvdbSeriesProvider.GetSeriesOffset(s.ProviderIds) ?? ((s.AnimeSeriesIndex ?? 1) - 1)
|
||||||
@ -316,6 +315,11 @@ namespace MediaBrowser.Providers.TV
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!allowMissingEpisodes && i.Episode.IsMissingEpisode)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user