2014-04-15, 18:34
I am on a gotham nightly
(2014-04-15, 18:34)dezblack Wrote: I am on a gotham nightly
if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson
_3d_mode_query = '''{"jsonrpc": "2.0", "method": "Settings.GetSettingValue", "params": { "setting": "videoscreen.stereoscopicmode" }, "id": 1}'''
_3d_modes = [ "none",
"over_under",
"side_by_side",
"anaglyph_cyan_red",
"anaglyph_green_magenta",
"interlaced",
"hardware",
"mono_2d",
"",
"",
"",
"",
]
elif trigger == "Movie" and ha_settings[ "ha_movie" ]:
utils.broadcastUDP( "<b>CE_Automate<li>movie_start</b>" )
xbmc.sleep(250)
result = xbmc.executeJSONRPC( _3d_mode_query )
_3d_mode = 'mono'
json = simplejson.loads( result)
if json.has_key('result'):
if json[ 'result' ].has_key( 'value' ):
_3d_mode = _3d_modes[ int( json[ 'result' ][ 'value' ] ) ]
utils.broadcastUDP( "<b>CE_Automate<li>3D_Mode_Event<%s></b>" % _3d_mode )
(2014-04-15, 18:25)giftie Wrote:(2014-04-15, 10:22)revned Wrote: Is it possible to let the script play a random movie from the library?
Since the removal of HTTP-API from XBMC(now going on 2 years) there is no direct method of randomly choosing a movie to play. A script can be created that can poll XBMC for all of the Movie ID's then randomly choose an ID. Then it can call the script with the ID.
(2014-04-15, 18:57)giftie Wrote:(2014-04-15, 18:34)dezblack Wrote: I am on a gotham nightly
Then you can add the following to the home_automation.py file(that exists in your userdata/addon_data/script.cinema.experience folder)
insert after line 15:
Code:if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson
_3d_mode_query = '''{"jsonrpc": "2.0", "method": "Settings.GetSettingValue", "params": { "setting": "videoscreen.stereoscopicmode" }, "id": 1}'''
_3d_modes = [ "none",
"over_under",
"side_by_side",
"anaglyph_cyan_red",
"anaglyph_green_magenta",
"interlaced",
"hardware",
"mono_2d",
"",
"",
"",
"",
]
Then replace the movie trigger with:
Code:elif trigger == "Movie" and ha_settings[ "ha_movie" ]:
utils.broadcastUDP( "<b>CE_Automate<li>movie_start</b>" )
xbmc.sleep(250)
result = xbmc.executeJSONRPC( _3d_mode_query )
_3d_mode = 'mono'
json = simplejson.loads( result)
if json.has_key('result'):
if json[ 'result' ].has_key( 'value' ):
_3d_mode = _3d_modes[ int( json[ 'result' ][ 'value' ] ) ]
utils.broadcastUDP( "<b>CE_Automate<li>3D_Mode_Event<%s></b>" % _3d_mode )
You are then able to create events based on the actual screen format. Eventghost will see "CE_Automate<li>3D_Mode_Event<xxxx>" with 'xxxx' representing the stereoscopic mode of XBMC's video screen. You may need to add some more delay before the query, as XBMC may need some time to switch modes, xbmc.sleep(250) provides 250ms of delay, playing around with this time(in milliseconds) will allow you to fine tune the delay.
None of this is tested, though I took most of the code from my personal 3D Mode broadcaster - https://github.com/Giftie/service.3dmode_broadcaster. I use this to switch my TV through my control system
(2014-04-15, 01:33)Mungo Wrote:(2014-04-14, 19:49)giftie Wrote: Require a full debug log
Will change the path again, recreate and grab that tonight.
Cheers,
Mungo
(2014-04-17, 13:22)inv3ntor Wrote: Hey guys, running latest stable xbmc12.3, aeon nox skin, windows 7 32bit.
Just started using cinema experience yesterday, so far i have everything running fine except the Trailers dont play (and therefore coming attractions intro/outro)
Everything else fires off as it should, Theatre intro, feature intro, rating video, audio video, feature outro, intermission, theatre outro. I dont use the trivia options and dont really plan to.
I think the reason maybe instead of streaming them, im tying to play them from a local folder. I have it set to "2 trailers", Trailer Scraper: "local folder", and pointed it to the folder i have named "Trailer Scraper" in the cinema experience>videos folder, im using the folder structure shown on the wiki..but it does not show anything for a trailer folder so i just used something logical. (threw it in videos folder, named it what the settings screen calls it "Trailer Scraper" as thats basically true for the rest)
I have deselected the 3 limit options underneath. The trailers themselves are .mp4 files with random names.
Is there something specific i need to do, or will it simply not play 2 random trailer files from that folder for me? I can think of a workaround but would be nice to get it to work. (workaround would be replace theatre intro folder with contents on feature intro folder, then dump trailers in feature intro folder..of course then i no longer get to see my original theatre intro videos..but it was just the red curtain opening)
(2014-04-18, 22:24)giftie Wrote:(2014-04-18, 20:40)DasFa Wrote: Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?
DTSHD-HR is supported already, the folder name is "DTS-HR"
Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'
(2014-04-18, 22:24)giftie Wrote:(2014-04-18, 20:40)DasFa Wrote: Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?
DTSHD-HR is supported already, the folder name is "DTS-HR"
Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'
(2014-04-19, 04:25)rmilyard Wrote:(2014-04-18, 22:24)giftie Wrote:(2014-04-18, 20:40)DasFa Wrote: Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?
DTSHD-HR is supported already, the folder name is "DTS-HR"
Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'
giftie where does it figure out the sound from? File name or something else?
(2014-04-19, 05:10)giftie Wrote:(2014-04-19, 04:25)rmilyard Wrote:(2014-04-18, 22:24)giftie Wrote: DTSHD-HR is supported already, the folder name is "DTS-HR"
Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'
giftie where does it figure out the sound from? File name or something else?
The script uses the stream details stored in the database. These details are only in the database if your .nfo file has the details or the movie has been played once already(a couple of seconds)
(2014-04-19, 05:18)rmilyard Wrote:(2014-04-19, 05:10)giftie Wrote:(2014-04-19, 04:25)rmilyard Wrote: giftie where does it figure out the sound from? File name or something else?
The script uses the stream details stored in the database. These details are only in the database if your .nfo file has the details or the movie has been played once already(a couple of seconds)
Been wondering. Seems all my bd .iso files don't detect it. My files are named like The Hangover.iso etc.