Ascoware / get-iplayer-automator

The goal of Get iPlayer Automator is to allow iTunes and your Mac to become the hub for your British Television experience regardless of where in the world you are. Currently, Get iPlayer Automator allows you to download and watch BBC and ITV shows on your Mac. Series-Link/PVR functionality ensures you will never miss your favourite shows. Programmes are fully tagged and added to iTunes automatically upon completion. It is simple and easy to use, and runs on any machine running Mac OS X 10.7 or later. And since the shows are in iTunes, it is extremely easy to transfer them to your iPod, iPhone, or Apple TV allowing you to enjoy your shows on the go or on your television.
GNU General Public License v3.0
144 stars 27 forks source link

GiA hangs on Retrieving Programme Metadata for many but not all ITV downloads #286

Closed hugofalkman closed 3 years ago

hugofalkman commented 4 years ago

This is ITV only, BBC works ok. I have waited an hour to verify it's really hanging. Sometimes it helps restarting GiA. Downie works fine for all ITV downloads. GiA 1.18.2 MacOS Catalina 1.15.4.

Here is an example log: Get iPlayer Automator 1.18.2 Initialized. GetITVShows: ITV Cache Update Starting <AppController: 0x7fd33573fa90>: Updating Programme Index Feeds...

/Applications/Get iPlayer Automator.app/Contents/Resources/get_iplayer/perl-darwin-2level/bin/get_iplayer -e14400 --type=tv --refresh --nopurge --profile-dir=/Users/zilla/Library/Application Support/Get iPlayer Automator .* INFO: Indexing tv programmes (concurrent) INFO: Added 6 tv programmes to cache GetITVListings (Error(Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=https://www.itv.com/hub/tonight/1a2803, NSErrorFailingURLKey=https://www.itv.com/hub/tonight/1a2803, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2103, NSLocalizedDescription=The request timed out.})): Unable to retreive programme episodes for https://www.itv.com/hub/tonight/1a2803 GetITVShows (Info): Episodes: 1765 Today Programmes: 209 <AppController: 0x7fd33573fa90>: Index Updated. GetITVShows: Update Finished /Applications/Get iPlayer Automator.app/Contents/Resources/get_iplayer/perl-darwin-2level/bin/get_iplayer --nocopyright -e60480000000000000 --type=tv,itv --listformat=SearchResult|||||||||||| --long --nopurge --search van der valk --profile-dir=/Users/zilla/Library/Application Support/Get iPlayer Automator --hide

INFO: Loading proxy settings... INFO: No proxy to load INFO: Proxy load complete. INFO: No proxy will be used AppController: Starting Downloads

Downloading Show 1/1:

ITV Download (ID=2a7219a0003): Downloading Van der Valk - Sun May 10 INFO: Preparing Request for Auth Info INFO: Requesting Metadata.

skovatch commented 4 years ago

Sorry, but I haven't seen any ITV issues in the past 3 days. Seems fine to me.

raythw commented 4 years ago

I had this problem with episode 3 of 'Flesh and Blood', another episode as well. Sometimes I've had it with other ITV shows as well, but never BBC. The download is completed perfectly, but then the programme fails to get added to the TV app and is left untagged, usually without show artwork as well. Another variation is for the programme to be added the TV application, again without artwork or tags, but added as a Home Video, presumably because the Media Type hasn't been defined. Exceptionally annoying, but I suspect impossible to repeat or fix...

PS: GiA hangs at 30-40 seconds before end of 'download' time, although download is actually complete, and it shows 'Downloaded' as around 88 to 89%. This happened again on episode 4 of 'Flesh and Blood'. Hope that helps!

PPS: As I typed the above PS GiA 'completed' the download VERY slowly and is now seems locked on downloading the thumbnail, but at this point the video still hasn't got any tags.

PPPS: OK, I finally solved this by quitting GiA and letting it 're-download' the episode. It didn't actually download it again, but it instantly added the tags and artwork and then added it to the TV app. If the problem re-occurs I'll do this again.

skovatch commented 3 years ago

I have been seeing this more and more often, and I think I tracked it down. There's a lot of bad logic around tasks, pipes, and file handles, and I think there's a bad leak as a result. I was able to download multiple copies of Poirot to completion, which wasn't working before.

skovatch commented 3 years ago

Please check if this is still an issue in v1.21.7.