mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Use latest youtube-dl in Dockerfile #119
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
FROM alpine:3.10
|
||||
|
||||
WORKDIR /app/
|
||||
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/download/2020.01.24/youtube-dl && \
|
||||
RUN wget -O /usr/bin/youtube-dl https://github.com/ytdl-org/youtube-dl/releases/latest/download/youtube-dl && \
|
||||
chmod +x /usr/bin/youtube-dl && \
|
||||
apk --no-cache add ca-certificates python ffmpeg
|
||||
COPY podsync /app/podsync
|
||||
|
||||
+4
-4
@@ -123,7 +123,7 @@ func main() {
|
||||
updates := make(chan *config.Feed, 16)
|
||||
defer close(updates)
|
||||
|
||||
//Create Cron
|
||||
// Create Cron
|
||||
c := cron.New(cron.WithChain(cron.SkipIfStillRunning(nil)))
|
||||
m := make(map[string]cron.EntryID)
|
||||
|
||||
@@ -145,21 +145,21 @@ func main() {
|
||||
|
||||
// Run cron scheduler
|
||||
group.Go(func() error {
|
||||
var cronid cron.EntryID
|
||||
var cronID cron.EntryID
|
||||
|
||||
for _, feed := range cfg.Feeds {
|
||||
if feed.CronSchedule == "" {
|
||||
feed.CronSchedule = fmt.Sprintf("@every %s", feed.UpdatePeriod.String())
|
||||
}
|
||||
_feed := feed
|
||||
if cronid, err = c.AddFunc(_feed.CronSchedule, func() {
|
||||
if cronID, err = c.AddFunc(_feed.CronSchedule, func() {
|
||||
log.Debugf("adding %q to update queue", _feed.ID)
|
||||
updates <- _feed
|
||||
}); err != nil {
|
||||
log.WithError(err).Fatalf("can't create cron task for feed: %s", _feed.ID)
|
||||
}
|
||||
|
||||
m[_feed.ID] = cronid
|
||||
m[_feed.ID] = cronID
|
||||
log.Debugf("-> %s (update '%s')", _feed.ID, _feed.CronSchedule)
|
||||
// Perform initial update after CLI restart
|
||||
updates <- _feed
|
||||
|
||||
Reference in New Issue
Block a user