diff --git a/config/developer/widgets/graph.yml b/config/developer/widgets/graph.yml
deleted file mode 100644
index 2727388..0000000
--- a/config/developer/widgets/graph.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-- type: extension
- url: http://localhost:8181/graph/prnk28
- allow-potentially-dangerous-html: true
- parameters:
- background-color: "#1d2025" # cell background
- primary-color: "#f3afaf" # cell foreground
- svg-height: 150 # height for graph svg
- show-months: true # show months on the graph
- show-weekdays: true # show weekdays on the graph
- font-size: 9 # size of weekdays & months text on graph
-
- # if true, it will transition the hue from background
- # to primary color per the number of commits.
- # otherwise it will just use the background hue for
- # 0 commits and the foreground hue for all others
- transition-hue: false
diff --git a/config/media/movies.yml b/config/media/movies.yml
deleted file mode 100644
index 0e0fde4..0000000
--- a/config/media/movies.yml
+++ /dev/null
@@ -1,494 +0,0 @@
-- size: full
- widgets:
- - type: custom-api
- title: Latest Movies
- frameless: true
- cache: 5m
- options:
- base-url: http://umbrel.tail51ffca.ts.net:8096
- api-key: df9e869fec0b460bb6577302f5efd049
- user-name: "prad"
- library-name: "Movies"
- mode: "latest"
- item-count: "10"
- small-column: false
- show-thumbnail: true
- thumbnail-aspect-ratio: "default"
- template: |
- {{/* Required config options */}}
- {{ $baseURL := .Options.StringOr "base-url" "" }}
- {{ $apiKey := .Options.StringOr "api-key" "" }}
- {{ $userName := .Options.StringOr "user-name" "" }}
-
- {{/* Required config options for "latest" mode */}}
- {{ $libraryName := .Options.StringOr "library-name" "" }}
-
- {{/* Optional config options */}}
- {{ $mode := .Options.StringOr "mode" "latest" }}
- {{ $itemCount := .Options.StringOr "item-count" "10" }}
- {{ $mediaTypes := .Options.StringOr "media-types" "Movie,Episode,MusicAlbum" }}
- {{ $thumbAspectRatio := .Options.StringOr "thumbnail-aspect-ratio" "" }}
- {{ $isSmallColumn:= .Options.BoolOr "small-column" false }}
- {{ $showThumbnail := .Options.BoolOr "show-thumbnail" false }}
- {{ $showProgressBar := .Options.BoolOr "progress-bar" true }}
-
- {{/* Error message template */}}
- {{ define "errorMsg" }}
-
- {{ . }}
- {{ end }}
-
- {{/* Check required fields */}}
- {{ if or (eq $baseURL "") (eq $apiKey "") (eq $userName "") (eq $mode "") (and (eq $mode "latest") (eq $libraryName "")) }}
- {{ template "errorMsg" "Some required options are not set." }}
- {{ else }}
-
- {{/* Fetch user ID */}}
- {{ $userID := "" }}
- {{ $usersCall := newRequest (print $baseURL "/Users")
- | withParameter "api_key" $apiKey
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $user := $usersCall.JSON.Array "" }}
- {{ if eq ($user.String "Name") $userName }}
- {{ $userID = $user.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
- {{ if eq $userID "" }}
- {{ template "errorMsg" (printf "User '%s' not found." $userName) }}
- {{ else }}
-
- {{ $items := "" }}
-
- {{ if eq $mode "latest" }}
-
- {{/* Fetch library ID */}}
- {{ $libraryID := "" }}
- {{ $userViewsCall := newRequest (print $baseURL "/UserViews")
- | withParameter "api_key" $apiKey
- | withParameter "userId" $userID
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $item := $userViewsCall.JSON.Array "Items" }}
- {{ if eq ($item.String "Name") $libraryName }}
- {{ $libraryID = $item.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
-
- {{ if eq $libraryID "" }}
- {{ template "errorMsg" (printf "Library '%s' not found." $libraryName) }}
- {{ else }}
- {{/* Fetch latest items */}}
- {{ $latestCall := newRequest (print $baseURL "/Users/" $userID "/Items/Latest")
- | withParameter "api_key" $apiKey
- | withParameter "Limit" $itemCount
- | withParameter "ParentId" $libraryID
- | withParameter "IncludeItemTypes" $mediaTypes
- | withParameter "GroupItems" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $latestCall.JSON.Array "" }}
- {{ end }}
-
- {{ else if eq $mode "nextup" }}
-
- {{/* Fetch next up items */}}
- {{ $nextUpCall := newRequest (print $baseURL "/Shows/NextUp")
- | withParameter "api_key" $apiKey
- | withParameter "UserId" $userID
- | withParameter "Limit" $itemCount
- | withParameter "EnableResumable" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $nextUpCall.JSON.Array "Items" }}
-
- {{ else }}
- {{ template "errorMsg" "Unknown mode, expected 'latest' or 'nextup'" }}
- {{ end }}
-
- {{ if eq (len $items) 0 }}
- No items found, start streaming something!
- {{ else }}
-
- {{/* Display the item carousel */}}
-
-
- {{ range $n, $item := $items }}
- {{/* Common item variables */}}
- {{ $mediaType := $item.String "Type" }}
- {{ $title := $item.String "Name" }}
- {{ $itemID := $item.String "Id" }}
-
- {{/* Media type specific variables */}}
- {{ $seriesTitle := "" }}
- {{ $artist := "" }}
- {{ $seriesID := "" }}
- {{ $season := "" }}
- {{ $episode := "" }}
- {{ $playPercentage := "" }}
- {{ $unwatchedEpisodeCount := "" }}
-
- {{ if eq $mediaType "Movie" }}
- {{ else if eq $mediaType "Series" }}
- {{ $unwatchedEpisodeCount = $item.Int "UserData.UnplayedItemCount" }}
- {{ else if eq $mediaType "Episode" }}
- {{ $unwatchedEpisodeCount = 1 }}
- {{ $seriesTitle = $item.String "SeriesName" }}
- {{ $seriesID = $item.String "SeriesId" }}
- {{ $season = $item.Int "ParentIndexNumber" }}
- {{ $episode = $item.Int "IndexNumber" }}
-
- {{ if $item.Exists "UserData.PlayedPercentage" }}
- {{ $playPercentage = $item.String "UserData.PlayedPercentage" }}
- {{ end }}
-
- {{/* For latest always refer to the series not individual episodes */}}
- {{ if eq $mode "latest" }}
- {{ $itemID = $seriesID }}
- {{ $title = $seriesTitle }}
- {{ end }}
- {{ else if eq $mediaType "MusicAlbum" }}
- {{ $artist = $item.String "AlbumArtist" }}
- {{ end }}
-
- {{ $linkURL := print $baseURL "/web/#/details?id=" $itemID }}
- {{ $thumbURL := "" }}
- {{ if not (eq $playPercentage "") }}
- {{/* $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey "&percentPlayed=" $playPercentage */}}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ else }}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ end }}
-
-
- {{ if $showThumbnail }}
-
-

