-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
80 additions
and
75 deletions.
There are no files selected for viewing
72 changes: 36 additions & 36 deletions
72
Jellyfin.Plugin.Bangumi/Utils/Anitomy.cs → Jellyfin.Plugin.Bangumi/Anitomy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using AnitomySharp; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.Utils; | ||
|
||
public class AnitomyHelper | ||
{ | ||
public static List<Element> ElementsOutput(string path) | ||
{ | ||
return new List<Element>(AnitomySharp.AnitomySharp.Parse(path)); | ||
} | ||
|
||
public static string ExtractAnimeTitle(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementAnimeTitle).Value; | ||
} | ||
|
||
public static string ExtractEpisodeTitle(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementEpisodeTitle).Value; | ||
} | ||
|
||
public static string ExtractEpisodeNumber(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementEpisodeNumber).Value; | ||
} | ||
|
||
public static string ExtractSeasonNumber(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementAnimeSeason).Value; | ||
} | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using AnitomySharp; | ||
|
||
namespace Jellyfin.Plugin.Bangumi; | ||
|
||
public class Anitomy | ||
{ | ||
public static List<Element> ElementsOutput(string path) | ||
{ | ||
return new List<Element>(AnitomySharp.AnitomySharp.Parse(path)); | ||
} | ||
|
||
public static string? ExtractAnimeTitle(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementAnimeTitle)?.Value; | ||
} | ||
|
||
public static string? ExtractEpisodeTitle(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementEpisodeTitle)?.Value; | ||
} | ||
|
||
public static string? ExtractEpisodeNumber(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementEpisodeNumber)?.Value; | ||
} | ||
|
||
public static string? ExtractSeasonNumber(string path) | ||
{ | ||
var elements = AnitomySharp.AnitomySharp.Parse(path); | ||
return elements.FirstOrDefault(p => p.Category == Element.ElementCategory.ElementAnimeSeason)?.Value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.