Did the latest youtube update break "play on xbmc"?
#1
I think so
I'm running xbmc 12.3 on windows and the latest XBMC remote on android 4.3
Youtube version 5.5 (which I updated yesterday) can't play on xbmc. I get a black screen on the phone and it just stays there.
So I used TB and restored version 5.2 and voila, that works as expected.
This happens on both my JB phone and ICS tablet, going back to 5.2 fixes the problem.

Is this known? Is it just a matter of waiting for a patch on xbmc remote to fix or did google bollox one more thing up for us?

Thanks
Reply
#2
update, 5.3.32 works also
Looks like changes in 5.5.x broke something
Reply
#3
Starting with version 5.5 youtube sends a different link. The remote has to parse the video id from the url and this obviously fails since the id is at a different position.

The new urls look like http://youtu.be/1234567890ABC
Reply
#4
Can be https and contains - and _ Wink

BTW some other remotes are already up to date Smile
Reply
#5
Still works with Yatse, just sayin.
Reply
#6
Yep YouTube app has changed the content of the intent it fires to "Title: URL" rather than just "URL".

I have managed to make myself a filthy hack to get me by until freezy releases the new version he has been working on.

This hack:
  • Has not been well tested!
  • Breaks compatibility with old versions of YouTube app!
  • Requires full un-install and re-install (new signatures)
  • ... so probably isn't worth your while unless you use this feature a lot as I did!

What the hack actually is, and please note I am only listing the subs/functions that I have changed here!

UrlIntentController.java (private void CheckIntent())

Code:
    private void checkIntent(){
        Intent intent = mActivity.getIntent();
        final String action = intent.getAction();

        if(action != null) {
            Log.i("CHECKINTENT", action);
            if ( action.equals(UrlIntentActivity.ACTION) ){
                final String subjectTxt = intent.getStringExtra(Intent.EXTRA_SUBJECT);

                // Youtube Filthy Hack
                String pathtemp = intent.getStringExtra(Intent.EXTRA_TEXT).trim();
            
                if ((pathtemp.toLowerCase().contains("youtu.be/") == true) || (pathtemp.toLowerCase().contains("youtube.com/") == true)) {
                    // This is a YOUTUBE link - fudge it.

                    if (pathtemp.contains(" ") == true) {
                        pathtemp = pathtemp.substring(pathtemp.lastIndexOf(' ')).trim();
                    }
                }
                
                final String path = pathtemp;
                
                // End Of Hack.
            
                if(isIMDB(subjectTxt)){
                    handleIMDb(path);
                    cleaupIntent(intent);
                }
                else if(isValidURL(path)){
                    handleURL(path);
                    cleaupIntent(intent);
                }

            }
        }
    }

YoutubeURLParser.java (public static String parseYoutubeURL)
Code:
    public static String parseYoutubeURL(Uri playuri) {
        Pattern patregex;
        
        if (playuri.getHost().endsWith("youtube.com") == true) {
            // We'll need to get the v= parameter from the URL and use
            // that to send to XBMC
            patregex = Pattern.compile("^http(:?s)?:\\/\\/(?:www\\.)?(?:youtube\\.com)\\/watch\\?(?=.*v=([\\w-]+))(?:\\S+)?$", Pattern.CASE_INSENSITIVE);
            
        } else if (playuri.getHost().endsWith("youtu.be") == true) {
            patregex = Pattern.compile("^http(:?s)?:\\/\\/(?:www\\.)?(?:youtu\\.be)(?=.*\\/([\\w-]+))(?:\\S+)?$", Pattern.CASE_INSENSITIVE);
                
        } else {
            patregex = null;
            return null;
        }

        final Pattern pattern = patregex;
        final Matcher matcher = pattern.matcher(playuri.toString());
        if (matcher.matches()) {
            return matcher.group(2);
        } else {
            return null;
        }
    }

Oh and I changed this ONE line in androidmanifest.xml too:
Code:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="10" />

No attach button on these forums so if you want APK PM me an email addy or something!
Reply
#7
Updated above hack to work with streams with ":" in the title.
Reply
#8
Nice, I use that feature a lot Smile pm'd
Reply
#9
Not been around for a while.. any progress on a permanent fix?

Another improvement would be that it returns you to where you were within the app, if you happen to multi-task away from it, then return to it. .- so often I'm switching apps, coming back to the remote wanting to just see the dpad and media control buttons.
Reply

Logout Mark Read Team Forum Stats Members Help
Did the latest youtube update break "play on xbmc"?0