Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress hook is not called if video file is not downloaded but metadata is. #13466

Closed
EraYaN opened this issue Jun 22, 2017 · 3 comments
Closed

Progress hook is not called if video file is not downloaded but metadata is. #13466

EraYaN opened this issue Jun 22, 2017 · 3 comments

Comments

@EraYaN
Copy link
Contributor

@EraYaN EraYaN commented Jun 22, 2017

  • [#] I've verified and I assure that I'm running youtube-dl 2017.06.18

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

The documentation states:

Progress hooks are guaranteed to be called at least once
    (with status "finished") if the download is successful.

Now when skip_download or simulate are True the progress_hook is never called. Even though there are files downloaded (metadata etc.)

Used options are:

self.ydl_opts = {
            'writeinfojson':True,       
            'writethumbnail':True,
            #'writesubtitles':True,
            #'writeautomaticsub':True,
            #'allsubtitles':True,
            'noprogress':True,
            'quiet':True,
            'prefer_ffmpeg':True,
            'encoding': 'utf-8',
            'cachedir': 'cache/',
            'outtmpl': os.path.realpath(os.path.join(root,'data/videos/%(uploader)s/%(title)s-%(id)s.%(ext)s')),
            'call_home': False,
            'logger': self.logger,
            'format':'bestaudio/audio_only/Audio_Only',
            'skip_download':True,
            'progress_hooks': [ self.progress_hook ]
        }

Now this works as long as neither of the mentions options are true. Now there is no way for the calling script to figure out where the file went.

Now I wonder is this a missing feature or is it by design?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 22, 2017

progress_hooks works for video downloading only. In case of skip_download no video is downloaded thus no hooks delivered.

@dstftw dstftw closed this Jun 22, 2017
@EraYaN
Copy link
Contributor Author

@EraYaN EraYaN commented Jun 22, 2017

Well then it is a feature request to still get the filename data from the call.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 22, 2017

There is a _filename in info dict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.