From e3db75cd0a5b3dfe770df2111c08067259ef516a Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 21 Feb 2026 19:10:52 +0100 Subject: [PATCH] fix(peertube-analyse): Handle missing automatic_captions field in yt-dlp output PeerTube videos don't include the automatic_captions field in their yt-dlp JSON output. The jq filter was attempting (.automatic_captions | keys) which fails with "null (null) has no keys" when the field is missing. Fixed by adding null-coalescing: ((.automatic_captions // {}) | keys) Also applied same fix to subtitles field for consistency. Co-Authored-By: Claude Opus 4.5 --- .../secubox-app-peertube/files/usr/sbin/peertube-analyse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/secubox/secubox-app-peertube/files/usr/sbin/peertube-analyse b/package/secubox/secubox-app-peertube/files/usr/sbin/peertube-analyse index 3eca8c22..7b601023 100755 --- a/package/secubox/secubox-app-peertube/files/usr/sbin/peertube-analyse +++ b/package/secubox/secubox-app-peertube/files/usr/sbin/peertube-analyse @@ -187,8 +187,8 @@ extract_metadata() { webpage_url: .webpage_url, thumbnail: .thumbnail, language: .language, - subtitles: (.subtitles | keys), - automatic_captions: (.automatic_captions | keys) + subtitles: ((.subtitles // {}) | keys), + automatic_captions: ((.automatic_captions // {}) | keys) }' "$meta_file.tmp" > "$meta_file" rm -f "$meta_file.tmp"