-
- {{ if and ($showProgressBar) (not (eq $playPercentage "")) }}
-
- {{ end }}
-
- {{ end }}
-
-
-
- {{ end }}
-
-
- {{ end }}
-
- {{ end }}
-
- {{ end }}
- - type: custom-api
- title: Up Next Movies
- frameless: true
- cache: 5m
- options:
- base-url: http://umbrel.tail51ffca.ts.net:8096
- api-key: df9e869fec0b460bb6577302f5efd049
- user-name: "prad"
- library-name: "Movies"
- mode: "nextup"
- item-count: "10"
- small-column: false
- show-thumbnail: true
- thumbnail-aspect-ratio: "default"
- template: |
- {{/* Required config options */}}
- {{ $baseURL := .Options.StringOr "base-url" "" }}
- {{ $apiKey := .Options.StringOr "api-key" "" }}
- {{ $userName := .Options.StringOr "user-name" "" }}
-
- {{/* Required config options for "latest" mode */}}
- {{ $libraryName := .Options.StringOr "library-name" "" }}
-
- {{/* Optional config options */}}
- {{ $mode := .Options.StringOr "mode" "latest" }}
- {{ $itemCount := .Options.StringOr "item-count" "10" }}
- {{ $mediaTypes := .Options.StringOr "media-types" "Movie,Episode,MusicAlbum" }}
- {{ $thumbAspectRatio := .Options.StringOr "thumbnail-aspect-ratio" "" }}
- {{ $isSmallColumn:= .Options.BoolOr "small-column" false }}
- {{ $showThumbnail := .Options.BoolOr "show-thumbnail" false }}
- {{ $showProgressBar := .Options.BoolOr "progress-bar" true }}
-
- {{/* Error message template */}}
- {{ define "errorMsg" }}
-
- {{ . }}
- {{ end }}
-
- {{/* Check required fields */}}
- {{ if or (eq $baseURL "") (eq $apiKey "") (eq $userName "") (eq $mode "") (and (eq $mode "latest") (eq $libraryName "")) }}
- {{ template "errorMsg" "Some required options are not set." }}
- {{ else }}
-
- {{/* Fetch user ID */}}
- {{ $userID := "" }}
- {{ $usersCall := newRequest (print $baseURL "/Users")
- | withParameter "api_key" $apiKey
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $user := $usersCall.JSON.Array "" }}
- {{ if eq ($user.String "Name") $userName }}
- {{ $userID = $user.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
- {{ if eq $userID "" }}
- {{ template "errorMsg" (printf "User '%s' not found." $userName) }}
- {{ else }}
-
- {{ $items := "" }}
-
- {{ if eq $mode "latest" }}
-
- {{/* Fetch library ID */}}
- {{ $libraryID := "" }}
- {{ $userViewsCall := newRequest (print $baseURL "/UserViews")
- | withParameter "api_key" $apiKey
- | withParameter "userId" $userID
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $item := $userViewsCall.JSON.Array "Items" }}
- {{ if eq ($item.String "Name") $libraryName }}
- {{ $libraryID = $item.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
-
- {{ if eq $libraryID "" }}
- {{ template "errorMsg" (printf "Library '%s' not found." $libraryName) }}
- {{ else }}
- {{/* Fetch latest items */}}
- {{ $latestCall := newRequest (print $baseURL "/Users/" $userID "/Items/Latest")
- | withParameter "api_key" $apiKey
- | withParameter "Limit" $itemCount
- | withParameter "ParentId" $libraryID
- | withParameter "IncludeItemTypes" $mediaTypes
- | withParameter "GroupItems" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $latestCall.JSON.Array "" }}
- {{ end }}
-
- {{ else if eq $mode "nextup" }}
-
- {{/* Fetch next up items */}}
- {{ $nextUpCall := newRequest (print $baseURL "/Shows/NextUp")
- | withParameter "api_key" $apiKey
- | withParameter "UserId" $userID
- | withParameter "Limit" $itemCount
- | withParameter "EnableResumable" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $nextUpCall.JSON.Array "Items" }}
-
- {{ else }}
- {{ template "errorMsg" "Unknown mode, expected 'latest' or 'nextup'" }}
- {{ end }}
-
- {{ if eq (len $items) 0 }}
- No items found, start streaming something!
- {{ else }}
-
- {{/* Display the item carousel */}}
-
-
- {{ range $n, $item := $items }}
- {{/* Common item variables */}}
- {{ $mediaType := $item.String "Type" }}
- {{ $title := $item.String "Name" }}
- {{ $itemID := $item.String "Id" }}
-
- {{/* Media type specific variables */}}
- {{ $seriesTitle := "" }}
- {{ $artist := "" }}
- {{ $seriesID := "" }}
- {{ $season := "" }}
- {{ $episode := "" }}
- {{ $playPercentage := "" }}
- {{ $unwatchedEpisodeCount := "" }}
-
- {{ if eq $mediaType "Movie" }}
- {{ else if eq $mediaType "Series" }}
- {{ $unwatchedEpisodeCount = $item.Int "UserData.UnplayedItemCount" }}
- {{ else if eq $mediaType "Episode" }}
- {{ $unwatchedEpisodeCount = 1 }}
- {{ $seriesTitle = $item.String "SeriesName" }}
- {{ $seriesID = $item.String "SeriesId" }}
- {{ $season = $item.Int "ParentIndexNumber" }}
- {{ $episode = $item.Int "IndexNumber" }}
-
- {{ if $item.Exists "UserData.PlayedPercentage" }}
- {{ $playPercentage = $item.String "UserData.PlayedPercentage" }}
- {{ end }}
-
- {{/* For latest always refer to the series not individual episodes */}}
- {{ if eq $mode "latest" }}
- {{ $itemID = $seriesID }}
- {{ $title = $seriesTitle }}
- {{ end }}
- {{ else if eq $mediaType "MusicAlbum" }}
- {{ $artist = $item.String "AlbumArtist" }}
- {{ end }}
-
- {{ $linkURL := print $baseURL "/web/#/details?id=" $itemID }}
- {{ $thumbURL := "" }}
- {{ if not (eq $playPercentage "") }}
- {{/* $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey "&percentPlayed=" $playPercentage */}}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ else }}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ end }}
-
-
- {{ if $showThumbnail }}
-
-

