-
-
Notifications
You must be signed in to change notification settings - Fork 15
Script: Cinema mode
The cinema mode is a simple way (or complex way for skinner newbies) to add trailers and own available intros in the beginning of movie or episode playback. It needs a deeper skin integration and doesn't work out of the box.
Note: Intros or trailers, one of them has to be configured!
Skin.String(IntroPath)
This skin string has to be filled with a folder path where the intros are stored.
Skin.String(TrailerCount)
This skin string has to be filled with the amount of trailers which should be played.
There are multiple ways how to add this to the skin. There is no rule to fit everybodies needs. Better skinners love to use skin hacks and workaround it should not be a big deal.
Calling via
Works for own widget containers or via button in DialogVideo.xml for example.
Optional arguments
-
dbid=
(DBID of the movie/episode) -
type=
(movie or episode)
Call
RunScript(script.embuary.helper,action=playcinema)
More tricky, because the context menu has no ListItem.foobar values stored. This means we have provide the values somehow. And the context menu plugin method is limited so I highly recommend to do it on skin level. This also gives you the benefit to place the items on top of the list instead on the bottom.
Example
In Embuary I have a invisible button control in my focusedlayout definitions:
<control type="list" id="123"
....
<focusedlayout>
<include content="SetPropertyOnFocus">
<param name="id" value="123"/>
</include>
...
</focusedlayout>
<content></content>
</control>
The include:
<include name="SetPropertyOnFocus">
<control type="button">
<texturefocus></texturefocus>
<texturenofocus></texturenofocus>
<onfocus>ClearProperty(FocusBounce,home)</onfocus>
<onfocus condition="String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,season) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,episode) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow)">SetProperty(ListItemDBID,$INFO[Container($PARAM[id]).ListItem.DBID],home)</onfocus>
<onfocus condition="String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,season) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,episode) | String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow)">SetProperty(ListItemDBType,$INFO[Container($PARAM[id]).ListItem.DBType],home)</onfocus>
<onfocus condition="[!String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,season) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,episode) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow)] | String.IsEqual(Container($PARAM[id]).ListItem.Label,$LOCALIZE[20366])">ClearProperty(ListItemDBID,home)</onfocus>
<onfocus condition="[!String.IsEqual(Container($PARAM[id]).ListItem.DBType,movie) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,season) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,episode) + !String.IsEqual(Container($PARAM[id]).ListItem.DBType,tvshow)] | String.IsEqual(Container($PARAM[id]).ListItem.Label,$LOCALIZE[20366])">ClearProperty(ListItemDBType,home)</onfocus>
</control>
</include>
The context menu:
<control type="grouplist" id="3">
...
<control type="button" id="1999">
<include content="ContextButton"/>
<label>$LOCALIZE[31326]</label>
<onclick>RunScript(script.embuary.helper,action=playcinema,dbid=$INFO[Window(home).Property(ListItemDBID)],type=$INFO[Window(home).Property(ListItemDBType)])</onclick>
<visible>!String.IsEmpty(Window(home).Property(ListItemDBID)) + [String.IsEqual(Window(home).Property(ListItemDBType),movie) | String.IsEqual(Window(home).Property(ListItemDBType),episode)] + $EXP[CinemaMode]</visible>
<visible>!String.IsEqual(Control.GetLabel(1002),$LOCALIZE[12021]) + String.IsEqual(Control.GetLabel(1001),$LOCALIZE[208])</visible>
</control>
...
</control>
script and wiki created by sualfred
- Go to path
- Play item
- Play SFX sound
- Play all, shuffled, from here
- Play folder
- Play random
- Reset container positions
- Browse TV show of episode
- Get TV show details
- Blur image
- Split value
- Check if file exists
- Update library item
- Get .txt file content
- Get system locale
- Set timer
- Encode/decode string
- Calculate
- Get add-on setting
- Image dimension and aspect ratio
- Attention & warning
- Auto font change
- Set Kodi setting
- Get Kodi setting
- Toggle Kodi setting
- Disable/enable add-ons
- The background service
- Restarting the service
- Global background images
- Auto playlist clearing
- Auto refresh widgets
- Player audio track detection
- Player audio and subtitle info labels
- Channel logo of playing recording
- Artist and album artworks for music playback
- Auto fullscreen on playback
- Next item of video playlist
- Player artwork dimension and aspect ratio
- Player icon blurring
- Detect / populate library tags
- In progress media
- Media by random genre
- Get more items of random actor
- Get more items by given actor
- In progress movies
- Suggestions based on watched movies
- Similar movies based on movie
- Movies by random genre
- Movie genres
- Directed by