aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-05-04 08:19:43 -0600
committercrobibero <cody@robibe.ro>2022-05-20 18:30:56 -0400
commite263e9c2b129ef20c696ce458e00cd4d3367c520 (patch)
tree27233bb5b1004122b56e55a8a828610a0165746e /Emby.Server.Implementations
parentefcdab116f85a560c9362185a9e333c3fc9df41d (diff)
Merge pull request #7544 from jaantaponen/long-filename-fix
(cherry picked from commit 8a1eca09138d50c033b100a63e5f51d18e3669bb) Signed-off-by: crobibero <cody@robibe.ro>
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
index 32245f899..6ad9ccdf6 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs
@@ -3,6 +3,7 @@
using System;
using System.Globalization;
using MediaBrowser.Controller.LiveTv;
+using System.Text;
namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
@@ -48,12 +49,18 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
if (!string.IsNullOrWhiteSpace(info.EpisodeTitle))
{
+ var tmpName = name;
if (addHyphen)
{
- name += " -";
+ tmpName += " -";
}
- name += " " + info.EpisodeTitle;
+ tmpName += " " + info.EpisodeTitle;
+ // Since the filename will be used with file ext. (.mp4, .ts, etc)
+ if (Encoding.UTF8.GetByteCount(tmpName) < 250)
+ {
+ name = tmpName;
+ }
}
}
else if (info.IsMovie && info.ProductionYear != null)