Skip to content

Commit

Permalink
Make "Original Aspect Ratio" property available to WebHooks (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMelena authored May 25, 2024
1 parent dcff70e commit be96b62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Jellyfin.Plugin.Webhook/Helpers/DataObjectHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ public static Dictionary<string, object> AddBaseItemData(this Dictionary<string,
dataObject["Genres"] = string.Join(", ", item.Genres);
}

if (item is IHasAspectRatio aspectRatioItem && !string.IsNullOrEmpty(aspectRatioItem.AspectRatio))
{
dataObject["AspectRatio"] = aspectRatioItem.AspectRatio;
}

switch (item)
{
case Season season:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ See [Templates](Jellyfin.Plugin.Webhook/Templates) for sample templates.
- The media runtime, in [Ticks](https://docs.microsoft.com/en-us/dotnet/api/system.datetime.ticks)
- RunTime
- The media runtime, as `hh:mm:ss`
- AspectRatio
- Item original aspect ratio


- Playback
Expand Down

0 comments on commit be96b62

Please sign in to comment.