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)



- compcentral - 2010-05-28

Sorry for being impatient, but I was searching all day for a way to get it to work and was starting to get frustrated. I just wanted to make sure that this project was still alive and being maintained. I would have thought there would have been some testing to get this to work as an addon by now. I guess not?


- Thespirit - 2010-06-05

Hi guys, can anyone offer some help as to how to get my ATD working, had it working in the past but the website with the instructions doesnt exisit anymore, not sure how to set it up agian to automatically download trailers to C:\Trailers


- mrloofer - 2010-06-06

Just follow the instructions here:

http://blog.contriving.net/2009/12/26/apple-trailer-downloader


- Thespirit - 2010-06-07

I had a look at that site but i giess being a noob i am pretty dumb, the old site had me configure a little script file or sommit and away it went, i dont know how or where to place the files/ commands the site suggests, any help would be much appreciated, the old site was htpcguide.info is this guy still about


- kiboy6 - 2010-06-07

Yeah, you can input those commands in a windows scheduled task...don't have time to walk you through it right now as I'm packing to go away for a few days, but can do at the end of the week if you're still in need Smile


- SlaveUnit - 2010-06-17

Hello Nuka1195,
I am just wondering if you are going to update this script to be used with the newer build's setup? Thanks.

I still love this script and dont want to let it slip away.


- mrloofer - 2010-06-18

Does anyone know the answers to the following?

1. Where are the settings stored (ie in a XML file, DB etc.)?
2. Can this script be kicked off from another python script or command line, and not necessarily through the XBMC GUI?

Cheers.


- queequeeg78 - 2010-06-18

Need help with this. I downloaded the trivia packs and intros and everything and made a music playlist which works during the slides. But two things are messing me up.

1. The sound level is real low and stays like that even when the movies begins I have to raise it up manually everytime.

2. And when I play a pg-13 film and up the script works fine, but a g and pg film like dumbo or et it just plays my music playlist and hangs...

Any help would be appreciated


- SlaveUnit - 2010-06-22

1. http://forum.xbmc.org/showpost.php?p=492101&postcount=488

Thats to make the music at 100% when the slides play. Im not sure it was so low once the movie started.


settings storage location - steppedup - 2010-06-22

mrloofer Wrote:Does anyone know the answers to the following?

1. Where are the settings stored (ie in a XML file, DB etc.)?
2. Can this script be kicked off from another python script or command line, and not necessarily through the XBMC GUI?

Cheers.

Good place for the settings to be found is here:

C:\Users\your Name\AppData\Roaming\XBMC\scripts\Home Theater Experience\resources\settings.xml

Regarding the 2nd - not sure - http://docs.python.org/faq/windows.html#how-do-i-run-a-python-program-under-windows should get you started....


htpcguide.info is back up - sorry for the inconvience - steppedup - 2010-06-22

Thespirit Wrote:I had a look at that site but i giess being a noob i am pretty dumb, the old site had me configure a little script file or sommit and away it went, i dont know how or where to place the files/ commands the site suggests, any help would be much appreciated, the old site was htpcguide.info is this guy still about

Hi - yep - sorry the website was taken down by freehostia for whatever reason and with no notification to me.

It's backup - and I'm back from outside projects Smile.

Let me know if the website is still down for you!


- Therms - 2010-06-22

For anyone who cares, I'm getting ready to do a complete rewrite of ATD. Be sure to put any feature suggestions/bug reports in the comments here.


- mrloofer - 2010-06-22

Therms - I certainly do! I'm sending you a PM though..


- mrloofer - 2010-06-23

Therms Wrote:For anyone who cares, I'm getting ready to do a complete rewrite of ATD. Be sure to put any feature suggestions/bug reports in the comments here.

Therms - any chance you can fix this in the meantime? Happens when you use the --imdb switch.

