youtube-dl-server icon indicating copy to clipboard operation
youtube-dl-server copied to clipboard

Include other options in string?

Open ziggie216 opened this issue 5 years ago • 8 comments

I noticed that YouTube-dl-server will stop if there is a private video listed YT playlist. Is there a way I can include —ignore-errors

ziggie216 avatar Mar 14 '19 23:03 ziggie216

In order to include that options, you have to modify 'youtube-dl-server.py' as in the following.

  1. add the statement, 'YDL_IGNORE_ERR': None, below the line 16 app_default = {
  2. add the statement, 'ignoreerrors': ydl_vars['YDL_IGNORE_ERR'], below the line 101(?) return {

after that, re-start the docker-container.

스크린샷 2019-03-19 오전 8 05 54 스크린샷 2019-03-19 오전 8 06 16

ohnggni avatar Mar 18 '19 23:03 ohnggni

Has anyone tried running with the ignore error flag enabled? Wondering if there is any harm in just enabling it by default. We don't really report any errors back to the user anyway.

manbearwiz avatar Mar 19 '19 05:03 manbearwiz

Has anyone tried running with the ignore error flag enabled? Wondering if there is any harm in just enabling it by default. We don't really report any errors back to the user anyway.

I learned this flag does not work in python based on this docker. If any event (eg. any exception due to request of deleted clips) happened, youtube-dl-server.py was suspended and after that, I couldn't download any clip anymore. In order to escape this situation, it was the only way to restart the docker container.

I think we need some modification that the python script restarts automatically in case of happening any exception or error.

ohnggni avatar Mar 22 '19 05:03 ohnggni

Probably just need to catch and handle errors on that thread. Do you have a playlist you were testing with?

manbearwiz avatar Mar 22 '19 06:03 manbearwiz

Probably just need to catch and handle errors on that thread. Do you have a playlist you were testing with?

https://www.youtube.com/watch?v=wNtbfEaAw18&list=PLofOAS0adMaxoTfZf7HLJ5Vk3As5JuDtE&index=2

The link above is what I was testing. The fourth clip was deleted. So, when I tried to download it, the error happened and the process was suspended at that point. Then I tried downloading another clip(even very normal) but I couldn't do until I restarted the docker container.

ohnggni avatar Mar 22 '19 06:03 ohnggni

I've just found the solution. The part of the code above are slightly wrong. 'YDL_IGNORE_ERR': None => True

After that, --ignore-errors works so well and youtube-dl-server.py weren't suspended anymore.

ohnggni avatar Mar 22 '19 12:03 ohnggni

Do you think I should make this the default setting?

manbearwiz avatar Mar 22 '19 17:03 manbearwiz

Yes, when we try to download playlists, oftentimes we experience that kind of error. Otherwise, we will always have to restart the docker-container whenever we meet any exception or error of python.

ohnggni avatar Mar 23 '19 11:03 ohnggni