-
- {{ if and ($showProgressBar) (not (eq $playPercentage "")) }}
-
- {{ end }}
-
- {{ end }}
-
-
-
- {{ end }}
-
-
- {{ end }}
-
- {{ end }}
-
- {{ end }}
-
-
diff --git a/config/media/tv.yml b/config/media/tv.yml
deleted file mode 100644
index c29ef1a..0000000
--- a/config/media/tv.yml
+++ /dev/null
@@ -1,494 +0,0 @@
-- size: full
- widgets:
- - type: custom-api
- title: Latest TV
- frameless: true
- cache: 5m
- options:
- base-url: http://umbrel.tail51ffca.ts.net:8096
- api-key: df9e869fec0b460bb6577302f5efd049
- user-name: "prad"
- library-name: "TV"
- mode: "latest"
- item-count: "10"
- small-column: false
- show-thumbnail: true
- thumbnail-aspect-ratio: "default"
- template: |
- {{/* Required config options */}}
- {{ $baseURL := .Options.StringOr "base-url" "" }}
- {{ $apiKey := .Options.StringOr "api-key" "" }}
- {{ $userName := .Options.StringOr "user-name" "" }}
-
- {{/* Required config options for "latest" mode */}}
- {{ $libraryName := .Options.StringOr "library-name" "" }}
-
- {{/* Optional config options */}}
- {{ $mode := .Options.StringOr "mode" "latest" }}
- {{ $itemCount := .Options.StringOr "item-count" "10" }}
- {{ $mediaTypes := .Options.StringOr "media-types" "Movie,Episode,MusicAlbum" }}
- {{ $thumbAspectRatio := .Options.StringOr "thumbnail-aspect-ratio" "" }}
- {{ $isSmallColumn:= .Options.BoolOr "small-column" false }}
- {{ $showThumbnail := .Options.BoolOr "show-thumbnail" false }}
- {{ $showProgressBar := .Options.BoolOr "progress-bar" true }}
-
- {{/* Error message template */}}
- {{ define "errorMsg" }}
-
- {{ . }}
- {{ end }}
-
- {{/* Check required fields */}}
- {{ if or (eq $baseURL "") (eq $apiKey "") (eq $userName "") (eq $mode "") (and (eq $mode "latest") (eq $libraryName "")) }}
- {{ template "errorMsg" "Some required options are not set." }}
- {{ else }}
-
- {{/* Fetch user ID */}}
- {{ $userID := "" }}
- {{ $usersCall := newRequest (print $baseURL "/Users")
- | withParameter "api_key" $apiKey
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $user := $usersCall.JSON.Array "" }}
- {{ if eq ($user.String "Name") $userName }}
- {{ $userID = $user.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
- {{ if eq $userID "" }}
- {{ template "errorMsg" (printf "User '%s' not found." $userName) }}
- {{ else }}
-
- {{ $items := "" }}
-
- {{ if eq $mode "latest" }}
-
- {{/* Fetch library ID */}}
- {{ $libraryID := "" }}
- {{ $userViewsCall := newRequest (print $baseURL "/UserViews")
- | withParameter "api_key" $apiKey
- | withParameter "userId" $userID
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $item := $userViewsCall.JSON.Array "Items" }}
- {{ if eq ($item.String "Name") $libraryName }}
- {{ $libraryID = $item.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
-
- {{ if eq $libraryID "" }}
- {{ template "errorMsg" (printf "Library '%s' not found." $libraryName) }}
- {{ else }}
- {{/* Fetch latest items */}}
- {{ $latestCall := newRequest (print $baseURL "/Users/" $userID "/Items/Latest")
- | withParameter "api_key" $apiKey
- | withParameter "Limit" $itemCount
- | withParameter "ParentId" $libraryID
- | withParameter "IncludeItemTypes" $mediaTypes
- | withParameter "GroupItems" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $latestCall.JSON.Array "" }}
- {{ end }}
-
- {{ else if eq $mode "nextup" }}
-
- {{/* Fetch next up items */}}
- {{ $nextUpCall := newRequest (print $baseURL "/Shows/NextUp")
- | withParameter "api_key" $apiKey
- | withParameter "UserId" $userID
- | withParameter "Limit" $itemCount
- | withParameter "EnableResumable" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $nextUpCall.JSON.Array "Items" }}
-
- {{ else }}
- {{ template "errorMsg" "Unknown mode, expected 'latest' or 'nextup'" }}
- {{ end }}
-
- {{ if eq (len $items) 0 }}
- No items found, start streaming something!
- {{ else }}
-
- {{/* Display the item carousel */}}
-
-
- {{ range $n, $item := $items }}
- {{/* Common item variables */}}
- {{ $mediaType := $item.String "Type" }}
- {{ $title := $item.String "Name" }}
- {{ $itemID := $item.String "Id" }}
-
- {{/* Media type specific variables */}}
- {{ $seriesTitle := "" }}
- {{ $artist := "" }}
- {{ $seriesID := "" }}
- {{ $season := "" }}
- {{ $episode := "" }}
- {{ $playPercentage := "" }}
- {{ $unwatchedEpisodeCount := "" }}
-
- {{ if eq $mediaType "Movie" }}
- {{ else if eq $mediaType "Series" }}
- {{ $unwatchedEpisodeCount = $item.Int "UserData.UnplayedItemCount" }}
- {{ else if eq $mediaType "Episode" }}
- {{ $unwatchedEpisodeCount = 1 }}
- {{ $seriesTitle = $item.String "SeriesName" }}
- {{ $seriesID = $item.String "SeriesId" }}
- {{ $season = $item.Int "ParentIndexNumber" }}
- {{ $episode = $item.Int "IndexNumber" }}
-
- {{ if $item.Exists "UserData.PlayedPercentage" }}
- {{ $playPercentage = $item.String "UserData.PlayedPercentage" }}
- {{ end }}
-
- {{/* For latest always refer to the series not individual episodes */}}
- {{ if eq $mode "latest" }}
- {{ $itemID = $seriesID }}
- {{ $title = $seriesTitle }}
- {{ end }}
- {{ else if eq $mediaType "MusicAlbum" }}
- {{ $artist = $item.String "AlbumArtist" }}
- {{ end }}
-
- {{ $linkURL := print $baseURL "/web/#/details?id=" $itemID }}
- {{ $thumbURL := "" }}
- {{ if not (eq $playPercentage "") }}
- {{/* $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey "&percentPlayed=" $playPercentage */}}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ else }}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ end }}
-
-
- {{ if $showThumbnail }}
-
-