Fetching trailer list from Apple.
Attempting to fetch rating for Adjustment Bureau from imdb.
2010-06-22 20:46:16,500 CRITICAL [imdbpy] imdb\_exceptions.pyc:35: IMDbDataAcces
sError exception raised; args: ({'url': 'http://akas.imdb.com/find?s=tt;mx=20;q=
adjustment+bureau+%282010%29', 'error type': 'http_error_default', 'errcode': 40
3, 'headers': <httplib.HTTPMessage instance at 0x0106E990>, 'proxy': '', 'errmsg
': 'Forbidden'},); kwds: {}
None
Traceback (most recent call last):
File "atd.py", line 570, in <module>
File "atd.py", line 284, in download_trailers
File "atd.py", line 214, in _get_current_trailer_info
File "imdb\__init__.pyc", line 381, in search_movie
File "imdb\parser\http\__init__.pyc", line 431, in _search_movie
File "imdb\parser\http\__init__.pyc", line 414, in _get_search_content
File "imdb\parser\http\__init__.pyc", line 400, in _retrieve
File "imdb\parser\http\__init__.pyc", line 167, in retrieve_unicode
File "urllib.pyc", line 206, in open
File "urllib.pyc", line 361, in open_http
File "urllib.pyc", line 378, in http_error
File "imdb\parser\http\__init__.pyc", line 221, in http_error_default
imdb._exceptions.IMDbDataAccessError: {'url': 'http://akas.imdb.com/find?s=tt;mx
=20;q=adjustment+bureau+%282010%29', 'error type': 'http_error_default', 'errcod
e': 403, 'headers': <httplib.HTTPMessage instance at 0x0106E990>, 'proxy': '', '
errmsg': 'Forbidden'}


- mrloofer - 2010-06-23

I've made a mod to this script so that it will display trailers based upon the MPAA ratings of the movie and the trailer itself. See below for details and install instructions. Note I'm a bit of a Python noob so please let me know if you run into any problems.

Details

So the MPAA ratings work great with HTE trivia but do not work with the trailers themselves. I'm an avid fan of this script and use it at least once a week when I have scheduled showings in my home theater. The biggest problem though is that if you have kids then you really don't want trailers of SAW IV playing during a showing of Alvin & The Chipmunks. For this reason alone I modded the script to only show trailers within the correct MPAA group of the movie itself. There are some caveats and prerequisites though..

For this to work you need to use Apple Trailer Downloader (ATD) and you need to ensure MPAA ratings are being stored in your movie library in XBMC. During testing I found the TMDB scraper to be the best (latest version of the scraper that brings in MPAA ratings). I think IMDB brings in the full rating not just the code which might not work. So in other words if the MPAA rating in your library is one of the following then it should work: PG, PG-13, R, G, NC-17 and NR (not rated).

Usage

(note if you already use ATD skip the first few steps and just add --htenfo to your atd command line).

1. Download ATD from here.
2. Create a .bat file and enter the following:

atd -d <trailerpath> -a "-trailer" --htenfo

3. Save the .bat file and run it. This will download all new trailers to <trailerpath> along with a .NFO file that is required for this to work.
4. Download the HTE scraper file from here.
5. Make a backup copy of /home/yourusername/.xbmc/scripts/Home Theater Experience/resources/scrapers/local/scraper.py and replace it with the one you just downloaded.
6. Ensure your HTE script settings are pointing to your trailerpath where you downloaded the trailer.

That's it!

How it works

When you run the HTE script it will get the MPAA rating of the movie and pass it to the scraper script. For each trailer it finds it will locate the NFO file and read in the rating of the trailer. If the rating of the trailer falls into the same category as the MPAA rating of the movie then the trailer will get added to your playlist.

Trailers are selected based on the following criteria:

If the movie is rated PG-13, PG or G then any trailer from those 3 categories will be selected. No trailer from R, NC-17 or Unrated will be selected.
If the movie is rated R or NC-17 then any trailer from PG-13, PG, G, NC-17, R or Unrated will be selected.
If the movie is unrated (NR) or is missing the rating then only trailers from PG-13, PG or G will be selected.

The biggest issue I've come across is there are a lot of unrated trailers on Apple's website. ATD has a --imdb parameter that will scrape the correct rating from Imdb.com but I was unable to test this. Hopefully Therms will fix this in the new version he is working on.

Any questions or problems let me know. I can now finally run HTE and not worry about my kids freaking out because of some R rated trailer!

Big thanks to Nuka and Therms for some excellent scripts!

Cheers.