Skip to content

Commit

Permalink
decreaseActiveLookups after setting hasVideo
Browse files Browse the repository at this point in the history
In situations where conversion has been triggered before lookups completed, it is kicked off by decreaseActiveLookups (when the number of remaining lookups becomes 0). 
Hence this should be done _after_ setting hasVideo. 

This should fix Vimeo videos sometimes not loading when the site is whitelisted.
  • Loading branch information
ssp committed Dec 15, 2009
1 parent 6b41cf6 commit 92f03fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugin/CTFKillerVimeo.m
Expand Up @@ -225,12 +225,12 @@ - (void) HEADDownloadFinished: (CTFLoader *) loader {
NSLog(@"CTFKillerVimeo -HEADDownloadFinished:");
#endif

[self decreaseActiveLookups];

if ( [self canPlayResponseResult: [loader response]] ) {
[self setRedirectedURLString: [[[loader lastRequest] URL] absoluteString] ];
[self setHasVideo: YES];
}

[self decreaseActiveLookups];
}


Expand All @@ -240,12 +240,12 @@ - (void) HEADHDDownloadFinished: (CTFLoader *) loader {
NSLog(@"CTFKillerVimeo -HEADHDDownloadFinished:");
#endif

[self decreaseActiveLookups];

if ( [self canPlayResponseResult: [loader response]] ) {
[self setRedirectedHDURLString: [[[loader lastRequest] URL] absoluteString] ];
[self setHasVideoHD: YES];
}

[self decreaseActiveLookups];
}


Expand Down

0 comments on commit 92f03fc

Please sign in to comment.