-
- {{ if and ($showProgressBar) (not (eq $playPercentage "")) }}
-
- {{ end }}
-
- {{ end }}
-
-
-
- {{ end }}
-
-
- {{ end }}
-
- {{ end }}
-
- {{ end }}
- - type: custom-api
- title: Up Next TV
- frameless: true
- cache: 5m
- options:
- base-url: http://umbrel.tail51ffca.ts.net:8096
- api-key: df9e869fec0b460bb6577302f5efd049
- user-name: "prad"
- library-name: "TV"
- mode: "nextup"
- item-count: "10"
- small-column: false
- show-thumbnail: true
- thumbnail-aspect-ratio: "default"
- template: |
- {{/* Required config options */}}
- {{ $baseURL := .Options.StringOr "base-url" "" }}
- {{ $apiKey := .Options.StringOr "api-key" "" }}
- {{ $userName := .Options.StringOr "user-name" "" }}
-
- {{/* Required config options for "latest" mode */}}
- {{ $libraryName := .Options.StringOr "library-name" "" }}
-
- {{/* Optional config options */}}
- {{ $mode := .Options.StringOr "mode" "latest" }}
- {{ $itemCount := .Options.StringOr "item-count" "10" }}
- {{ $mediaTypes := .Options.StringOr "media-types" "Movie,Episode,MusicAlbum" }}
- {{ $thumbAspectRatio := .Options.StringOr "thumbnail-aspect-ratio" "" }}
- {{ $isSmallColumn:= .Options.BoolOr "small-column" false }}
- {{ $showThumbnail := .Options.BoolOr "show-thumbnail" false }}
- {{ $showProgressBar := .Options.BoolOr "progress-bar" true }}
-
- {{/* Error message template */}}
- {{ define "errorMsg" }}
-
- {{ . }}
- {{ end }}
-
- {{/* Check required fields */}}
- {{ if or (eq $baseURL "") (eq $apiKey "") (eq $userName "") (eq $mode "") (and (eq $mode "latest") (eq $libraryName "")) }}
- {{ template "errorMsg" "Some required options are not set." }}
- {{ else }}
-
- {{/* Fetch user ID */}}
- {{ $userID := "" }}
- {{ $usersCall := newRequest (print $baseURL "/Users")
- | withParameter "api_key" $apiKey
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $user := $usersCall.JSON.Array "" }}
- {{ if eq ($user.String "Name") $userName }}
- {{ $userID = $user.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
- {{ if eq $userID "" }}
- {{ template "errorMsg" (printf "User '%s' not found." $userName) }}
- {{ else }}
-
- {{ $items := "" }}
-
- {{ if eq $mode "latest" }}
-
- {{/* Fetch library ID */}}
- {{ $libraryID := "" }}
- {{ $userViewsCall := newRequest (print $baseURL "/UserViews")
- | withParameter "api_key" $apiKey
- | withParameter "userId" $userID
- | withHeader "Accept" "application/json"
- | getResponse }}
-
- {{ range $i, $item := $userViewsCall.JSON.Array "Items" }}
- {{ if eq ($item.String "Name") $libraryName }}
- {{ $libraryID = $item.String "Id" }}
- {{ break }}
- {{ end }}
- {{ end }}
-
- {{ if eq $libraryID "" }}
- {{ template "errorMsg" (printf "Library '%s' not found." $libraryName) }}
- {{ else }}
- {{/* Fetch latest items */}}
- {{ $latestCall := newRequest (print $baseURL "/Users/" $userID "/Items/Latest")
- | withParameter "api_key" $apiKey
- | withParameter "Limit" $itemCount
- | withParameter "ParentId" $libraryID
- | withParameter "IncludeItemTypes" $mediaTypes
- | withParameter "GroupItems" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $latestCall.JSON.Array "" }}
- {{ end }}
-
- {{ else if eq $mode "nextup" }}
-
- {{/* Fetch next up items */}}
- {{ $nextUpCall := newRequest (print $baseURL "/Shows/NextUp")
- | withParameter "api_key" $apiKey
- | withParameter "UserId" $userID
- | withParameter "Limit" $itemCount
- | withParameter "EnableResumable" "true"
- | withHeader "Accept" "application/json"
- | getResponse }}
- {{ $items = $nextUpCall.JSON.Array "Items" }}
-
- {{ else }}
- {{ template "errorMsg" "Unknown mode, expected 'latest' or 'nextup'" }}
- {{ end }}
-
- {{ if eq (len $items) 0 }}
- No items found, start streaming something!
- {{ else }}
-
- {{/* Display the item carousel */}}
-
-
- {{ range $n, $item := $items }}
- {{/* Common item variables */}}
- {{ $mediaType := $item.String "Type" }}
- {{ $title := $item.String "Name" }}
- {{ $itemID := $item.String "Id" }}
-
- {{/* Media type specific variables */}}
- {{ $seriesTitle := "" }}
- {{ $artist := "" }}
- {{ $seriesID := "" }}
- {{ $season := "" }}
- {{ $episode := "" }}
- {{ $playPercentage := "" }}
- {{ $unwatchedEpisodeCount := "" }}
-
- {{ if eq $mediaType "Movie" }}
- {{ else if eq $mediaType "Series" }}
- {{ $unwatchedEpisodeCount = $item.Int "UserData.UnplayedItemCount" }}
- {{ else if eq $mediaType "Episode" }}
- {{ $unwatchedEpisodeCount = 1 }}
- {{ $seriesTitle = $item.String "SeriesName" }}
- {{ $seriesID = $item.String "SeriesId" }}
- {{ $season = $item.Int "ParentIndexNumber" }}
- {{ $episode = $item.Int "IndexNumber" }}
-
- {{ if $item.Exists "UserData.PlayedPercentage" }}
- {{ $playPercentage = $item.String "UserData.PlayedPercentage" }}
- {{ end }}
-
- {{/* For latest always refer to the series not individual episodes */}}
- {{ if eq $mode "latest" }}
- {{ $itemID = $seriesID }}
- {{ $title = $seriesTitle }}
- {{ end }}
- {{ else if eq $mediaType "MusicAlbum" }}
- {{ $artist = $item.String "AlbumArtist" }}
- {{ end }}
-
- {{ $linkURL := print $baseURL "/web/#/details?id=" $itemID }}
- {{ $thumbURL := "" }}
- {{ if not (eq $playPercentage "") }}
- {{/* $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey "&percentPlayed=" $playPercentage */}}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ else }}
- {{ $thumbURL = concat $baseURL "/Items/" $itemID "/Images/Primary?api_key=" $apiKey }}
- {{ end }}
-
-
- {{ if $showThumbnail }}
-
-

