Skip to content

Commit 0ee3ea4

Browse files
committed
Changed target to .Net1.3
1 parent 33c934f commit 0ee3ea4

File tree

11 files changed

+163
-448
lines changed

11 files changed

+163
-448
lines changed

Emby.Webhooks.sln

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.12
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Emby.Webhooks", "Emby.Webhooks\Emby.Webhooks.csproj", "{6E2C1EF8-3722-40A9-A46B-E1F965DADDBD}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Webhooks", "Emby.Webhooks\Webhooks.csproj", "{93E4D80F-8FEA-47FD-99F0-E9AC12EE395D}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{6E2C1EF8-3722-40A9-A46B-E1F965DADDBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{6E2C1EF8-3722-40A9-A46B-E1F965DADDBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{6E2C1EF8-3722-40A9-A46B-E1F965DADDBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{6E2C1EF8-3722-40A9-A46B-E1F965DADDBD}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{93E4D80F-8FEA-47FD-99F0-E9AC12EE395D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{93E4D80F-8FEA-47FD-99F0-E9AC12EE395D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{93E4D80F-8FEA-47FD-99F0-E9AC12EE395D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{93E4D80F-8FEA-47FD-99F0-E9AC12EE395D}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE

Emby.Webhooks/Configuration/PluginConfiguration.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,28 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7+
8+
79
namespace Emby.Webhooks.Configuration
10+
811
{
9-
public class PluginConfiguration: MediaBrowser.Model.Plugins.BasePluginConfiguration
12+
13+
public class PluginConfiguration : MediaBrowser.Model.Plugins.BasePluginConfiguration
14+
1015
{
1116
public PluginConfiguration()
17+
1218
{
1319
Hooks = new Hook[] { };
1420
}
1521

1622
public Hook[] Hooks { get; set; }
1723

1824
public class Hook
25+
1926
{
20-
public string URL { get; set; }
2127

28+
public string URL { get; set; }
2229
public bool onPlay { get; set; }
2330
public bool onPause { get; set; }
2431
public bool onStop { get; set; }
@@ -28,7 +35,9 @@ public class Hook
2835
public bool withMovies { get; set; }
2936
public bool withEpisodes { get; set; }
3037
public bool withSongs { get; set; }
31-
38+
3239
}
40+
3341
}
42+
3443
}

Emby.Webhooks/Configuration/config.html

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
</head>
66
<body>
77
<div data-role="page" class="page type-interior pluginConfigurationPage smtpConfigurationPage" data-require="emby-select,emby-checkbox,emby-input,emby-button">
8-
8+
99

1010
<div id="itemTemplate" class="paperList" style="display:none;">
1111
<div class="listItem">
1212
<div class="listItemBody two-line">
1313
<div>
1414
<div class="inputContainer">
15-
<input is="emby-input" type="text" class="txtUrl"/>
15+
<input is="emby-input" type="text" class="txtUrl" />
1616
<div class="fieldDescription">
1717
Url
1818
</div>
@@ -41,29 +41,29 @@ <h3>Events</h3>
4141
<span>Item Added</span>
4242
</label>
4343

44-
44+
4545
</div>
4646
<div>
4747
<h3>Media Types</h3>
48-
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
49-
<input is="emby-checkbox" type="checkbox" class="chkMovies" />
50-
<span>Movies</span>
51-
</label>
52-
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
53-
<input is="emby-checkbox" type="checkbox" class="chkEpisodes" />
54-
<span>TV Shows</span>
55-
</label>
56-
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
57-
<input is="emby-checkbox" type="checkbox" class="chkSongs" />
58-
<span>Music</span>
59-
</label>
48+
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
49+
<input is="emby-checkbox" type="checkbox" class="chkMovies" />
50+
<span>Movies</span>
51+
</label>
52+
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
53+
<input is="emby-checkbox" type="checkbox" class="chkEpisodes" />
54+
<span>TV Shows</span>
55+
</label>
56+
<label class="checkboxContainer" style="float:left; width:auto; padding-right:10px">
57+
<input is="emby-checkbox" type="checkbox" class="chkSongs" />
58+
<span>Music</span>
59+
</label>
6060
</div>
61-
62-
6361

64-
65-
</div>
66-
<button title="Delete" class="btnDeleteDevice paper-icon-button-light removeHook" type="button" is="paper-icon-button-light"><i class="md-icon">delete</i></button>
62+
63+
64+
65+
</div>
66+
<button title="Delete" class="btnDeleteDevice paper-icon-button-light removeHook" type="button" is="paper-icon-button-light"><i class="md-icon">delete</i></button>
6767

6868
</div>
6969
</div>
@@ -116,36 +116,34 @@ <h3>Media Types</h3>
116116
<span>Songs</span>
117117
</label>
118118
</div>
119-
119+
120120
121121
</div>
122122
<button title="Delete" class="btnDeleteDevice paper-icon-button-light removeHook" type="button" is="paper-icon-button-light"><i class="md-icon">delete</i></button>
123123
124124
</div>
125125
</div> -->
126-
127-
128-
<!--
126+
<!--
129127
<div style="height:0; overflow: hidden;">
130128
<input type="text" name="fakeusernameremembered" tabindex="-1" />
131129
<input type="password" name="fakepasswordremembered" tabindex="-1" />
132130
</div>
133131
-->
134-
135-
136-
<h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
137-
<button title="Add" class="raised btnAddDevice submit mini emby-button" id="testNotification"
138-
style="margin-left:1em;" type="button" is="emby-button">
139-
<i class="md-icon">add</i>
140-
<span>Add</span>
141-
</button>
132+
133+
134+
<h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
135+
<button title="Add" class="raised btnAddDevice submit mini emby-button" id="testNotification"
136+
style="margin-left:1em;" type="button" is="emby-button">
137+
<i class="md-icon">add</i>
138+
<span>Add</span>
139+
</button>
142140
<div id="Hooks">
143141

144142

145143
</div>
146-
147-
148-
<br/>
144+
145+
146+
<br />
149147
<div>
150148
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
151149
</div>
@@ -170,7 +168,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
170168
});
171169
}
172170

173-
171+
174172

175173
$('.smtpConfigurationPage').on('pageinit', function (event) {
176174

@@ -191,7 +189,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
191189

192190
Dashboard.hideLoadingMsg();
193191

194-
192+
195193
});
196194

197195
$('.smtpConfigurationForm', page).on('submit', function (e) {
@@ -202,7 +200,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
202200
var config = { Hooks: [] };
203201
$('#Hooks .listItem', form).each(function (i) {
204202
var a = $(this).find('.txtUrl').first().val();
205-
203+
206204

207205
config.Hooks.push(
208206
{
@@ -216,7 +214,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
216214
withEpisodes: $(this).find('.chkEpisodes').first().checked(),
217215
withSongs: $(this).find('.chkSongs').first().checked(),
218216
onItemAdded: $(this).find('.chkOnItemAdded').first().checked()
219-
217+
220218
}
221219
);
222220
});
@@ -227,8 +225,8 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
227225
Dashboard.processPluginConfigurationUpdateResult);
228226
return false;
229227
});
230-
231-
228+
229+
232230

233231
}).on('pageshow', function (event) {
234232

@@ -239,7 +237,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
239237
ApiClient.getPluginConfiguration(pluginId).then(function (config) {
240238
for (var i in config.Hooks) {
241239
var a = $('#itemTemplate').clone();
242-
240+
243241
$(a).show();
244242
$('#Hooks', page).append(
245243
a
@@ -259,7 +257,7 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
259257
$(a).find('.chkEpisodes').first().checked(config.Hooks[i].withEpisodes || false);
260258
$(a).find('.chkSongs').first().checked(config.Hooks[i].withSongs || false);
261259
$(a).find('.chkOnItemAdded').first().checked(config.Hooks[i].onItemAdded || false);
262-
260+
263261

264262

265263
}
@@ -273,4 +271,4 @@ <h1 style="display:inline-block;vertical-align:middle;">Webhooks</h1>
273271
</script>
274272
</div>
275273
</body>
276-
</html>
274+
</html>

0 commit comments

Comments
 (0)