Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

   Join Now

Skin Integration & Developer Information


This guide will teach you everything you ever wanted to know about integrating CinemaVision with your skin or application.

0

The Big Picture

We think CinemaVision integration adds value and functionality to every aspect of the entertainment center. Because of this, we'd like to make it as seamless as possible to integrate with our products. If you have any suggestions for how to improve either this guide, or integration as a whole, please let us know. At the end of this guide, you will be able to integrate your skin or application with CinemaVision.

What you won't need:

  1. Working knowledge of how the CinemaVision add-on(s) work behind the scenes.

What you will need:

  1. Working knowledge of the programming language you're using to write the application you're integrating with CinemaVision
  2. Kodi installed and configured on an HTPC, with content scraped into the local Kodi database (not streaming), for testing purposes.
  3. The Kodi CinemaVision Add-on installed, with a working Sequence (a working knowledge of setting up CinemaVision), for testing purposes.

Integrating CinemaVision into Your Skin

Traditionally, users are accustomed to having a button in the Movie Information dialog. For Kodi, we recommend that you add a button to your skins DialogVideoInfo.xml file. The button code below should work, and of course you'll want to change the ID (listed as 00 below) of the button so that it doesn't conflict with another button in your skin.

 type="button" id="00">
     CinemaVision
     ButtonInfoDialogsCommonValues
     CinemaVision
     Dialog.Close(MovieInformation)
     RunScript(script.cinemavision,experience)
     System.HasAddon(script.cinemavision) + [Stringcompare(ListItem.DBType,movie) | Stringcompare(ListItem.DBType,tvshow) | Stringcompare(ListItem.DBType,season) | Stringcompare(ListItem.DBType,episode)]
<>

Many of our users prefer that the Busy Dialog and Pop-ups are suppressed to improve the CinemaVision experience. While both of these things do improve the experience while CinemaVision is running, please keep in mind that your users will not know what's happening when a video is buffering, for example. Use these options at your discretion. These options should be added as a direct child of the tag in the XML file. If you're unsure of where in the files to add the code, add it on the line before the tag. If you know what you're doing, add it where ever you need it to be. 

We recommend that you add the option to suppress the busy dialog to your skins DialogBusy.xml file. To suppress the busy dialog when CinemaVision is running, add the following to the DialogBusy.xml file:

IsEmpty(Window(Home).Property(script.cinemavision.running))

We also recommend that you add the option to suppress pop-up notifications to your skins DialogKaiToast.xml file. To suppress pop-up notifications while CinemaVision is running, add the following to the DialogKaiToast.xml file:

IsEmpty(Window(Home).Property(script.cinemavision.running))

We do not recommend that you add the option to suppress your buffering dialog as this also suppresses the information and seek bar that is seen when you pause your content. If you want to do this despite our objection, here's how. To suppress the buffering, content information, and seek bar dialogs add the following to your skins DialogSeekBar.xml file:

IsEmpty(Window(Home).Property(script.cinemavision.running))

 

Integrating CinemaVision into Your Application

For your convenience, we've created several Methods that can be used to run CinemaVision, as well as a number of Properties that can be read to obtain specific data about the CinemaVision experience for use in your applications.

Launching CinemaVision from a Remote via JSON

{"jsonrpc": "2.0", "method": "Addons.ExecuteAddon", "params": { "addonid": "script.cinemavision", "params": ["experience"]},  "id": 1}

New in 17+, to launch CinemaVision from the Movie Information screen called from a widget, use the following:

 name="onclick_1" value="RunScript(script.cinemavision,dbtype=$INFO[ListItem.DBType],dbid=$INFO[ListItem.DBID])" /><>

 

Methods for Running CinemaVision

These methods will determine the type of content, and pass that to CinemaVision for processing.

This will launch CinemaVision using the default Sequence.
This method reads from the Kodi playlist, falling back to the current selection.

RunScript(script.cinemavision,experience)

This will use the ID from the current ListItem to launch CinemaVision.
This method forces the selection, ignoring the Kodi playlist.

RunScript(script.cinemavision,selection)

This will allow you to specify the movie ID when launching CinemaVision.
Use this if you are not getting the ID via ListItem.DBID within the selected container.

RunScript(script.cinemavision,movieid=[|||...])

This will allow you to specify the episode ID when launching CinemaVision.
Use this if you are not getting the ID via ListItem.DBID within the selected container.

RunScript(script.cinemavision,movieid=[|||...])

This will launch CinemaVision and play the media specified using the default Sequence.

RunScript(script.cinemavision,dbtype=$INFO[ListItem.DBType],dbid=$INFO[ListItem.DBID])

This will allow you to bypass the Queue Editor when launching CinemaVision.
Using the nodialog switch will suppress the Queue Editor when launching CinemaVision.

RunScript(script.cinemavision,[experience,selection,movieid,episodeid],nodialog)

 

Properties Allowed By CinemaVision

These properties will return specific information about the CinemaVision Sequence.

CinemaVision Running Status
This property returns a value of True if CinemaVision is running.

!IsEmpty(Window(Home).Property(script.cinemavision.running))

CinemaVision Module Status(es)
This property returns the Type of the Module running currently in the Sequence. (i.e. video, trivia, feature, trailer, audioformat)

Window(Home).Property(script.cinemavision.module.current)

This property returns the Name of the Module running currently in the Sequence.

Window(Home).Property(script.cinemavision.module.current.name)

This property returns the Type of the Module running next in the Sequence. (i.e. video, trivia, feature, trailer, audioformat)

Window(Home).Property(script.cinemavision.module.next)

This property returns the Name of the Module running next in the Sequence.

Window(Home).Property(script.cinemavision.module.next.name)

CinemaVision Feature Status(es)
This property returns the Title of the Feature running next in the Sequence.

Window(Home).Property(script.cinemavision.feature.next.title)

This property returns the Database Type of the Feature running next in the Sequence. (i.e. movie, tvshow)

Window(Home).Property(script.cinemavision.feature.next.dbtype)

This property returns the Database ID of the Feature running next in the Sequence.

Window(Home).Property(script.cinemavision.feature.next.dbid)

This property returns the Path of the Feature running next in the Sequence.

Window(Home).Property(script.cinemavision.feature.next.path)

 

Best Practices

We have come up with our best practices for adding CinemaVision support to your remote software. First, here's a quick overview of how CinemaVision works:

When CinemaVision is launched, it get's the list of videos from the Kodi video playlist or, if that is empty, it checks for a selected ListItem to get video info. If enabled, it then displays the list of those videos for the user to edit. When the user selects Play, this list is used when generating the video Sequence. The CinemaVision add-on does not really use a playlist, rather it gets the movies from the Kodi playlist.

From the remote, you should add the content to the Kodi playlist and then display a dialog similar to the add-on's dialog for editing the Kodi playlist. We have added the ability to pass a list of multiple movie IDs and episode IDs. When building a list of multiple IDs, you would keep that list of IDs on the remote rather than passing them one at a time to the add-on.


User Feedback

There are no reviews to display.


×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines and Terms of Use.