aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-15 20:41:55 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-15 20:41:55 -0400
commitf6dcef0cfdb4364f11836e395ff8933974bcf627 (patch)
treeea5245e54909773975185d9deabf868cf34fa445 /MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
parente376c31436c72fa870a2c1991ff48d3543069ce0 (diff)
update recordings
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs18
1 files changed, 2 insertions, 16 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
index 31fb072cdf..09a5a3912b 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
@@ -1,7 +1,6 @@
using MediaBrowser.Common.Extensions;
using MediaBrowser.Controller.LiveTv;
using System;
-using System.Text;
namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
{
@@ -44,7 +43,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
{
fancyName += "_(" + info.ProductionYear + ")";
}
- if (info.IsSeries)
+ if (info.IsSeries && !string.IsNullOrWhiteSpace(info.EpisodeTitle))
{
fancyName += "_" + info.EpisodeTitle.Replace("Season: ", "S").Replace(" Episode: ", "E");
}
@@ -56,20 +55,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
{
fancyName += "_" + info.OriginalAirDate.Value.ToString("yyyy-MM-dd");
}
- return RemoveSpecialCharacters(fancyName) + ".ts";
- }
-
- public static string RemoveSpecialCharacters(string str)
- {
- StringBuilder sb = new StringBuilder();
- foreach (char c in str)
- {
- if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '.' || c == '_' || c == '-' || c == ' ')
- {
- sb.Append(c);
- }
- }
- return sb.ToString();
+ return fancyName + ".ts";
}
}
}