mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-05 01:42:08 +01:00
update recording save path
This commit is contained in:
@@ -495,10 +495,23 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
|
||||
var info = GetProgramInfoFromCache(timer.ChannelId, timer.ProgramId);
|
||||
var recordPath = RecordingPath;
|
||||
|
||||
if (info.IsMovie)
|
||||
{
|
||||
recordPath = Path.Combine(recordPath, "Movies", _fileSystem.GetValidFilename(info.Name));
|
||||
}
|
||||
else if (info.IsSeries)
|
||||
{
|
||||
recordPath = Path.Combine(recordPath, "Series", _fileSystem.GetValidFilename(info.Name));
|
||||
}
|
||||
else if (info.IsKids)
|
||||
{
|
||||
recordPath = Path.Combine(recordPath, "Kids", _fileSystem.GetValidFilename(info.Name));
|
||||
}
|
||||
else if (info.IsSports)
|
||||
{
|
||||
recordPath = Path.Combine(recordPath, "Sports", _fileSystem.GetValidFilename(info.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
recordPath = Path.Combine(recordPath, "TV", _fileSystem.GetValidFilename(info.Name));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
{
|
||||
@@ -36,26 +37,33 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
{
|
||||
if (info == null)
|
||||
{
|
||||
return (timer.ProgramId + ".ts");
|
||||
return timer.ProgramId + ".ts";
|
||||
}
|
||||
var fancyName = info.Name;
|
||||
if (info.ProductionYear != null)
|
||||
|
||||
var name = info.Name;
|
||||
|
||||
if (info.IsSeries)
|
||||
{
|
||||
fancyName += "_(" + info.ProductionYear + ")";
|
||||
if (info.SeasonNumber.HasValue && info.EpisodeNumber.HasValue)
|
||||
{
|
||||
name += string.Format(" S{0}E{1}", info.SeasonNumber.Value.ToString("00", CultureInfo.InvariantCulture), info.EpisodeNumber.Value.ToString("00", CultureInfo.InvariantCulture));
|
||||
}
|
||||
else if (info.OriginalAirDate.HasValue)
|
||||
{
|
||||
name += " " + info.OriginalAirDate.Value.ToString("yyyy-MM-dd");
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(info.EpisodeTitle))
|
||||
{
|
||||
name += " " + info.EpisodeTitle;
|
||||
}
|
||||
}
|
||||
if (info.IsSeries && !string.IsNullOrWhiteSpace(info.EpisodeTitle))
|
||||
|
||||
else if (info.ProductionYear != null)
|
||||
{
|
||||
fancyName += "_" + info.EpisodeTitle.Replace("Season: ", "S").Replace(" Episode: ", "E");
|
||||
name += " (" + info.ProductionYear + ")";
|
||||
}
|
||||
if (info.IsHD ?? false)
|
||||
{
|
||||
fancyName += "_HD";
|
||||
}
|
||||
if (info.OriginalAirDate != null)
|
||||
{
|
||||
fancyName += "_" + info.OriginalAirDate.Value.ToString("yyyy-MM-dd");
|
||||
}
|
||||
return fancyName + ".ts";
|
||||
|
||||
return name + ".ts";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user