|
3 | 3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
4 | 4 | <head> |
5 | 5 | <meta charset="utf-8" /> |
6 | | - <title>Anime Configuration</title> |
| 6 | + <title>Anime</title> |
7 | 7 | </head> |
8 | 8 | <body> |
9 | 9 | <div id="animeConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox"> |
10 | 10 | <div data-role="content"> |
11 | 11 | <div class="content-primary"> |
12 | | - |
13 | 12 | <form id="animeConfigurationForm"> |
14 | 13 | <div class="selectContainer"> |
15 | | - <label class="selectLabel" for="titleLanguage">Title Language:</label> |
| 14 | + <label class="selectLabel" for="titleLanguage">Title Language</label> |
16 | 15 | <select is="emby-select" id="titleLanguage" name="titleLanguage" class="emby-select-withcolor emby-select"> |
17 | 16 | <option id="optLanguageLocalized" value="Localized">Localized</option> |
18 | | - <option id="optLanguageRomaji" value="JapaneseRomaji">Romaji</option> |
19 | 17 | <option id="optLanguageJapanese" value="Japanese">Japanese</option> |
| 18 | + <option id="optLanguageJapaneseRomaji" value="JapaneseRomaji">Romaji</option> |
20 | 19 | </select> |
21 | 20 | </div> |
22 | 21 | <div class="inputContainer"> |
23 | | - <label class="inputeLabel inputLabelUnfocused" for="chkMaxGenres">Max Genres:</label> |
| 22 | + <label class="inputeLabel inputLabelUnfocused" for="chkMaxGenres">Max Genres</label> |
24 | 23 | <input id="chkMaxGenres" name="chkMaxGenres" type="number" is="emby-input" min="0"/> |
25 | | - <div class="fieldDescription">[0: unlimited]</div> |
| 24 | + <div class="fieldDescription">Set this to zero to remove any limit.</div> |
| 25 | + </div> |
| 26 | + <div class="checkboxContainer checkboxContainer-withDescripton"> |
| 27 | + <label class="emby-checkbox-label"> |
| 28 | + <input id="chkTidyGenres" name="chkTidyGenres" type="checkbox" is="emby-checkbox"/> |
| 29 | + <span>Tidy Genre List</span> |
| 30 | + </label> |
| 31 | + </div> |
| 32 | + <div class="checkboxContainer checkboxContainer-withDescripton"> |
| 33 | + <label class="emby-checkbox-label"> |
| 34 | + <input id="chkAddAnimeGenre" name="chkAddAnimeGenre" type="checkbox" is="emby-checkbox"/> |
| 35 | + <span>Add Anime Genre</span> |
| 36 | + </label> |
26 | 37 | </div> |
27 | 38 | <div class="inputContainer"> |
28 | | - <label class="inputeLabel inputLabelUnfocused" for="chkAniDB_wait_time">AniDB wait time:</label> |
29 | | - <input id="chkAniDB_wait_time" name="chkAniDB_wait_time" type="number" is="emby-input"/> |
30 | | - <div class="fieldDescription">AniDB sleep time to prevent IP ban (ms)</div> |
| 39 | + <label class="inputeLabel inputLabelUnfocused" for="chkAniDbWaitTime">AniDB Rate Limit</label> |
| 40 | + <input id="chkAniDbWaitTime" name="chkAniDbWaitTime" type="number" is="emby-input"/> |
| 41 | + <div class="fieldDescription">This will prevent IP bans for requesting data too quickly.</div> |
31 | 42 | </div> |
32 | 43 | <div class="checkboxContainer checkboxContainer-withDescripton"> |
33 | 44 | <label class="emby-checkbox-label"> |
34 | | - <input id="chkAnidbSeasonOne" name="chkAnidbSeasonOne" type="checkbox" is="emby-checkbox"/> |
35 | | - <span>Use AniDB Ordering with Seasons</span> |
| 45 | + <input id="chkAniDbOrderWithSeasons" name="chkAniDbOrderWithSeasons" type="checkbox" is="emby-checkbox"/> |
| 46 | + <span>AniDB Order with Seasons</span> |
36 | 47 | </label> |
37 | 48 | </div> |
38 | 49 | <div class="checkboxContainer checkboxContainer-withDescripton"> |
39 | 50 | <label class="emby-checkbox-label"> |
40 | | - <input id="chkTidyGenres" name="chkTidyGenres" type="checkbox" is="emby-checkbox"/> |
41 | | - <span>Tidy Genre List</span> |
| 51 | + <input id="chkAniDbReplaceGraves" name="chkAniDbReplaceGraves" type="checkbox" is="emby-checkbox"/> |
| 52 | + <span>AniDB Replace Grave Characters</span> |
42 | 53 | </label> |
43 | 54 | </div> |
44 | 55 | <div> |
|
51 | 62 | </div> |
52 | 63 |
|
53 | 64 | <script type="text/javascript"> |
54 | | - var AnimeConfigurationPage = |
55 | | - { |
| 65 | + var AnimeConfigurationPage = { |
56 | 66 | pluginUniqueId: "a4df60c5-6ab4-412a-8f79-2cab93fb2bc5", |
57 | 67 |
|
58 | | - virtualFolders: [], |
59 | | - physicalFolders: [], |
60 | | - |
61 | 68 | loadConfiguration: function() { |
62 | 69 | Dashboard.showLoadingMsg(); |
63 | 70 |
|
64 | 71 | ApiClient.getPluginConfiguration(AnimeConfigurationPage.pluginUniqueId).then(function (config) { |
65 | 72 | var page = $.mobile.activePage; |
66 | 73 |
|
67 | 74 | $('#titleLanguage', page).val(config.TitlePreference).change(); |
68 | | - $('#chkTidyGenres', page).checked(config.TidyGenreList).checkboxradio("refresh"); |
69 | 75 | $('#chkMaxGenres', page).val(config.MaxGenres).change(); |
70 | | - $('#chkAnidbSeasonOne', page).checked(config.UseAnidbOrderingWithSeasons).checkboxradio("refresh"); |
71 | | - $('#chkAniDB_wait_time', page).val(config.AniDB_wait_time).change(); |
| 76 | + $('#chkTidyGenres', page).checked(config.TidyGenreList).checkboxradio("refresh"); |
| 77 | + $('#chkAddAnimeGenre', page).checked(config.AddAnimeGenre).checkboxradio("refresh"); |
| 78 | + $('#chkAniDbWaitTime', page).val(config.AniDbWaitTime).change(); |
| 79 | + $('#chkAniDbOrderWithSeasons', page).checked(config.AniDbOrderWithSeasons).checkboxradio("refresh"); |
| 80 | + $('#chkAniDbReplaceGraves', page).checked(config.AniDbReplaceGraves).checkboxradio("refresh"); |
72 | 81 |
|
73 | 82 | Dashboard.hideLoadingMsg(); |
74 | 83 | }); |
|
77 | 86 | saveConfiguration: function() { |
78 | 87 | Dashboard.showLoadingMsg(); |
79 | 88 |
|
80 | | - var page = $.mobile.activePage; |
81 | | - |
82 | 89 | ApiClient.getPluginConfiguration(AnimeConfigurationPage.pluginUniqueId).then(function(config) { |
| 90 | + var page = $.mobile.activePage; |
83 | 91 |
|
84 | 92 | config.TitlePreference = $('#titleLanguage', page).val(); |
85 | | - config.TidyGenreList = $('#chkTidyGenres').prop('checked'); |
86 | 93 | config.MaxGenres = $('#chkMaxGenres').val(); |
87 | | - config.UseAnidbOrderingWithSeasons = $('#chkAnidbSeasonOne').prop('checked'); |
88 | | - config.AniDB_wait_time = $('#chkAniDB_wait_time').val(); |
| 94 | + config.TidyGenreList = $('#chkTidyGenres').prop('checked'); |
| 95 | + config.AddAnimeGenre = $('#chkAddAnimeGenre').prop('checked'); |
| 96 | + config.AniDbWaitTime = $('#chkAniDbWaitTime').val(); |
| 97 | + config.AniDbOrderWithSeasons = $('#chkAniDbOrderWithSeasons').prop('checked'); |
| 98 | + config.AniDbReplaceGraves = $('#chkAniDbReplaceGraves').prop('checked'); |
| 99 | + |
89 | 100 | ApiClient.updatePluginConfiguration(AnimeConfigurationPage.pluginUniqueId, config).then(function (result) { |
90 | 101 | Dashboard.processPluginConfigurationUpdateResult(result); |
91 | 102 | }); |
|
0 commit comments