Repository navigation
Expand file tree
/
Copy pathOriginalPosterConfig.cs
More file actions
62 lines (48 loc) · 2.13 KB
/
Copy pathOriginalPosterConfig.cs
File metadata and controls
62 lines (48 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// OriginalPosterConfig.cs
using MediaBrowser.Model.Plugins;
using Emby.Web.GenericEdit;
using System.ComponentModel;
namespace OriginalPoster;
public class OriginalPosterConfig : EditableOptionsBase
{
public override string EditorTitle => "OriginalPoster Settings";
[DisplayName("启用原语言海报")]
[Description("是否启用 TMDB 原语言海报功能")]
public bool Enabled { get; set; } = true;
[DisplayName("启用原语言 Logo")]
[Description("从 TMDB 获取原语言/无文字 Logo")]
public bool EnableOriginalLogo { get; set; } = true;
[DisplayName("TMDB API KEY")]
[Description("在 https://www.themoviedb.org/settings/api 获取")]
public string TmdbApiKey { get; set; } = string.Empty;
// [DisplayName("元数据语言(用于兼容 Emby 语言偏好)")]
// [Description("设置为 Emby 媒体库的“首选元数据语言”,例如 zh、en。跟你的选的元数据语言一致。")]
// public string MetadataLanguage { get; set; } = "zh";
[DisplayName("海报选择策略")]
[Description("选择原语言海报时的优先级策略")]
public PosterSelectionStrategy PosterSelectionStrategy { get; set; } = PosterSelectionStrategy.OriginalLanguageFirst;
[DisplayName("测试模式")]
[Description("启用后将返回测试海报,用于验证插件功能")]
public bool TestMode { get; set; } = false;
[DisplayName("测试海报 URL")]
[Description("测试模式下使用的海报图片地址")]
public string TestPosterUrl { get; set; } = "https://image.tmdb.org/t/p/original/cgZjpqRQt9sk6XMCwZ3B1NPAaoy.jpg";
}
public enum PosterSelectionStrategy
{
/// <summary>
/// 优先原语言(即使评分较低)
/// </summary>
[Description("优先原语言")]
OriginalLanguageFirst,
/// <summary>
/// 优先高评分(可能选到 null 无文字海报)
/// </summary>
[Description("优先高评分")]
HighestRatingFirst,
/// <summary>
/// 优先无文字海报(iso_639_1 == null)
/// </summary>
[Description("优先无文字海报")]
NoTextPosterFirst
}