diff --git a/ErsatzTV.Core/Iptv/ChannelGuide.cs b/ErsatzTV.Core/Iptv/ChannelGuide.cs index ece075db2..b155dd211 100644 --- a/ErsatzTV.Core/Iptv/ChannelGuide.cs +++ b/ErsatzTV.Core/Iptv/ChannelGuide.cs @@ -108,6 +108,11 @@ namespace ErsatzTV.Core.Iptv xml.WriteAttributeString("system", "xmltv_ns"); xml.WriteString($"{s - 1}.{e - 1}.0/1"); xml.WriteEndElement(); // episode-num + + xml.WriteStartElement("episode-num"); + xml.WriteAttributeString("system", "onscreen"); + xml.WriteString($"S{s:00}E{e:00}"); + xml.WriteEndElement(); // episode-num } } diff --git a/ErsatzTV.Core/Metadata/LocalMetadataProvider.cs b/ErsatzTV.Core/Metadata/LocalMetadataProvider.cs index cd99a9f70..0089d519f 100644 --- a/ErsatzTV.Core/Metadata/LocalMetadataProvider.cs +++ b/ErsatzTV.Core/Metadata/LocalMetadataProvider.cs @@ -218,7 +218,7 @@ namespace ErsatzTV.Core.Metadata } catch (Exception ex) { - _logger.LogDebug(ex, "Failed to read TV show nfo metadata from {Path}", nfoFileName); + _logger.LogInformation(ex, "Failed to read TV show nfo metadata from {Path}", nfoFileName); return None; } } @@ -246,7 +246,7 @@ namespace ErsatzTV.Core.Metadata } catch (Exception ex) { - _logger.LogDebug(ex, "Failed to read TV episode nfo metadata from {Path}", nfoFileName); + _logger.LogInformation(ex, "Failed to read TV episode nfo metadata from {Path}", nfoFileName); return FallbackMetadataProvider.GetFallbackMetadata(episode); } } @@ -273,7 +273,7 @@ namespace ErsatzTV.Core.Metadata } catch (Exception ex) { - _logger.LogDebug(ex, "Failed to read Movie nfo metadata from {Path}", nfoFileName); + _logger.LogInformation(ex, "Failed to read Movie nfo metadata from {Path}", nfoFileName); return FallbackMetadataProvider.GetFallbackMetadata(mediaItem); } } diff --git a/ErsatzTV/Extensions/HostExtensions.cs b/ErsatzTV/Extensions/HostExtensions.cs index 226a2353e..a193940c1 100644 --- a/ErsatzTV/Extensions/HostExtensions.cs +++ b/ErsatzTV/Extensions/HostExtensions.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using ErsatzTV.Core; using ErsatzTV.Core.Domain; +using ErsatzTV.Core.Interfaces.Metadata; using ErsatzTV.Infrastructure.Data; using LanguageExt; using Microsoft.EntityFrameworkCore; @@ -68,6 +69,7 @@ namespace ErsatzTV.Extensions .Map(a => a.Path) .ToList(); + ILocalFileSystem localFileSystem = provider.GetRequiredService(); foreach (string logo in logos) { string legacyPath = Path.Combine(FileSystemLayout.LegacyImageCacheFolder, logo); @@ -75,7 +77,7 @@ namespace ErsatzTV.Extensions { string subfolder = logo.Substring(0, 2); string newPath = Path.Combine(FileSystemLayout.LogoCacheFolder, subfolder, logo); - File.Copy(legacyPath, newPath, true); + localFileSystem.CopyFile(legacyPath, newPath); } }