chore: explicitly handle null description

This commit is contained in:
wolffshots
2025-08-05 10:37:54 +02:00
parent 6e8b9ca744
commit d7f4f5cbcc
@@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities
{
@@ -42,8 +43,11 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities
/// <returns>A string with \n replaced by br tags.</returns>
public static string FormatDescription(string description)
{
try
if (description == null)
{
return "Description is null";
}
var maxLength = 500;
if (Plugin.Instance != null)
{
@@ -59,11 +63,6 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities
return description;
}
catch (Exception)
{
return "Error getting description";
}
}
/// <summary>
/// Get video name from file path on the disk.