From 2d58ee9ef868b0329a151290bf6b9605a24f40e8 Mon Sep 17 00:00:00 2001 From: awirthy Date: Tue, 9 May 2023 23:05:16 +1000 Subject: [PATCH] v1.15 v1.15 --- DownloadYouTubeGo.go | 5 ++++- DownloadYouTubeGo.sh | 2 +- dockerfile | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/DownloadYouTubeGo.go b/DownloadYouTubeGo.go index 72b0a67..d788c26 100644 --- a/DownloadYouTubeGo.go +++ b/DownloadYouTubeGo.go @@ -671,8 +671,11 @@ func Run_YTDLP(sMediaFolder string, sRSSFolder string, RSSTemplate string, HTTPH PubDate := PubDateNow.Format("02/01/2006 03:04:05 -0700") log.Printf("PubDate: " + PubDate) + // ~~~~~~~~~ Replace & in string ~~~~~~~~~~~~ + jsonpayload_thumbnail_amp := strings.ReplaceAll(jsonpayload.thumbnail, "&", "&") + // ----- RSS Item Data ------- - RSSItemsData := "\t\t\n\t\t\t<![CDATA[" + jsonpayload.title + "]]>\n\t\t\t\n\t\t\t" + jsonpayload.webpage_url + "\n\t\t\t" + jsonpayload.webpage_url + "\n\t\t\t" + PubDate + "\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tNo\n\t\t\tyoutube\n\t\t\t\n\t\t\t" + jsonpayload.uploader_url + "\n\t\t\t\n\t\t\t" + jsonpayload.duration_string + "\n\t\t\n" + RSSItemsData := "\t\t\n\t\t\t<![CDATA[" + jsonpayload.title + "]]>\n\t\t\t\n\t\t\t" + jsonpayload.webpage_url + "\n\t\t\t" + jsonpayload.webpage_url + "\n\t\t\t" + PubDate + "\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tNo\n\t\t\tyoutube\n\t\t\t\n\t\t\t" + jsonpayload.uploader_url + "\n\t\t\t\n\t\t\t" + jsonpayload.duration_string + "\n\t\t\n" RSSData = strings.ReplaceAll(RSSData, "", RSSItemsData) // -- Add Data to RSS File ----- diff --git a/DownloadYouTubeGo.sh b/DownloadYouTubeGo.sh index 077c6ac..e9b8b30 100644 --- a/DownloadYouTubeGo.sh +++ b/DownloadYouTubeGo.sh @@ -1,5 +1,5 @@ # /etc/cron.d/ytdl # # go run TEST-Go.go -go run /opt/DownloadYouTubeGo/DownloadYouTubeGo-1.14/DownloadYouTubeGo.go >> /proc/1/fd/1; +go run /opt/DownloadYouTubeGo/DownloadYouTubeGo-1.15/DownloadYouTubeGo.go >> /proc/1/fd/1; echo "DONE" >> /proc/1/fd/1; \ No newline at end of file diff --git a/dockerfile b/dockerfile index a62c2f9..cfbed62 100644 --- a/dockerfile +++ b/dockerfile @@ -20,12 +20,12 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin RUN export GO111MODULE=on RUN cp /usr/share/zoneinfo/Australia/Melbourne /etc/localtime RUN echo "Australia/Melbourne" > /etc/timezone -RUN wget -O /tmp/DownloadYouTubeGo.tar.gz https://github.com/awirthy/DownloadYouTubeGo/archive/refs/tags/v1.14.tar.gz +RUN wget -O /tmp/DownloadYouTubeGo.tar.gz https://github.com/awirthy/DownloadYouTubeGo/archive/refs/tags/v1.15.tar.gz RUN mkdir -p /opt/DownloadYouTubeGo RUN tar zxf /tmp/DownloadYouTubeGo.tar.gz -C /opt/DownloadYouTubeGo RUN echo "#!/bin/sh" >> /etc/periodic/15min/DownloadYouTubeGo -RUN echo "/opt/DownloadYouTubeGo/DownloadYouTubeGo-1.14/DownloadYouTubeGo.sh" >> /etc/periodic/15min/DownloadYouTubeGo -RUN chmod 755 /opt/DownloadYouTubeGo/DownloadYouTubeGo-1.14/DownloadYouTubeGo.sh +RUN echo "/opt/DownloadYouTubeGo/DownloadYouTubeGo-1.15/DownloadYouTubeGo.sh" >> /etc/periodic/15min/DownloadYouTubeGo +RUN chmod 755 /opt/DownloadYouTubeGo/DownloadYouTubeGo-1.15/DownloadYouTubeGo.sh RUN chmod 755 /etc/periodic/15min/DownloadYouTubeGo CMD ["crond", "-f","-l","8"]