-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigPage.html
More file actions
173 lines (148 loc) · 8.68 KB
/
Copy pathconfigPage.html
File metadata and controls
173 lines (148 loc) · 8.68 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>StashSync Configuration</title>
</head>
<body>
<div id="StashSyncConfigPage" data-role="page" class="page type-interior pluginConfigurationPage"
data-require="emby-input,emby-button,emby-select,emby-checkbox">
<div data-role="content">
<div class="content-primary">
<form id="StashSyncConfigForm">
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">StashSync Settings</h2>
</div>
<p>StashSync maps your <strong>Stash App Groups</strong> to Jellyfin Movies.
Each Group becomes a Movie entry, with its scenes represented as chapters.
After saving settings, run the <em>"Sync Stash Groups"</em> task from the
Scheduled Tasks page.</p>
<hr/>
<h3>Stash Connection</h3>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="StashUrl">Stash URL</label>
<input id="StashUrl" name="StashUrl" type="text" is="emby-input"
placeholder="http://192.168.1.100:9999"/>
<div class="fieldDescription">
Base URL of your Stash instance. Do not include a trailing slash.
</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="StashApiKey">Stash API Key</label>
<input id="StashApiKey" name="StashApiKey" type="password" is="emby-input"
placeholder="Leave blank if Stash has no authentication"/>
<div class="fieldDescription">
Found in Stash → Settings → Security → API Key.
</div>
</div>
<hr/>
<h3>TMDB Integration</h3>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="TmdbApiKey">TMDB API Key (v3)</label>
<input id="TmdbApiKey" name="TmdbApiKey" type="password" is="emby-input"
placeholder="Your TMDB v3 API key"/>
<div class="fieldDescription">
Used to fetch poster and backdrop images directly from TheMovieDB during sync.
Free to obtain at <a href="https://www.themoviedb.org/settings/api" target="_blank">themoviedb.org/settings/api</a>.
If left blank, posters will fall back to the Stash cover image only.
</div>
</div>
<hr/>
<h3>Output</h3>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="StrmOutputPath">STRM Output Path</label>
<input id="StrmOutputPath" name="StrmOutputPath" type="text" is="emby-input"
placeholder="/media/stash-groups"/>
<div class="fieldDescription">
Directory where .strm files will be created. Add this path to Jellyfin as a
<strong>Movies</strong> library. Jellyfin must have read/write access to this path.
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="UseStreamUrls" name="UseStreamUrls" type="checkbox" is="emby-checkbox"/>
<span>Use Stash Stream URLs (recommended)</span>
</label>
<div class="fieldDescription checkboxFieldDescription">
When enabled, .strm files will contain Stash HTTP stream URLs.
When disabled, local file paths from Stash will be used (requires shared filesystem).
</div>
</div>
<hr/>
<h3>StashProxy</h3>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="ProxyUrl">Proxy URL</label>
<input id="ProxyUrl" name="ProxyUrl" type="text" is="emby-input"
placeholder="http://192.168.0.38:5678"/>
<div class="fieldDescription">
URL of the <strong>StashProxy</strong> service. When set, .strm files will point to the
proxy which streams all scenes in a Group as one continuous video using FFmpeg.
Leave blank to use direct Stash stream URLs (plays first scene only).
See the <a href="https://github.com/Lurking987/jellyfin-plugins/tree/main/StashProxy" target="_blank">StashProxy README</a> for setup instructions.
</div>
</div>
<hr/>
<h3>Filters</h3>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MinSceneCount">Minimum Scene Count</label>
<input id="MinSceneCount" name="MinSceneCount" type="number" is="emby-input"
min="1" max="100" placeholder="1"/>
<div class="fieldDescription">
Groups with fewer scenes than this number will be skipped.
</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label class="emby-checkbox-label">
<input id="IncludeGroupsWithoutCover" name="IncludeGroupsWithoutCover"
type="checkbox" is="emby-checkbox"/>
<span>Include Groups without a cover image</span>
</label>
</div>
<br/>
<div>
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
<span>Save</span>
</button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var StashSyncConfig = {
pluginUniqueId: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
};
document.querySelector('#StashSyncConfigPage').addEventListener('pageshow', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(StashSyncConfig.pluginUniqueId).then(function (config) {
document.querySelector('#StashUrl').value = config.StashUrl || '';
document.querySelector('#StashApiKey').value = config.StashApiKey || '';
document.querySelector('#TmdbApiKey').value = config.TmdbApiKey || '';
document.querySelector('#StrmOutputPath').value = config.StrmOutputPath || '';
document.querySelector('#UseStreamUrls').checked = config.UseStreamUrls !== false;
document.querySelector('#MinSceneCount').value = config.MinSceneCount || 1;
document.querySelector('#IncludeGroupsWithoutCover').checked = config.IncludeGroupsWithoutCover !== false;
document.querySelector('#ProxyUrl').value = config.ProxyUrl || '';
Dashboard.hideLoadingMsg();
});
});
document.querySelector('#StashSyncConfigForm').addEventListener('submit', function (e) {
e.preventDefault();
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(StashSyncConfig.pluginUniqueId).then(function (config) {
config.StashUrl = document.querySelector('#StashUrl').value.trim().replace(/\/$/, '');
config.StashApiKey = document.querySelector('#StashApiKey').value;
config.TmdbApiKey = document.querySelector('#TmdbApiKey').value.trim();
config.StrmOutputPath = document.querySelector('#StrmOutputPath').value.trim();
config.UseStreamUrls = document.querySelector('#UseStreamUrls').checked;
config.MinSceneCount = parseInt(document.querySelector('#MinSceneCount').value, 10) || 1;
config.IncludeGroupsWithoutCover = document.querySelector('#IncludeGroupsWithoutCover').checked;
config.ProxyUrl = document.querySelector('#ProxyUrl').value.trim().replace(/\/$/, '');
ApiClient.updatePluginConfiguration(StashSyncConfig.pluginUniqueId, config).then(function () {
Dashboard.processPluginConfigurationUpdateResult();
});
});
});
</script>
</div>
</body>
</html>