Sign up here and you can log into the forum!

YoutubeHD Playlists!

youtube/live365/pandora/flickr replacements & other web services

YoutubeHD Playlists!   

Postby RMerlin » Tue Apr 05, 2011 10:38 pm

As the professor would say on Futurama, "Good news everyone!". I found a way to work around the broken playlist handling :)

The only minor side-effect to this workaround is that the last playlist on every playlist page will be the first one repeated. Otherwise, single and multi-paged list of playlists should now be working.

UPDATE:I finally figured out what was actually causing YoutubeHD to fail with playlists. Details in this post. Implemented a new workaround, this time with no side effect that I can see (so far).

To retrieve this patched version, telnet into your WDTV, and run the following command:

Code: Select all
getpropxies


This command should already be run at boot time, but it doesn't seem to be on every configuration - I'll have to ask b-rad about this.

(PS: if you are not familiar with playlists and have a lot of bookmarks on Youtube, playlists are very convenient way to sort them out in categories)
Last edited by RMerlin on Wed Apr 06, 2011 7:40 pm, edited 1 time in total.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: YoutubeHD Playlists!   

Postby mad_ady » Wed Apr 06, 2011 11:04 am

I also confirm that this fix works. The last playlist is the same as the first one, but that's not an issue.

It's also true that the getproxies script is not automatically run at startup (for 1.02.21-0.4.7.3 at least). A quick workaround would be to include the command inside /tmp/S99user-script for now.

RMerlin: any ideas where the command would be called from? I couldn't find it referenced in /etc:
Code: Select all
# grep -r getproxies /etc/       
grep: /etc/.pwd.lock: No such file or directory
grep: /etc/exports: No such file or directory
grep: /etc/hosts.allow: No such file or directory
grep: /etc/hosts.deny: No such file or directory
User avatar
mad_ady
Developer
 
Posts: 4553
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: YoutubeHD Playlists!   

Postby joanjett1 » Wed Apr 06, 2011 12:03 pm

Great work guys. Do you know if this will be integrated into a new B-RAD WDTV firmware?

Thanks again!
joanjett1
DLX'er
 
Posts: 67
Joined: Sun Aug 15, 2010 3:28 am

Re: YoutubeHD Playlists!   

Postby RMerlin » Wed Apr 06, 2011 1:37 pm

joanjett1 wrote:Great work guys. Do you know if this will be integrated into a new B-RAD WDTV firmware?


It's already committed to the development branch, so whichever new version b-rad releases will use this updated script. And due to the numerous breakage in Youtube and Shoutcast in the past months, I'm glad b-rad implemented getproxies so people can easily get an up-to-date plugin very easily without having to wait for a new WDLXTV release :)
Last edited by RMerlin on Wed Apr 06, 2011 1:56 pm, edited 1 time in total.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: YoutubeHD Playlists!   

Postby RMerlin » Wed Apr 06, 2011 1:52 pm

mad_ady wrote:I also confirm that this fix works. The last playlist is the same as the first one, but that's not an issue.


Essentially, the way the WD code seems to work, from what I could understand:

- Request five items from Youtube, starting from item 1
- Request one item, starting from item 6

At this point, I assume dmaosd looks for something in particular to determine if there are more items to grab. If there is, it shows a down arrow, and lets you move to the next page. This is the part that doesn't work properly with Playlists - for some reason the WDTV thinks there are no items at all, and returns the error message.

What I do here is I modify any request that asks for one single item that is a playlist request, and make it asks for the first item instead of the 6th (so, there will always be a positive answer). That is the duplicate entry that you see, overwriting the regular 6th entry.
Whenever a request for 5 items that is NOT for the first page is received, I rewrite it so instead of starting from the 7th item, it starts from the 6th - recovering the playlist that was overwritten in the previous page.

Now one potential issue I suspect is that my code will make you lose the 6th item on the second page, lose two items on the third page, etc... I will probably need to increment by 1 for every page that was previously displayed to avoid this slew of one playlist after the second page. I'll look into that tonight.


mad_ady wrote:RMerlin: any ideas where the command would be called from? I couldn't find it referenced in /etc:


b-rad modified another script at the same time he committed getproxies. I forgot the name (it's in the SVN log), it's something that restarts Apache and UMSP, and also re-downloads proxies. online-restart-something or close to that, was in the same folder as getproxies.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: YoutubeHD Playlists!   

Postby RMerlin » Wed Apr 06, 2011 7:37 pm

Even better news everyone! I figured out why playlists were actually failing :)

For some reason, Youtube reports one more playlist than really exists. For example if you have 20 playlists, it will report 21. No clue as to why - if I send the same query using a different API call in my web browser, I do get the proper amount of playlists.

I have pushed a new youtubeHD proxy on SVN - this one will modify Youtube's report by reducing the amount of available playlists by one. This one seems to be 100% working for me: no duplicate playlists, and no missing playlists either (another side effect of my first workaround that I noticed tonight).

Same as before: run "getproxies", and give this a good thorough testing :) Especially look if you are missing one playlist (which means for some reason Youtube was returning the correct number of playlists for your specific account...).
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada

Re: YoutubeHD Playlists!   

Postby deentml89 » Thu Apr 07, 2011 3:10 pm

I have two playlists under my account but after updating in telnet with getproxies I only see 1. I can still see both using Youtube-Subscriptions.

Edit: I then removed the one that was showing up from my account leaving only the playlist that wasn't appearing. This causes the No Content message to appear when browsing in the Playlists under YoutubeHD.

Edit 2: If it is at all relevant the playlist which does not show up has 68 videos in it.
deentml89
WDTVer
 
Posts: 33
Joined: Fri May 21, 2010 5:35 pm

Re: YoutubeHD Playlists!   

Postby RMerlin » Thu Apr 07, 2011 7:05 pm

deentml89 wrote:I have two playlists under my account but after updating in telnet with getproxies I only see 1. I can still see both using Youtube-Subscriptions.

Edit: I then removed the one that was showing up from my account leaving only the playlist that wasn't appearing. This causes the No Content message to appear when browsing in the Playlists under YoutubeHD.

Edit 2: If it is at all relevant the playlist which does not show up has 68 videos in it.


So looks like for some people Youtube returns the right amount of playlists, and for others it doesn't.

So far the fix seems to be the lesser evil, since you can always create a dummy empty playlists to force all playlists to appear, while the original code prevent playlists from working at all.

Curious to see if other people are also missing one playlist.
WDLXTV Webend maintainer. Visit http://www.lostrealm.ca/wdlxtv to see my other WDLXTV projects.
If you like my work, please consider donating.
User avatar
RMerlin
WDLXTV Team
 
Posts: 3236
Joined: Sat Jun 26, 2010 9:25 am
Location: Montreal, Canada


Return to WDTVL Proxy Project

Who is online

Users browsing this forum: No registered users and 2 guests