Kodi Community Forum
[RELEASE] Home Theater Experience (Script) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Home Theater Experience (Script) (/showthread.php?tid=55628)



- frag - 2009-09-06

OK, I update my XBMC built, used REPO Installer and got the latest version of the script. Then got Transparency! 2.0 skin. This is supposed to support this plugin, but only got a dimmed "Play Trailer" button in info screen of the Video Library.

I got it to work as follows:

Edit DialogVideoInfo.xml (found under ..Application Data\XBMC skin\Transparency!\720p\ folder). I found two sections that to the best of my understanding, were meant to be mutually exclusive:

PHP Code:
                <control type="button" id="11">
                    <
description>Play Trailer</description>
                    <
posx>0</posx>
                    <
posy>165</posy>
                    <include>
ButtonInfoDialogsCommonValues</include>
                    <
label>20410</label>
                    <
onleft>61</onleft>
                    <
onright>49</onright>
                    <
onup>10</onup>
                    <
ondown>5</ondown>
                    <
enable>!IsEmpty(ListItem.Trailer)</enable>
                    <
visible>!Skin.HasSetting(hometheater)</visible>
                </
control>

                <
control type="button" id="11">
                    <
description>Home Theater Experience</description>
                    <
posx>0</posx>
                    <
posy>165</posy>
                    <include>
ButtonInfoDialogsCommonValues</include>
                    <
label>31019</label>
                    <
onleft>61</onleft>
                    <
onright>49</onright>
                    <
onup>10</onup>
                    <
ondown>5</ondown>
                    <
onclick>Dialog.Close(MovieInformation)</onclick>
                    <
onclick>Playlist.Clear</onclick>
                    <
onclick>Action(Queue,25)</onclick>
                    <
