openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
45 stars 26 forks source link

log before long-events instead of after #96

Closed rgaudin closed 4 years ago

rgaudin commented 4 years ago

Logs are used mostly used as a forensic tool in case something went wrong.

But transfer related logs are written upon completion. It's also annoying when following the logs and not knowing if something slow or stuck.

[youtube] 1ubWja9gP3A: Downloading webpage
WARNING: video doesn't have subtitles
[youtube] 1ubWja9gP3A: Downloading thumbnail ...
[youtube] 1ubWja9gP3A: Writing thumbnail to: /Users/reg/data/pip/build/videos/1ubWja9gP3A/video.jpg
# nothing printed here but it takes forever
[youtube2zim::2020-05-22 15:16:22,362] INFO:downloaded /Users/reg/data/pip/build/videos/Y1W67I0Gp8Y/video.webm from cache at webm/low/Y1W67I0Gp8Y

It would be better to print out that we are now downloading (and that we finished). Same goes for uploads.