Sign up here and you can log into the forum!

Apple Trailers

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

Apple Trailers   

Postby onanboy » Sat Dec 20, 2014 9:35 am

I think that I have a problem with my Apple Trailers plug-in.

I usually try to check it out once a week to see the new trailers.

Lately there have been no updates. The latest trailer in the list is Song of the Sea from some time in November.

Does anyone else see this or know what may cause the trailers to not update? I think that my plug-in is up to date.
onanboy
Donor
 
Posts: 35
Joined: Thu Aug 05, 2010 8:07 pm

Re: Apple Trailers   

Postby mad_ady » Sat Dec 20, 2014 11:43 pm

It's possible that the site structure changed. I'll try to have a look over the holidays. In the meantime can you check the official site and confirm that there are new trailers posted and that they play?
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Apple Trailers   

Postby mad_ady » Sun Dec 21, 2014 11:44 am

Edit: it seems apple changed which xml file they update now. It used to be this:
http://www.apple.com/trailers/home/xml/current.xml

But now it looks like it's this:
https://trailers.apple.com/trailers/home/rss/newtrailers.rss
I'll have to check if it's the same format, but if you are impacient you can try to replace the address in the plugin code and let me know if it works.
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Apple Trailers   

Postby onanboy » Mon Dec 22, 2014 8:02 am

mad_ady wrote:Edit: it seems apple changed which xml file they update now. It used to be this:
http://www.apple.com/trailers/home/xml/current.xml

But now it looks like it's this:
https://trailers.apple.com/trailers/home/rss/newtrailers.rss
I'll have to check if it's the same format, but if you are impacient you can try to replace the address in the plugin code and let me know if it works.


All I'm equipped to do is to ftp over and open the Apple Trailer plugins (both the with and without check versions) and search and replace the old addy with the new.

Every time I tried this I would reboot the LIVE and find that nothing had changed. When I ftp'd over again I found the the plugin files were back to their old versions. They must get overwritten.

So I tried it without rebooting and it shows nothing so I guess I would assume that the format is different or I don't know the correct way to change it.
onanboy
Donor
 
Posts: 35
Joined: Thu Aug 05, 2010 8:07 pm

Re: Apple Trailers   

Postby mad_ady » Mon Dec 22, 2014 10:55 am

Thanks for trying. Yes, the changes you make don't survive a reboot. Also, from your tests it appears the format is a bit different. I'll have a look next week, when I have more time.
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Apple Trailers   

Postby onanboy » Mon Dec 22, 2014 1:23 pm

mad_ady wrote:Thanks for trying. Yes, the changes you make don't survive a reboot. Also, from your tests it appears the format is a bit different. I'll have a look next week, when I have more time.



No problem. Take your time.

BTW, thanks for all that you do for users of the wdlxtv!!
onanboy
Donor
 
Posts: 35
Joined: Thu Aug 05, 2010 8:07 pm

Re: Apple Trailers   

Postby mad_ady » Fri Dec 26, 2014 1:35 am

Ok, I've had a more in-depth look at the changes, and unfortunately they are not straight-forward. It seems our "friends" at apple made a lot of changes and trailers are not accessible directly anymore.

I started with https://trailers.apple.com/trailers/home/rss/newtrailers.rss. It's a standard rss xml, but it doesn't contain links to the actual media. It sends you to a page where you can get the media, but no direct media. Also, it doesn't list all the videos you can get on the site.

I kept digging and found a different, better xml: https://trailers.apple.com/appletv/index.xml
Again, you don't have the actual media, but you can get images and a link to a media xml. For instance, for The Penguins of Madagascar you get this:
Code: Select all
<moviePoster id="shelf_item_144" accessibilityLabel="The Penguins of Madagascar" onSelect="atv.loadURL('https://trailers.apple.com/appletv/studios/dreamworks/thepenguinsofmadagascar/index-hd.xml');" onPlay="atv.loadURL('https://trailers.apple.com/appletv/studios/dreamworks/thepenguinsofmadagascar/videos/trailer2-hd.xml');"><title>The Penguins of Madagascar</title><subtitle>73%</subtitle><image>https://trailers.apple.com/trailers/dreamworks/thepenguinsofmadagascar/images/poster-large.jpg</image><defaultImage>resource://Poster.png</defaultImage></moviePoster>


