Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Jellyfin.Plugin.Webhook/Configuration/Web/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ <h2 class="sectionTitle">Webhook</h2>
<input is="emby-checkbox" type="checkbox" data-name="chkEnableVideos"/>
<span>Videos</span>
</label>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" data-name="chkEnableLiveTV"/>
<span>Live TV</span>
</label>
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" data-name="chkSendAllProperties"/>
<span>Send All Properties (ignores template)</span>
Expand Down
2 changes: 2 additions & 0 deletions Jellyfin.Plugin.Webhook/Configuration/Web/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export default function (view) {
element.querySelector("[data-name=chkEnableAlbums]").checked = config.EnableAlbums || (typeof config.EnableAlbums == "undefined");
element.querySelector("[data-name=chkEnableSongs]").checked = config.EnableSongs || (typeof config.EnableSongs == "undefined");
element.querySelector("[data-name=chkEnableVideos]").checked = config.EnableVideos || (typeof config.EnableVideos == "undefined");
element.querySelector("[data-name=chkEnableLiveTV]").checked = config.EnableLiveTV || (typeof config.EnableLiveTV == "undefined");
element.querySelector("[data-name=txtWebhookName]").value = config.WebhookName || "";
element.querySelector("[data-name=txtWebhookUri]").value = config.WebhookUri || "";
element.querySelector("[data-name=chkSendAllProperties]").checked = config.SendAllProperties || false;
Expand All @@ -184,6 +185,7 @@ export default function (view) {
config.EnableAlbums = element.querySelector("[data-name=chkEnableAlbums]").checked || false;
config.EnableSongs = element.querySelector("[data-name=chkEnableSongs]").checked || false;
config.EnableVideos = element.querySelector("[data-name=chkEnableVideos]").checked || false;
config.EnableLiveTV = element.querySelector("[data-name=chkEnableLiveTV]").checked || false;
config.WebhookName = element.querySelector("[data-name=txtWebhookName]").value || "";
config.WebhookUri = element.querySelector("[data-name=txtWebhookUri]").value || "";
config.SendAllProperties = element.querySelector("[data-name=chkSendAllProperties]").checked || false;
Expand Down
5 changes: 5 additions & 0 deletions Jellyfin.Plugin.Webhook/Destinations/BaseOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public abstract class BaseOption
/// </summary>
public bool EnableVideos { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to notify on live TV.
/// </summary>
public bool EnableLiveTV { get; set; }

/// <summary>
/// Gets or sets a value indicating whether to send all possible properties.
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions Jellyfin.Plugin.Webhook/WebhookSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.LiveTv;
using Microsoft.Extensions.Logging;

namespace Jellyfin.Plugin.Webhook;
Expand Down Expand Up @@ -176,6 +177,11 @@ private static bool NotifyOnItem<T>(T baseOptions, Type? itemType)
return true;
}

if (baseOptions.EnableLiveTV && itemType == typeof(LiveTvChannel))
{
return true;
}

return false;
}

Expand Down