Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 35

Slav
Apple Fan
Profile
Posts: 37
Reg: Sep 09, 2013
Toronto
370
01/20/15 12:12 PM (9 years ago)

YouTube playlist crashes app again (when a movie deleted)

If one movie from a list is deleted, app crashes, causing bad customer experience. I have many playlists and I wish I didn't have to check all of them every couple of days. No movie - the rest of a list still works OK, this was good solution. This problem emerged a year ago, later it was fixed, now it's back. You may check the earlier discussion: http://www.buzztouch.com/forum/thread.php?fid=D0B0215E0E547223217C457&tid=D0B0215E0E547223217C457 Maybe there's a way to adjust the code to avoid it? A plugin update again would be nice.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/20/15 09:37 PM (9 years ago)
Well, how good is your code? You can always write up a little 'check' to see if the resource is there before it loads. I use this snippet in my SmugClimate to ensure the distant end talks... You're welcome to modify it for your needs. -(BOOL)canReach { BT_reachability *r = [BT_reachability reachabilityWithHostname:@"m.google.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; if(internetStatus == NotReachable){ // no connection UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Ai Adai!" message:@"Unable to Connect to Network..." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; return FALSE; }else{ // connection return TRUE; } } Because the forum messes up the formatting, you can see what it 'should' look like in code here: https://dl.dropboxusercontent.com/u/115208762/canReach.png You'll want to substitute 'm.google.com' with the URL to your resource, whatever it may be. You'd be well off to use some kind of property to hold the URL value, so you could use it dynamically for each video or what have you... Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/20/15 09:41 PM (9 years ago)
After all that is setup, you'll need to throw an 'if' statement to play or not to play... if (canReach == true) { play } else { don't play } or something similar... Cheers! -- Smug
 
Slav
Apple Fan
Profile
Posts: 37
Reg: Sep 09, 2013
Toronto
370
like
01/20/15 09:58 PM (9 years ago)
Thank you, SmugWimp. I guess the reason for me to be so huge Buzztouch devotee is that code is not my strong point. Lists monitoring seems to be temporary solution for now. As well as hope for plugin upgrade
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
01/21/15 09:26 PM (9 years ago)
Someone suggested to make your own list. That way the song won't be deleted off the list. Would that work?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.