If you open https://trailers.apple.com/appletv/studios/dreamworks/thepenguinsofmadagascar/videos/trailer2-hd.xm you get this:
Code: Select all
<atv><body><videoPlayer id="com.sample.video-player"><httpFileVideoAsset id="teaser19152"><mediaURL>http://movietrailers.apple.com/movies/fox/thepenguinsofmadagascar/thepenguinsofmadagascar-tlr2_a720p.m4v</mediaURL><title>The Penguins of Madagascar - Trailer 2</title><description>Super spy teams aren't born—they're hatched. Discover the secrets of the greatest and most hilarious covert birds in the global espionage biz: Skipper, Kowalski, Rico and Private. These elitists of the elite are joining forces with a chic undercover organization, The North Wind, led by handsome and husky Agent Classified (we could tell you his name, but then—you know), voiced by Benedict Cumberbatch. Together, they must stop the villainous Dr. Octavius Brine, voiced by John Malkovich, from destroying the world as we know it. </description><image>https://trailers.apple.com/trailers/dreamworks/thepenguinsofmadagascar/images/thumbnail_19152.jpg</image></httpFileVideoAsset></videoPlayer></body></atv>


The problem is if you try to open the link in mediaURL (either in the same browser or through wget), you'll get sent back to the main apple.com page:
Code: Select all
adrianp@stingray:~/Downloads$ wget http://movietrailers.apple.com/movies/fox/thepenguinsofmadagascar/thepenguinsofmadagascar-tlr2_a720p.m4v
--2014-12-26 11:26:55--  http://movietrailers.apple.com/movies/fox/thepenguinsofmadagascar/thepenguinsofmadagascar-tlr2_a720p.m4v
Resolving movietrailers.apple.com (movietrailers.apple.com)... 23.14.93.159, 23.14.93.143
Connecting to movietrailers.apple.com (movietrailers.apple.com)|23.14.93.159|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://trailers.apple.com/ [following]
--2014-12-26 11:26:55--  http://trailers.apple.com/
Resolving trailers.apple.com (trailers.apple.com)... 23.15.178.70
Connecting to trailers.apple.com (trailers.apple.com)|23.15.178.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24916 (24K) [text/html]
Saving to: ‘thepenguinsofmadagascar-tlr2_a720p.m4v’

100%[==========================================================================================================================>] 24,916      --.-K/s   in 0.01s   

2014-12-26 11:26:55 (1.98 MB/s) - ‘thepenguinsofmadagascar-tlr2_a720p.m4v’ saved [24916/24916]


This means there is some sort of protection mechanism needed to be able to access the video. Most likely some HTTP header that needs to be sent.

I've seen this before and it can be circumvented, but it takes some time to analyze the page code and figure out what the browsers does and build the appropriate proxy, so... sorry, but it will take a while (I'm busy with other wdlxtv projects at the moment). If somebody wants to try to fix this I can help out, but I don't have time to rewrite this at the moment...

Also, if anybody can search for a different data source, maybe there's a way to easily get to the content.
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Apple Trailers   

Postby onanboy » Sat Jan 03, 2015 11:18 am

I don't know shit about this but this link doesn't take me back to the main screen.

http://movietrailers.apple.com/movies/independent/americons/americons-tlr1_480p.mov?width=848&height=360

Does that help at all?
onanboy
Donor
 
Posts: 35
Joined: Thu Aug 05, 2010 8:07 pm

Re: Apple Trailers   

Postby mad_ady » Sat Jan 03, 2015 11:18 pm

What page did you get the link from?
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Apple Trailers   

Postby onanboy » Sun Jan 04, 2015 6:28 pm

I just went the Apple Trailers page and selected a trailer to play.

While it was playing I viewed the page info (right click the video using Firefox). I saw it on the media tab of the window that popped up.

Image
onanboy
Donor
 
Posts: 35
Joined: Thu Aug 05, 2010 8:07 pm

Next

Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 1 guest