Skip to content

Conversation

@auouymous
Copy link
Member

Fixes #837

@romlok
Copy link
Contributor

romlok commented Jul 4, 2020

Hi, thanks for looking into this.

I just checked out this branch and ran ./bin/gpodder. I still get two partial files; the first has the video, the second is zero bytes:

NBA 2K21 Is $$69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial.webm
NBA 2K21 Is $69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial

The client outputs the following error to the console for the episode:

Traceback (most recent call last):
  File "/data/src/gpodder/src/gpodder/download.py", line 863, in run
    headers, real_url = downloader.retrieve_resume(self.tempname, self.status_updated)
  File "/data/src/gpodder/share/gpodder/extensions/youtube-dl.py", line 88, in retrieve_resume
    os.rename(outtmpl, tempname)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mel/gPodder/Downloads/Jim Sterling/NBA 2K21 Is $$69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial' -> '/home/mel/gPodder/Downloads/Jim Sterling/NBA 2K21 Is $69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial'

Looks like it's missing the .webm extension on the source file.

@auouymous
Copy link
Member Author

Can you change to the 720p MP4 format and see if it works? It might still be using the system installed extension. But if the MP4 works, it could be related to #796.

@auouymous
Copy link
Member Author

I just noticed the error shows it is using the fixed extension, but testing the MP4 format will determine if #796 is breaking this.

@romlok
Copy link
Contributor

romlok commented Jul 4, 2020

Just tested with 720p mp4 and, yes, it worked as it should, thanks! 👍

@auouymous auouymous force-pushed the youtubedl-outtmpl branch from 4b1fc26 to 01c1cf5 Compare July 4, 2020 09:02
@auouymous
Copy link
Member Author

Updated patch works with webm or mp4.

@romlok
Copy link
Contributor

romlok commented Jul 4, 2020

I can confirm that the new version works when I have a webm format chosen. The resulting file has a .mp4 extension, rather than .webm, but can be played normally so I don't know if that's intended.

However, it seems to now not work for some mp4 formats, eg:
If I select "MP4 480p (854x480) youtube-dl" it works.
If I select "MP4 720p (1280x720)" it fails:

[gpodder.download] ERROR: No such file or directory while downloading "NBA 2K21 Is $69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About "Value"": /home/mel/gPodder/Downloads/Jim Sterling/NBA 2K21 Is $$69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial.mp4
Traceback (most recent call last):
  File "/data/src/gpodder/src/gpodder/download.py", line 863, in run
    headers, real_url = downloader.retrieve_resume(self.tempname, self.status_updated)
  File "/data/src/gpodder/share/gpodder/extensions/youtube-dl.py", line 89, in retrieve_resume
    os.rename(outtmpl + '.{}'.format(res['ext']), tempname)
FileNotFoundError: [Errno 2] No such file or directory: '/home/mel/gPodder/Downloads/Jim Sterling/NBA 2K21 Is $$69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial.mp4' -> '/home/mel/gPodder/Downloads/Jim Sterling/NBA 2K21 Is $69.99 On Next-Gen Consoles While 2K Spews Vague Nonsense About _Value_.mp4.partial'

In this case, the actual source file ends with just .mp4.partial, rather than .mp4.partial.mp4.

@auouymous auouymous force-pushed the youtubedl-outtmpl branch from 01c1cf5 to f02f592 Compare July 4, 2020 19:56
@auouymous
Copy link
Member Author

New patch fixes it. The mp4 extension on webm files is related to #796, download a file as webm that doesn't contain $ or %, and it will have the mp4 extension.

@romlok
Copy link
Contributor

romlok commented Jul 5, 2020

Confirmed! With the latest commit all the test cases I ran through downloaded and renamed successfully. 👍

@elelay elelay merged commit 248a963 into gpodder:master Jul 6, 2020
@elelay
Copy link
Member

elelay commented Jul 6, 2020

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

youtube-dl download with dollar symbol in the title results in 0-byte files

3 participants