Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken Signature for Music Videos #90

Closed
wants to merge 1 commit into from

Conversation

lobermann
Copy link

Thanks to redviolet for the fix that can be found in this kodi forum post.
http://forum.kodi.tv/showthread.php?tid=79487&pid=1848515#pid1848515
As there has been no pull request or anything since the fix was made I just want to push this in to have it fixed completly.

@gitman0
Copy link

gitman0 commented Dec 10, 2014

This patch didn't seem to want to work at first. It was still throwing an exception when trying to compile the sig decryption algo. According to the log it wasn't able to include the main function's sub routines. But I just loaded it up again about an hour later after messing with it for a while, and videos that were not working are now working, and the log is showing the sub-routines, ie:

Worked:

00:41:53 T:4112  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'
00:41:53 T:4112  NOTICE: [YouTube-4.4.10] decrypt_signature : '|    ALGO FOR SIGNATURE DECRYPTION    |'
00:41:53 T:4112  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'
00:41:53 T:4112  NOTICE: [YouTube-4.4.10] decrypt_signature : 'def extractedSignatureAlgo(param):       
                                                def er__Lr(a,b,*args):
                                                        del a[0:b]
                                                def er__U8(a,*args):
                                                        a.reverse()
                                                def er__Q6(a,b,*args):
                                                        c=a[0]
                                                        a[0]=a[b%len(a)]
                                                        a[b]=c

                                                def fr(a):
                                                        a=list(a)
                                                        er__U8(a,45)
                                                        er__Q6(a,7)
                                                        er__Q6(a,19)
                                                        er__Q6(a,38)
                                                        er__Lr(a,3)
                                                        er__Q6(a,41)
                                                        er__Lr(a,1)
                                                        er__U8(a,13)
                                                        er__Q6(a,1)
                                                        return "".join(a)

                                                return fr(param)
                                            outSignature = extractedSignatureAlgo( inSignature )
                                            '
00:41:53 T:4112  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'

Failed:

00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'
00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : '|    ALGO FOR SIGNATURE DECRYPTION    |'
00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'
00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : 'def extractedSignatureAlgo(param):       
                                                def ar(a):
                                                        a=list(a)
                                                        $q__U8(a,45)
                                                        $q__Q6(a,7)
                                                        $q__Q6(a,19)
                                                        $q__Q6(a,38)
                                                        $q__Lr(a,3)
                                                        $q__Q6(a,41)
                                                        $q__Lr(a,1)
                                                        $q__U8(a,13)
                                                        $q__Q6(a,1)
                                                        return "".join(a)

                                                return ar(param)
                                            outSignature = extractedSignatureAlgo( inSignature )
                                            '
00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : '---------------------------------------'
00:02:18 T:5928  NOTICE: [YouTube-4.4.10] decrypt_signature : 'decryptSignature compile algo code EXCEPTION'

Note the Lr, U8, and Q6 function definitions are missing in the failed scenario

@lobermann
Copy link
Author

@gitman0 thanks for the feedback, but there seems to be also another problem. At least I can still play the videos that did not work before, without the change of this signature. Also I did not get the same error message as you get. What Video are you testing with?

@gitman0
Copy link

gitman0 commented Dec 10, 2014

@lobermann

This Daft Punk video would not play (and is actually what generated the algo exception): https://www.youtube.com/watch?v=LL-gyhZVvx0

Does anyone know if the algo cache persists through xbmc application restarts?

@lobermann
Copy link
Author

@gitman0 I just tested with that video and it works for me. Play without any issues.
Did you try my fork with the fix in it?

@gitman0
Copy link

gitman0 commented Dec 16, 2014

@lobermann Sorry I guess I wasn't very clear in my first post - the patch did not work after first applying it, but after about an hour trying to figure out why it wasn't working, I loaded it up again, and the videos that weren't working started working. The second log excerpt that I provided where it shows a failure is what I saw after initially applying the patch. I'm not seeing these failures anymore.

edit: that's why I was asking if the algorithm cache persists xbmc restarts

@lobermann lobermann closed this Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants