소스 검색

Add additional provider parsing to series file name

Cody Robibero 3 년 전
부모
커밋
4890454935
1개의 변경된 파일32개의 추가작업 그리고 3개의 파일을 삭제
  1. 32 3
      Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs

+ 32 - 3
Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs

@@ -187,11 +187,40 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
         {
         {
             var justName = Path.GetFileName(path);
             var justName = Path.GetFileName(path);
 
 
-            var id = justName.GetAttributeValue("tvdbid");
+            var tvdbId = justName.GetAttributeValue("tvdbid");
+            if (!string.IsNullOrEmpty(tvdbId))
+            {
+                item.SetProviderId(MetadataProvider.Tvdb, tvdbId);
+            }
+
+            var tvmazeId = justName.GetAttributeValue("tvmazeid");
+            if (!string.IsNullOrEmpty(tvmazeId))
+            {
+                item.SetProviderId(MetadataProvider.TvMaze, tvmazeId);
+            }
+
+            var tmdbId = justName.GetAttributeValue("tmdbid");
+            if (!string.IsNullOrEmpty(tmdbId))
+            {
+                item.SetProviderId(MetadataProvider.Tmdb, tmdbId);
+            }
+
+            var anidbId = justName.GetAttributeValue("anidbid");
+            if (!string.IsNullOrEmpty(anidbId))
+            {
+                item.SetProviderId("AniDB", anidbId);
+            }
+
+            var aniListId = justName.GetAttributeValue("anilistid");
+            if (!string.IsNullOrEmpty(aniListId))
+            {
+                item.SetProviderId("AniList", aniListId);
+            }
 
 
-            if (!string.IsNullOrEmpty(id))
+            var aniSearchId = justName.GetAttributeValue("anisearchid");
+            if (!string.IsNullOrEmpty(aniSearchId))
             {
             {
-                item.SetProviderId(MetadataProvider.Tvdb, id);
+                item.SetProviderId("AniSearch", aniSearchId);
             }
             }
         }
         }
     }
     }