aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-11-08 02:14:01 +0900
committerJoshua Boniface <joshua@boniface.me>2019-11-24 13:32:23 -0500
commit46ab046c344f036f5c0ceea410c39a8a540b67fc (patch)
tree576f6990bb449269058d598793e91770453037f3 /Emby.Server.Implementations/Library/LibraryManager.cs
parentcf54a0e8be753424e91c6e7a3a5644a039cbd937 (diff)
Merge pull request #1929 from Narfinger/parser-fix4
[Draft][Help wanted] Fix parsing of certain names and adds a default season if no season was found (cherry picked from commit 61b9b4046af1890d4a2a68495f212def3bca6915) Signed-off-by: Joshua Boniface <joshua@boniface.me>
Diffstat (limited to 'Emby.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--Emby.Server.Implementations/Library/LibraryManager.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs
index 87e951f25..dd74b1060 100644
--- a/Emby.Server.Implementations/Library/LibraryManager.cs
+++ b/Emby.Server.Implementations/Library/LibraryManager.cs
@@ -1899,7 +1899,7 @@ namespace Emby.Server.Implementations.Library
/// <param name="cancellationToken">The cancellation token.</param>
public void UpdateItem(BaseItem item, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
{
- UpdateItems(new [] { item }, parent, updateReason, cancellationToken);
+ UpdateItems(new[] { item }, parent, updateReason, cancellationToken);
}
/// <summary>
@@ -2487,6 +2487,15 @@ namespace Emby.Server.Implementations.Library
{
episode.ParentIndexNumber = season.IndexNumber;
}
+ else
+ {
+ /*
+ Anime series don't generally have a season in their file name, however,
+ tvdb needs a season to correctly get the metadata.
+ Hence, a null season needs to be filled with something. */
+ //FIXME perhaps this would be better for tvdb parser to ask for season 1 if no season is specified
+ episode.ParentIndexNumber = 1;
+ }
if (episode.ParentIndexNumber.HasValue)
{