Closed fessacchiotto closed 7 years ago
It works in most cases, but for playlists, the output of the server is often the one I've pasted above. If I restart the server and begin to connect by refreshing from the podcast app (on iOS 10 the stock Apple app) it works well and updates the episodes. After some time, it looks like it starts having problems. Thank for your great software, anyway! :)
@balestrieri I can reproduce the problem. It happens (at least for me) when request are processed in parallel. This change should fix the problem: https://github.com/Feuermurmel/youtube-podcast-gateway/pull/16
Can you test this?
Hi @Feuermurmel. I copied the two changed files in the original directory and now it looks like it is working ... :)
FYI, I've received the following at the start (but, afterwards, I set the LC_ALL variable to C).
[6]: Handling request for /playlist/PLf_n1y8cN9Navz3k7R4dVaCV8IVcjUZIH ...
Requesting https://www.googleapis.com/youtube/v3/channels?maxResults=50&forUsername=Minchilli1&alt=json&part=snippet ...
Requesting https://www.googleapis.com/youtube/v3/playlists?maxResults=50&alt=json&id=PLyl80QTKi0gPBcb32paMvXxcq7UUeJskV&part=snippet ...
Requesting https://www.googleapis.com/youtube/v3/channels?maxResults=50&alt=json&id=UC82By0y-2ZdjigNu5bWY4LQ&part=snippet ...
Requesting https://www.googleapis.com/youtube/v3/playlistItems?maxResults=50&alt=json&playlistId=PLyl80QTKi0gPBcb32paMvXxcq7UUeJskV&part=snippet ...
Requesting https://www.googleapis.com/youtube/v3/search?maxResults=50&channelId=UCp70JTbNw58nbOq4-xnCcOw&part=id&type=video&order=date&alt=json ...
Traceback (most recent call last):
File "./lib/gateway.py", line 226, in do_GET
self._handle_media_request(self._gateway.file_factory.get_file(rest[0], False))
File "./lib/gateway.py", line 291, in _handle_media_request
request = urllib.request.Request(file.download_url)
File "./lib/gateway.py", line 81, in download_url
self._download_url = self._get_download_url()
File "./lib/gateway.py", line 54, in _get_download_url
url = self._get_url_for_format(i)
File "./lib/gateway.py", line 72, in _get_url_for_format
'Getting the download URL failed: {}'.format(message))
Exception: Getting the download URL failed: WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
ERROR: requested format not available
@fessacchiotto Thanks for the report.
The warning is from youtube-dl, but does not represent a problem. I'll add code to set that environment variable when invoking youtube-dl
.