Giter Site home page Giter Site logo

Comments (6)

pukkandan avatar pukkandan commented on May 23, 2024

it's possible a video that belongs in a playlist could get missed during a long first run and then inadvertently added to the archive.log during the second, channel based job

Yes. Here's a trick to handle this:

(My example code is for windows, but you can easily adapt it for unix)

:start
set has_new_dl=0
youtube-dl URL --download-archive archivefile --exec "set has_new_dl=1 && echo.Downloaded: {}"`
if ["%has_new_dl%"]==["1"] goto start

This will loop until youtube-dl runs once without downloading anything

from yt-dlp.

pukkandan avatar pukkandan commented on May 23, 2024

Another trick would be to use youtube-dl URL --get-id --download-archive archivefile to check if there are any un-downloaded videos. But this will return any deleted/blocked videos as well

from yt-dlp.

undaunt avatar undaunt commented on May 23, 2024

Thanks, let me work on this today before I close things out but super helpful!

from yt-dlp.

undaunt avatar undaunt commented on May 23, 2024

Check out my main file https://github.com/undaunt/youtube-metadata-parse/blob/master/bin/yt-dlc-execute.sh

from yt-dlp.

pukkandan avatar pukkandan commented on May 23, 2024

I see you are using a file rather than a variable, but that's fine.

Have you tried running it though? I suspect it wont work. Since the exec command has no {}, youtube-dl tries to add one at the end. So the command is treated as --exec "touch $MEDIADIR/youtube/new.downloads {}". This is done so that something like --exec post.sh will get the filename as the argument.

You should probably use {} > $MEDIADIR/youtube/new.downloads instead of touch

Edit: Upon testing, it seems touch takes multiple files as args. It is touching both new.downloads as well as the downloaded file. So it will work, no problem

from yt-dlp.

undaunt avatar undaunt commented on May 23, 2024

I had issues setting the variable between the various bash shells. Touching a file and then checking for its existence cleared that up.

Thanks for testing, I just woke up and was going to re-test to confirm.

from yt-dlp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.