From 5390d1edf27563075d183866ed60f0e373e5c89c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Fri, 27 Dec 2019 22:46:45 +0100 Subject: pkgs/profpatsch/youtube2audiopodcast: fix a few things --- machines/profpatsch/haku.nix | 2 +- pkgs/profpatsch/youtube2audiopodcast/default.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/machines/profpatsch/haku.nix b/machines/profpatsch/haku.nix index 67626012..86866cce 100644 --- a/machines/profpatsch/haku.nix +++ b/machines/profpatsch/haku.nix @@ -111,7 +111,7 @@ in description = "serve a youtube playlist as rss"; wantedBy = [ "default.target" ]; script = "${pkgs.vuizvui.profpatsch.youtube2audiopodcast { - url = "${hakuHostName}${youtube2audiopodcastSubdir}"; + url = "https://${hakuHostName}${youtube2audiopodcastSubdir}"; internalPort = youtube2audiopodcastPort; }}"; serviceConfig.User = config.users.users.youtube2audiopodcast.name; diff --git a/pkgs/profpatsch/youtube2audiopodcast/default.nix b/pkgs/profpatsch/youtube2audiopodcast/default.nix index 0eb9724c..4cc6e6be 100644 --- a/pkgs/profpatsch/youtube2audiopodcast/default.nix +++ b/pkgs/profpatsch/youtube2audiopodcast/default.nix @@ -103,7 +103,7 @@ let ;; /video/*) ${youtube-dl-audio} "''${REQUEST_URI#/video/}" 1>&2 \ - && ${serve-http-file "audio/opus"} "./audio.opus" + && ${serve-http-file "audio/ogg"} "./audio.opus" ;; *) return 1 ;; esac @@ -122,14 +122,14 @@ let channelURL = "https://www.youtube.com/playlist?list=PLV9hywkogVcOuHJ8O121ulSfFDKUhJw66"; }); - transform-flat-playlist-to-rss = hostUrl: + transform-flat-playlist-to-rss = { videoUrl }: let playlist-item-info-jl = '' (\o -> { itemTitle: o.title , itemYoutubeLink: append "https://youtube.com/watch?v=" o.id ${/*TODO how to add the url here nicely?*/""} - , itemURL: append "${hostUrl}/" o.id + , itemURL: append "${videoUrl}/" o.id ${/*# TODO*/""} , itemDescription: "" @@ -165,7 +165,7 @@ let youtube-playlist-info "$1" ] "pipeline" [ - (transform-flat-playlist-to-rss config.url) + (transform-flat-playlist-to-rss { videoUrl = "${config.url}/video"; }) ] printFeed ]; -- cgit 1.4.1