-
- {{ if and ($showProgressBar) (not (eq $playPercentage "")) }}
-
- {{ end }}
-
- {{ end }}
-
-
-
- {{ end }}
-
-
- {{ end }}
-
- {{ end }}
-
- {{ end }}
-
-
diff --git a/config/news/header.yml b/config/news/header.yml
deleted file mode 100644
index e3555ae..0000000
--- a/config/news/header.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# Masthead + markets ticker — the newspaper banner
-- type: html
- source: |
-
-
-- type: markets
- hide-header: true
- markets:
- - symbol: BTC-USD
- name: Bitcoin
- - symbol: ETH-USD
- name: Ethereum
- - symbol: MAGS
- name: Mag7
- - symbol: QQQ
- name: Nasdaq
diff --git a/config/news/widgets/ical-personal.yml b/config/news/widgets/ical-personal.yml
deleted file mode 100644
index a0572aa..0000000
--- a/config/news/widgets/ical-personal.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-- type: custom-api
- title: Personal Events
- cache: 15m
- url: http://glances-ical-api:8076/events
- parameters:
- url: https://calendar.google.com/calendar/ical/prnk28%40gmail.com/public/basic.ics
- limit: 5
- template: |
- {{ $events := .JSON.Array "events" }}
- {{ $count := len $events }}
- {{ $limit := 3 }}
-
- {{ if eq $count 0 }}
-
- No entries found.
-
- {{ end }}
-
-
-
- {{ range $i, $e := $events }}
- {{ $ongoing := $e.Bool "ongoing" }}
- {{ if $ongoing }}
- {{ $start := $e.String "start" | parseTime "rfc3339" }}
- {{ $end := $e.String "end" | parseTime "rfc3339" }}
- {{ $name := $e.String "name" }}
- {{ $url := $e.String "url" }}
- -
-
-
-
- {{ if $url }}
-
{{ $name }}
- {{ else }}
-
{{ $name }}
- {{ end }}
-
{{ $start | formatTime "Mon, 02 Jan 2006" }}
-
-
-
- ends
-
-
-
- {{ end }}
- {{ end }}
-
-
-
- {{ $shown := 0 }}
-
- {{ range $i, $e := $events }}
- {{ $ongoing := $e.Bool "ongoing" }}
- {{ if not $ongoing }}
- {{ $start := $e.String "start" | parseTime "rfc3339" }}
- {{ $name := $e.String "name" }}
- {{ $url := $e.String "url" }}
- -
-
-
-
- {{ if $url }}
-
{{ $name }}
- {{ else }}
-
{{ $name }}
- {{ end }}
-
{{ $start | formatTime "Mon, 02 Jan 2006" }}
-
-
-
-
-
- {{ $shown = add $shown 1 }}
- {{ end }}
- {{ end }}
-
diff --git a/config/news/widgets/ical-work.yml b/config/news/widgets/ical-work.yml
deleted file mode 100644
index 1e4eb7c..0000000
--- a/config/news/widgets/ical-work.yml
+++ /dev/null
@@ -1,76 +0,0 @@
-- type: custom-api
- title: Work Schedule
- cache: 15m
- url: http://glances-ical-api:8076/events
- parameters:
- url: https://calendar.google.com/calendar/ical/prad%40sonr.io/public/basic.ics
- limit: 5
- template: |
- {{ $events := .JSON.Array "events" }}
- {{ $count := len $events }}
- {{ $limit := 3 }}
-
- {{ if eq $count 0 }}
-
- No entries found.
-
- {{ end }}
-
-
-
- {{ range $i, $e := $events }}
- {{ $ongoing := $e.Bool "ongoing" }}
- {{ if $ongoing }}
- {{ $start := $e.String "start" | parseTime "rfc3339" }}
- {{ $end := $e.String "end" | parseTime "rfc3339" }}
- {{ $name := $e.String "name" }}
- {{ $url := $e.String "url" }}
- -
-
-
-
- {{ if $url }}
-
{{ $name }}
- {{ else }}
-
{{ $name }}
- {{ end }}
-
{{ $start | formatTime "Mon, 02 Jan 2006" }}
-
-
-
- ends
-
-
-
- {{ end }}
- {{ end }}
-
-
-
- {{ $shown := 0 }}
-
- {{ range $i, $e := $events }}
- {{ $ongoing := $e.Bool "ongoing" }}
- {{ if not $ongoing }}
- {{ $start := $e.String "start" | parseTime "rfc3339" }}
- {{ $name := $e.String "name" }}
- {{ $url := $e.String "url" }}
- -
-
-
-
- {{ if $url }}
-
{{ $name }}
- {{ else }}
-
{{ $name }}
- {{ end }}
-
{{ $start | formatTime "Mon, 02 Jan 2006" }}
-
-
-
-
-
- {{ $shown = add $shown 1 }}
- {{ end }}
- {{ end }}
-
diff --git a/config/news/widgets/rates.yml b/config/news/widgets/rates.yml
deleted file mode 100644
index 0872555..0000000
--- a/config/news/widgets/rates.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Macro rates box (St. Louis Fed / FRED). One shared template, three series.
-# ponytail: template was copy-pasted 4x across the config — collapsed to one anchor.
-define:
- fred-template: &fred-template |
- {{ $latest := .JSON.Float "observations.0.value" }}
- {{ $previous := .JSON.Float "observations.1.value" }}
- {{ $lastObserve := .JSON.String "observations.0.date" }}
- {{ $change := sub $latest $previous }}
-
-
-
-
- {{ printf "%+.2f" $change }}%
-
-
-
-
-
-- type: custom-api
- title: Secured Financing Rate
- cache: 12h
- url: https://api.stlouisfed.org/fred/series/observations?series_id=SOFR&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
- template: *fred-template
-
-- type: custom-api
- title: Federal Funds Rate
- cache: 12h
- url: https://api.stlouisfed.org/fred/series/observations?series_id=FEDFUNDS&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
- template: *fred-template
-
-- type: custom-api
- title: Real GDP
- cache: 12h
- url: https://api.stlouisfed.org/fred/series/observations?series_id=A191RL1Q225SBEA&api_key=${FRED_API_KEY}&file_type=json&sort_order=desc&limit=2
- template: *fred-template