mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
commit
7edcda0216
@ -289,7 +289,9 @@ namespace Emby.Dlna
|
||||
var allFiles = _fileSystem.GetFiles(path)
|
||||
.ToList();
|
||||
|
||||
var xmlFies = allFiles
|
||||
var xmlFies = type == DeviceProfileType.System ?
|
||||
new List<FileSystemMetadata>() :
|
||||
allFiles
|
||||
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
|
||||
@ -332,7 +334,7 @@ namespace Emby.Dlna
|
||||
|
||||
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);
|
||||
profile = (DeviceProfile)_jsonSerializer.DeserializeFromString<DeviceProfile>(json);
|
||||
|
@ -30,8 +30,8 @@ namespace Emby.Dlna.Profiles
|
||||
MaxIconWidth = 48;
|
||||
MaxIconHeight = 48;
|
||||
|
||||
MaxStreamingBitrate = 20000000;
|
||||
MaxStaticBitrate = 20000000;
|
||||
MaxStreamingBitrate = 24000000;
|
||||
MaxStaticBitrate = 24000000;
|
||||
MusicStreamingTranscodingBitrate = 192000;
|
||||
|
||||
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
@ -38,8 +38,6 @@ namespace Emby.Server.Implementations.Data
|
||||
/// </summary>
|
||||
public class SqliteItemRepository : BaseSqliteRepository, IItemRepository
|
||||
{
|
||||
private SQLiteDatabaseConnection _connection;
|
||||
|
||||
private readonly TypeMapper _typeMapper;
|
||||
|
||||
/// <summary>
|
||||
@ -121,15 +119,27 @@ namespace Emby.Server.Implementations.Data
|
||||
}
|
||||
}
|
||||
|
||||
private SQLiteDatabaseConnection _backgroundConnection;
|
||||
protected override void CloseConnection()
|
||||
{
|
||||
base.CloseConnection();
|
||||
|
||||
if (_backgroundConnection != null)
|
||||
{
|
||||
_backgroundConnection.Dispose();
|
||||
_backgroundConnection = null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens the connection to the database
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task Initialize(SqliteUserDataRepository userDataRepo)
|
||||
{
|
||||
_connection = CreateConnection(false);
|
||||
|
||||
_connection.ExecuteAll(string.Join(";", new[]
|
||||
using (var connection = CreateConnection())
|
||||
{
|
||||
connection.ExecuteAll(string.Join(";", new[]
|
||||
{
|
||||
"PRAGMA page_size=4096",
|
||||
"PRAGMA default_temp_store=memory",
|
||||
@ -164,9 +174,9 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
};
|
||||
|
||||
_connection.RunQueries(queries);
|
||||
connection.RunQueries(queries);
|
||||
|
||||
_connection.RunInTransaction(db =>
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
var existingColumnNames = GetColumnNames(db, "AncestorIds");
|
||||
AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
|
||||
@ -350,13 +360,17 @@ namespace Emby.Server.Implementations.Data
|
||||
"create index if not exists idx_ItemValues7 on ItemValues(Type,CleanValue,ItemId)"
|
||||
};
|
||||
|
||||
_connection.RunQueries(postQueries);
|
||||
connection.RunQueries(postQueries);
|
||||
|
||||
//SqliteExtensions.Attach(_connection, Path.Combine(_config.ApplicationPaths.DataPath, "userdata_v2.db"), "UserDataDb");
|
||||
userDataRepo.Initialize(WriteLock);
|
||||
//await Vacuum(_connection).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
userDataRepo.Initialize(WriteLock);
|
||||
|
||||
_backgroundConnection = CreateConnection(true);
|
||||
}
|
||||
|
||||
private readonly string[] _retriveItemColumns =
|
||||
{
|
||||
"type",
|
||||
@ -2127,15 +2141,6 @@ namespace Emby.Server.Implementations.Data
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CloseConnection()
|
||||
{
|
||||
if (_connection != null)
|
||||
{
|
||||
_connection.Dispose();
|
||||
_connection = null;
|
||||
}
|
||||
}
|
||||
|
||||
private bool EnableJoinUserData(InternalItemsQuery query)
|
||||
{
|
||||
if (query.User == null)
|
||||
|
@ -38,6 +38,7 @@ using MediaBrowser.Model.Diagnostics;
|
||||
using MediaBrowser.Model.FileOrganization;
|
||||
using MediaBrowser.Model.System;
|
||||
using MediaBrowser.Model.Threading;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
|
||||
namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
{
|
||||
@ -1550,6 +1551,49 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
// _logger.ErrorException("Error processing new recording", ex);
|
||||
// }
|
||||
//}
|
||||
PostProcessRecording(timer, path);
|
||||
}
|
||||
|
||||
private void PostProcessRecording(TimerInfo timer, string path)
|
||||
{
|
||||
var options = GetConfiguration();
|
||||
if (string.IsNullOrWhiteSpace(options.RecordingPostProcessor))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var process = _processFactory.Create(new ProcessOptions
|
||||
{
|
||||
Arguments = GetPostProcessArguments(path, options.RecordingPostProcessorArguments),
|
||||
CreateNoWindow = true,
|
||||
EnableRaisingEvents = true,
|
||||
ErrorDialog = false,
|
||||
FileName = options.RecordingPostProcessor,
|
||||
IsHidden = true,
|
||||
UseShellExecute = true
|
||||
});
|
||||
|
||||
_logger.Info("Running recording post processor {0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
|
||||
|
||||
process.Exited += Process_Exited;
|
||||
process.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.ErrorException("Error running recording post processor", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetPostProcessArguments(string path, string arguments)
|
||||
{
|
||||
return arguments.Replace("{path}", path, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
private void Process_Exited(object sender, EventArgs e)
|
||||
{
|
||||
((IProcess)sender).Dispose();
|
||||
}
|
||||
|
||||
private void SaveNfo(TimerInfo timer, string recordingPath, string seriesPath)
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
public bool SaveLocalMetadata { get; set; }
|
||||
public bool EnableInternetProviders { get; set; }
|
||||
public bool ImportMissingEpisodes { get; set; }
|
||||
|
||||
public LibraryOptions()
|
||||
{
|
||||
|
@ -57,6 +57,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
HidePlayedInLatest = true;
|
||||
PlayDefaultAudioTrack = true;
|
||||
DisplayMissingEpisodes = true;
|
||||
|
||||
LatestItemsExcludes = new string[] { };
|
||||
OrderedViews = new string[] { };
|
||||
|
@ -26,6 +26,9 @@ namespace MediaBrowser.Model.LiveTv
|
||||
|
||||
public string[] MediaLocationsCreated { get; set; }
|
||||
|
||||
public string RecordingPostProcessor { get; set; }
|
||||
public string RecordingPostProcessorArguments { get; set; }
|
||||
|
||||
public LiveTvOptions()
|
||||
{
|
||||
EnableMovieProviders = true;
|
||||
@ -34,6 +37,7 @@ namespace MediaBrowser.Model.LiveTv
|
||||
ListingProviders = new List<ListingsProviderInfo>();
|
||||
MediaLocationsCreated = new string[] { };
|
||||
RecordingEncodingFormat = "mp4";
|
||||
RecordingPostProcessorArguments = "\"{path}\"";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,10 +120,13 @@ namespace MediaBrowser.Providers.TV
|
||||
|
||||
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)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(seriesList, episodeLookup)
|
||||
var anyEpisodesRemoved = await RemoveObsoleteOrMissingEpisodes(seriesList, episodeLookup, addMissingEpisodes)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var hasNewEpisodes = false;
|
||||
@ -134,7 +137,7 @@ namespace MediaBrowser.Providers.TV
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -180,13 +183,9 @@ namespace MediaBrowser.Providers.TV
|
||||
/// Adds the missing episodes.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
private async Task<bool> AddMissingEpisodes(List<Series> series,
|
||||
bool seriesHasBadData,
|
||||
bool addMissingEpisodes,
|
||||
string seriesDataPath,
|
||||
IEnumerable<Tuple<int, int>> episodeLookup,
|
||||
CancellationToken cancellationToken)
|
||||
@ -240,8 +239,7 @@ namespace MediaBrowser.Providers.TV
|
||||
|
||||
if (airDate.Value < now)
|
||||
{
|
||||
// Be conservative here to avoid creating missing episodes for ones they already have
|
||||
if (!seriesHasBadData)
|
||||
if (addMissingEpisodes)
|
||||
{
|
||||
// tvdb has a lot of nearly blank episodes
|
||||
_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
|
||||
/// </summary>
|
||||
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
|
||||
let seasonOffset = TvdbSeriesProvider.GetSeriesOffset(s.ProviderIds) ?? ((s.AnimeSeriesIndex ?? 1) - 1)
|
||||
@ -316,6 +315,11 @@ namespace MediaBrowser.Providers.TV
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!allowMissingEpisodes && i.Episode.IsMissingEpisode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user