onclick>RunScript(special://home/scripts/Home Theater Experience/default.py)</onclick>
                    
<visible>Skin.HasSetting(hometheater)</visible>
                </
control

So which of the 2 button 11 is displayed is decided from the "Skin.HasSetting(hometheater)" value. I figured "!" means no, so I just swapped the "!" (meaning deleted it from upper part and added to the lower part. Now I have a "Theater" button active that launches the script just fine.

My questions are:

1. Why is not Skin.HasSetting(hometheater) true? (So that I wouldn't have to mess with the xml)
2. What if I want only a couple of trivia slides? 15 minutes is a very long time to watch slides before your movie. How can I change the minimum value to 40 secs e.g.?
3. Post #1 mentions about a "slides.xml" file to define the q&a files. Where is it? Couldn't find it anywhere.
4. My Apple Movie Trailers does not work. Not just with this plugin, but in general. Am I the only one or is there something wrong with Apple?

Thnx for the great work!


- BigBlack - 2009-09-07

BigBlack Wrote:Hi, guys... But i don't understand some thing..
The first is... but there isn't a way to reproduce only trailer of in library film? I don't want to see movie from cinema.. Because when i've them in DVD I'll don't remember them..
The second is that when I select the script and I've selected to show 1 trailer from apple movie trailer (both) and local folder.. i don't see nothing... The film start directly without trailer or the trailer start and play for 1 or 2 seconds and then movie start..
Then if i don't understand wrong the only way to use it it's or use transparency and start theather from info path or queue film and then start the script from script path? That's right?

mmm no one?


- frag - 2009-09-07

BigBlack Wrote:mmm no one?

I do not really understand what you're trying to do here...

For me:

Transparency! works ok (yes the info solution is the only way) when I:

- use plugin to start slideshow from local folder
- use plugin to play video from local trailer folder (defined in settings)

I cannot get it to work with Apple MT, even though AMT works ok on its own (after entering coding patch, found in relevant thread)

I hope this helps. If not, try to elaborate...


- BigBlack - 2009-09-08

so... i've set the enable button on the skin setting... set the apple movie trailer lite directory in the skin setting... then opened the script setting with right key and set 3 trailer from apple movie trailer (current) and also local folder chosing my movies directory. Then i go to the library, enter in the info page, click on the theather button and first i think start the trailer of film i've selected for 1 or 2 seconds.. then start to see windows that tell buffering or something like this.. and 3 or 4 seconds next film start without displaying any trailer..


- theuni - 2009-09-08

To all having trouble with the trailers, this has been discussed in several places. I'll be nice and share some links.

See starting here: http://forum.xbmc.org/showthread.php?tid=33693&page=8
and watch progress here: http://trac.xbmc.org/ticket/6983

Basically something on Apple's end changed and XBMC must be updated to work again.

TheUni


- BigBlack - 2009-09-08

mmm but i never got it working.... i've installed all news update... Xbmc update.. Trasparency 2.00 and all version updated checked with svn report... Then i don't understand what's that : http://trac.xbmc.org/ticket/6983 ?
Do you tell me that I need to change my user agent? It say like this right? But i see normal trailer without any troble... from apple movie trailer and from local folder.. why i'd need that?


- frag - 2009-09-08

@TheUni:

Yes I know, I read the thread and after following suggestion there I now have a working AMT plugin. The thing is (and that's why I'm posting here) Apple MT works OK when launched from Videos -> Video Plugins, but does NOT when used from the Theater Experience plugin

@BigBlack:

Have you tried to set-up plugin to play just one trailer from a local folder - nothing else (i.e. download a trailer manually and set the TE plugin to manual folder under trailer section - leave the rest off)?
Please try that and then launch one of you Movies from Video Library (via Movie Info -> Theater). If that doesn't work either, I'm sorry your problem is way out of my XBMC knowledge... Sad
If it does, there might be something wrong with your connection (thus only a couple of seconds of trailer showing) causing excessive buffering and resulting in plugin time-out...


- BigBlack - 2009-09-08

i don't have local trailer stored... and i think the scraper read directly trailer from .nfo files in my library... however it's the same with apple movie trailer and local folder... and I know how to use the script... And trailer from apple movie trailer go well so the trouble is inthe plugin... The only thing can be the time-out but it's very strange because when i see normale trailer, i see them fine... However i'll wait for nuka... bye bye


- phunqe - 2009-09-09

This question seems unanswered, is it possible to have this script execute directly when playing a movie from library mode?


- ronie - 2009-09-09

frag Wrote:OK, I update my XBMC built, used REPO Installer and got the latest version of the script. Then got Transparency! 2.0 skin. This is supposed to support this plugin, but only got a dimmed "Play Trailer" button in info screen of the Video Library.

there's no need to edit the xml code, you have to enable it:
Settings > Skin Settings > Scripts > Enable Home Theater Experience script

next time, read the FAQ (#18), it'll save you a lot of time. ;-)


- BigBlack - 2009-09-09

mmmm good... he was answering me for my trouble Tongue ahahah nuuuuuuuuuuuuuka Big Grin where'r u! Big Grin Even if you don't know me I need you! Big Grin


- soder - 2009-09-09

Does this work with the "Apple trailer LITE" plugin from the SVN Repo Installer?

Thanks.

/Söder


- frag - 2009-09-11

ronie Wrote:there's no need to edit the xml code, you have to enable it:
Settings > Skin Settings > Scripts > Enable Home Theater Experience script

next time, read the FAQ (#18), it'll save you a lot of time. ;-)

Once again I stand corrected (and embarrassed). Thanks for pointing that out. I guess I'm the kind of person that would rather read the code than the documentation...


- BDPNA - 2009-09-12

I feel dumb here but I am doing something wrong. I put slides.xml in the same folder as settings.xml (root of plugin) and created it like in the first post, modeling after Q1.jpg and Q1a.jpg...Yet it's still just pulling slides at random and not in order.

Did I do something wrong?


From the Great Jimi Hendrix "Are you Experinced?" here's a clarification and fix. - CyberMaxX - 2009-09-12

soder Wrote:Does this work with the "Apple trailer LITE" plugin from the SVN Repo Installer?

Thanks.

/Söder

Söder and to others who may find this reply useful:
From the First Post of this Thread

Quote:Features:

- plays optional recursive trivia slide show w/music
- plays optional coming attractions intro video/playlist or 1-3 random videos
- plays # of optional random trailers
- plays optional feature presentation intro video/playlist or 1-3 random videos
- plays user queued video
- plays optional feature presentation outro video/playlist or 1-3 random videos
- "Apple Movie Trailers (database)" trailer scraper (requires the AMT script)
- "Apple Movie Trailers (current)" trailer scraper (default: same source as the AMT Lite plugin)
- "Local folder" trailer recursive scraper (local network also eg smb://, trailers must be named with "-trailer in the name)
- *improved slide show with optional support for a slides.xml
- maybe more

Change settings, by going to the scripts window, right clicking on the script and selecting Script Settings.

So, if you want your "Home Theater Experince" Script to emulate how the Apple Movies Trailers LITE script gathers it's information (meaning use of no database and only listing current movies) then Change the Scraper Settings to "Apple Movie Trailers (current)"

BUT: I deduced the following from looking at the code and from how the feature set is worded above.
I can see how this may lead to some confusion as I was confused a bit myself until I dug into it.

1) If you select - "Apple Move Trailers (database)" note the keyword "requires" the AMT script in the Features list above.
This means that you MUST have the Regular AMT Script installed, and that you ran the AMT Script at least once to poplulat the database. You also need to set the correct path to where the AMT.db is located.

2) If you select - "Apple Movie Trailers (current)" note the keyword "same source" in the Features list above.
This means that the Home Theater Experince script will use the same source to get the information but it DOES NOT need The Apple Movies Trailer LITE Plugin to be installed to do so. The script literally uses the same "type of coding process" in it's own scipts to generate the information needed from the Apple Site.

I confirmed #2 by just comparing the code between the Home Theater Experince Script and Apple Movies Trailer LITE plugin.

I'm pretty sure this is what NUKA1195 meant by "same source", but anyone feel free to correct me.

Now "Are you Experinced?" for those of you who are having problems with railers playing.

Based on this thread I was able to get the Home Theater Experince Script working again with selecting and showing trailers do to the recent changes that the Apple Site had made. The XBMC Team is aware of what is needed and you can follow this trac if you are interested. For the exact cause of the issue at hand read this.

In the mean time, if you want your "Experience" back you will need to make some changes: (or wait until the XBMC Team patches it all up)

For those who like and selected the setting Apple Movies Trailers (current) do this:
Locate and edit the scraper.py file in \scripts\Home Theater Experience\resources\scrapers\amt_current

Change the following block of code near line 96:
Code:
trailer = re.findall( "<large[^>]*>(.*?)</large>", preview[ 0 ] )[ 0 ]
# replace with 1080p if quality == 1080p
if ( self.settings[ "trailer_quality" ] == 3 ):
    trailer = trailer.replace( "a720p.m4v", "h1080p.mov" )

by adding to the block the below line which is in bold
Code:
trailer = re.findall( "<large[^>]*>(.*?)</large>", preview[ 0 ] )[ 0 ]
[b][size=small]trailer = trailer.replace( "movies.apple.com", "www.apple.com") [/size][/b]
# replace with 1080p if quality == 1080p
if ( self.settings[ "trailer_quality" ] == 3 ):
    trailer = trailer.replace( "a720p.m4v", "h1080p.mov" )

For those who like and selected the setting: Apple Movie Trailers (database) do this:
Locate and edit the scrapers.py file in \scripts\Home Theater Experience\resources\scrapers\amt_database

Change the following block of code near line 129:
Code:
# if there was a valid trailer set it
url = ""
if ( choice >= 0 ):
url = trailers[ choice ]
# return choice
return url

by adding to the block the below line which is in bold
Code:
# if there was a valid trailer set it
url = ""
if ( choice >= 0 ):
url = trailers[ choice ]
[b][size=small]url = url.replace( "movies.apple.com", "www.apple.com" )[/size][/b]
# return choice
return url

Enjoy your "Experince" everyone Big Grin
CyberMaxX