aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/Plugins/AudioDb/Configuration/config.html
blob: c50dba71f714b1cc59f204ebc716614b0e44bdbf (plain)
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
<!DOCTYPE html>
<html>
<head>
    <title>AudioDB</title>
</head>
<body>
    <div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
        <div data-role="content">
            <div class="content-primary">
                <form class="configForm">
                    <label class="checkboxContainer">
                        <input is="emby-checkbox" type="checkbox" id="enable" />
                        <span>Enable this provider for metadata searches on artists and albums.</span>
                    </label>
                    <label class="checkboxContainer">
                        <input is="emby-checkbox" type="checkbox" id="replaceArtistName" />
                        <span>When an album is found during a metadata search, replace the name with the value on the server.</span>
                    </label>
                    <br />
                    <div>
                        <button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
                    </div>
                </form>
            </div>
        </div>
        <script type="text/javascript">
            var PluginConfig = {
                pluginId: "a629c0da-fac5-4c7e-931a-7174223f14c8"
            };

            $('.configPage').on('pageshow', function () {
                Dashboard.showLoadingMsg();
                ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
                    $('#enable').checked(config.Enable);

                    Dashboard.hideLoadingMsg();
                });
            });

            $('.configForm').on('submit', function (e) {
                Dashboard.showLoadingMsg();

                var form = this;
                ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
                    config.Enable = $('#enable', form).checked();

                    ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
                });

                return false;
            });
        </script>
    </div>
</body>
</html>