forked from kookxiang/jellyfin-plugin-bangumi
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 63e6cda
Showing
29 changed files
with
1,049 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) | ||
[Bb]in/ | ||
[Oo]bj/ | ||
|
||
# mstest test results | ||
TestResults | ||
|
||
## Ignore Visual Studio temporary files, build results, and | ||
## files generated by popular Visual Studio add-ons. | ||
|
||
# User-specific files | ||
*.suo | ||
*.user | ||
*.sln.docstates | ||
|
||
# Build results | ||
[Dd]ebug/ | ||
[Rr]elease/ | ||
.vs/ | ||
x64/ | ||
*_i.c | ||
*_p.c | ||
*.ilk | ||
*.meta | ||
*.obj | ||
*.pch | ||
*.pdb | ||
*.pgc | ||
*.pgd | ||
*.rsp | ||
*.sbr | ||
*.tlb | ||
*.tli | ||
*.tlh | ||
*.tmp | ||
*.log | ||
*.vspscc | ||
*.vssscc | ||
.builds | ||
|
||
# Visual C++ cache files | ||
ipch/ | ||
*.aps | ||
*.ncb | ||
*.opensdf | ||
*.sdf | ||
|
||
# Visual Studio profiler | ||
*.psess | ||
*.vsp | ||
*.vspx | ||
|
||
# Guidance Automation Toolkit | ||
*.gpState | ||
|
||
# ReSharper is a .NET coding add-in | ||
_ReSharper* | ||
|
||
# NCrunch | ||
*.ncrunch* | ||
.*crunch*.local.xml | ||
|
||
# Installshield output folder | ||
[Ee]xpress | ||
|
||
# DocProject is a documentation generator add-in | ||
DocProject/buildhelp/ | ||
DocProject/Help/*.HxT | ||
DocProject/Help/*.HxC | ||
DocProject/Help/*.hhc | ||
DocProject/Help/*.hhk | ||
DocProject/Help/*.hhp | ||
DocProject/Help/Html2 | ||
DocProject/Help/html | ||
|
||
# Click-Once directory | ||
publish | ||
|
||
# Publish Web Output | ||
*.Publish.xml | ||
|
||
# NuGet Packages Directory | ||
packages | ||
|
||
# Windows Azure Build Output | ||
csx | ||
*.build.csdef | ||
|
||
# Windows Store app package directory | ||
AppPackages/ | ||
|
||
# Others | ||
[Bb]in | ||
[Oo]bj | ||
sql | ||
TestResults | ||
[Tt]est[Rr]esult* | ||
*.Cache | ||
ClientBin | ||
.idea | ||
[Ss]tyle[Cc]op.* | ||
~$* | ||
*.dbmdl | ||
Generated_Code #added for RIA/Silverlight projects | ||
|
||
# Backup & report files from converting an old project file to a newer | ||
# Visual Studio version. Backup files are not needed, because we have git ;-) | ||
_UpgradeReport_Files/ | ||
Backup*/ | ||
UpgradeLog*.XML | ||
|
||
# MonoDevelop metafiles | ||
MediaBrowser.Plugins.Anime.userprefs | ||
|
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.26730.3 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Plugin.Bangumi", "Jellyfin.Plugin.Bangumi\Jellyfin.Plugin.Bangumi.csproj", "{1363456E-55A2-4FC5-872D-97923FCD34F2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{1363456E-55A2-4FC5-872D-97923FCD34F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1363456E-55A2-4FC5-872D-97923FCD34F2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1363456E-55A2-4FC5-872D-97923FCD34F2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1363456E-55A2-4FC5-872D-97923FCD34F2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {0DCE7939-D75F-406C-8E3A-C3648C2A1262} | ||
EndGlobalSection | ||
EndGlobal |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
/** | ||
* 声优 | ||
*/ | ||
internal class Actor | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Name { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public Dictionary<string, string> Images { get; set; } | ||
|
||
[JsonIgnore] | ||
public string DefaultImage => Images?["large"]; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using Jellyfin.Plugin.Bangumi.Configuration; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
/** | ||
* 虚拟角色 | ||
*/ | ||
internal class Character | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string OriginalName { get; set; } | ||
|
||
[JsonPropertyName("name_cn")] | ||
public string ChineseName { get; set; } | ||
|
||
[JsonIgnore] | ||
public string Name => Plugin.Instance.Configuration.TranslationPreference switch | ||
{ | ||
TranslationPreferenceType.Chinese => ChineseName, | ||
TranslationPreferenceType.Original => OriginalName, | ||
_ => OriginalName | ||
}; | ||
|
||
public Dictionary<string, string> Images { get; set; } | ||
|
||
[JsonIgnore] | ||
public string DefaultImage => Images?["large"]; | ||
|
||
[JsonPropertyName("role_name")] | ||
public string Role { get; set; } | ||
|
||
public List<Actor> Actors { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System.Text.Json.Serialization; | ||
using Jellyfin.Plugin.Bangumi.Configuration; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class Episode | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
public EpisodeType Type { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string OriginalName { get; set; } | ||
|
||
[JsonPropertyName("name_cn")] | ||
public string ChineseName { get; set; } | ||
|
||
[JsonIgnore] | ||
public string Name => Plugin.Instance.Configuration.TranslationPreference switch | ||
{ | ||
TranslationPreferenceType.Chinese => ChineseName, | ||
TranslationPreferenceType.Original => OriginalName, | ||
_ => OriginalName | ||
}; | ||
|
||
public string Duration { get; set; } | ||
|
||
[JsonPropertyName("airdate")] | ||
public string AirDate { get; set; } | ||
|
||
[JsonPropertyName("desc")] | ||
public string Description { get; set; } | ||
|
||
[JsonPropertyName("sort")] | ||
public int Order { get; set; } | ||
|
||
public string Status { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class EpisodeList : SubjectBase | ||
{ | ||
[JsonPropertyName("eps")] | ||
public List<Episode> Episodes { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
public enum EpisodeType | ||
{ | ||
Normal = 0, | ||
Special = 1, | ||
Opening = 2, | ||
Ending = 3, | ||
Preview = 4, | ||
Madness = 5, | ||
Other = 6 | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
/** | ||
* 评分 | ||
*/ | ||
internal class Rating | ||
{ | ||
public int Total { get; set; } | ||
|
||
public float Score { get; set; } | ||
|
||
public Dictionary<string, int> Count { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class SearchResult<T> : StatusCode | ||
{ | ||
[JsonPropertyName("results")] | ||
public int ResultCount { get; set; } | ||
|
||
public List<T> List { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using Jellyfin.Plugin.Bangumi.Configuration; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class Staff | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Url { get; set; } | ||
|
||
[JsonPropertyName("name")] public string OriginalName { get; set; } | ||
|
||
[JsonPropertyName("name_cn")] public string ChineseName { get; set; } | ||
|
||
[JsonIgnore] | ||
public string Name => Plugin.Instance.Configuration.TranslationPreference switch | ||
{ | ||
TranslationPreferenceType.Chinese => ChineseName, | ||
TranslationPreferenceType.Original => OriginalName, | ||
_ => OriginalName | ||
}; | ||
|
||
public Dictionary<string, string> Images { get; set; } | ||
|
||
[JsonIgnore] public string DefaultImage => Images?["large"]; | ||
|
||
public List<string> Jobs { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class StatusCode | ||
{ | ||
public int? Code { get; set; } | ||
public string Error { get; set; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Text.Json.Serialization; | ||
using Jellyfin.Plugin.Bangumi.Configuration; | ||
|
||
namespace Jellyfin.Plugin.Bangumi.API | ||
{ | ||
internal class Subject : StatusCode | ||
{ | ||
public int Id { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string OriginalName { get; set; } | ||
|
||
[JsonPropertyName("name_cn")] | ||
public string ChineseName { get; set; } | ||
|
||
[JsonIgnore] | ||
public string Name => Plugin.Instance.Configuration.TranslationPreference switch | ||
{ | ||
TranslationPreferenceType.Chinese => ChineseName, | ||
TranslationPreferenceType.Original => OriginalName, | ||
_ => OriginalName | ||
}; | ||
} | ||
} |
Oops, something went wrong.