TVLobby

From Cinemar Wiki
Jump to: navigation, search

About

TVLobby3 is a plugin to display XML TV data in a special MainLobby3 user interface. This allows for quick "What's Playing Now" scrolling, and the ability to send an MLServeCmd with the channel of your selected program. TVLobby3 is not a Personal Video Recorder, but a MainLobby3 TV guide.

In response to our "International" customers, new for version 3.0.18, TVLobby3 now supports XMLTV download which provides listing support for Australia, Belgium and Luxembourg, Brazil, Argentina, Britain and Ireland, Croatia, Denmark, Estonia, Finland, France, Hungary and Romania, Iceland, Italy, Japan, Netherlands, Norway, Portugal, Reunion Island (France), South Africa, Spain, Sweden, and Switzerland.

9/11/2007: NOTE: Zap2It has decided to no longer provide free listings. One alternative for North America users is to use BeyondTV application and the beta MLBeyondTV plugin that will populate the tvlobby.mdb (TVLobby's database) directly with guide data. This requires installation and purchase of both BeyondTV and the MLBeyondTV plugin. This also will provide full Personal Video Recorder functionality in MainLobby system. A very significant update! [MLBeyondTV Plugin]

7/19/2008: MainLobby now supports [SageTV]. Sage can populate TVLobby's Guide Data, so there is another choice for covering listings and personal video recorder capability.

System Requirements

MainLobby3 Client v 3.0.85 (or newer)

MainLobby3 Server v 3.0.327 (or newer)

MLTVLobby plugin v 3.0.19 (or newer)

TVLobby.swf

TVLobby.ini

XMLTV v 0.5.48 or BeyondTV 4.8 or SageTV 6.3

Installation

Setting up your listings


Plug-In Setup

1. Close MainLobby Server3

2. On the Primary MLServer3 PC, run the TVLobby3_Setup.exe that you download. Accept all defaults and install the Plugin on this PC. You can also optionally allow the installer to install the MainLobby Client software if this PC will also run the client software.

3. Restart MLServer3 after the installation of the plugin. Run the MLServer3 Help / Additional Software Downloads and see if there is an updated plugin for TVLobby. If there is, download the file (saves to MLServer\Downloaded Files directory by default). Shut down MLServer3 and install the updated plugin.

4. For the initial installation of TVLobby, you should replace the tv.mdb in your Program Files\MLServer\data directory with the included file. The data structure has changed slightly from the latest update.

5. Register the Plugin by applying the license key you received on purchase and then Activate the plugin to make it run permanently.

6. Restart MainLobby Server

7. Highlight MLTVLobby in the Plug-Ins section of MainLobby Server.

8. Press ‘Settings’.

9. MLTVLobby3 plugin requires a plugin license registration (received when you purchase TVLobby3) and subsequent Activation code for that PC TVLobby plugin is installed on.


Configuring XMLTV Data Download

Requires MLTVLobby.dll of v 3.0.18 or newer

1) Create an account with Schedules Direct www.schedulesdirect.org. (Americas only, for ROTW this step can be skipped).

2) Configure your listings online at Schedules Direct. (Americas only, for ROTW this step can be skipped).

3) Download XMLTV from www.xmltv.org

4) Install into the C:\XMLTV folder. XMLTV does not like folder names with spaces in them.

5) From a command prompt in the XMLTV folder configure XMLTV by running the following command once:

  XMLTV tv_grab_na_dd --configure

This example is for the North America market. Use the XMLTV "grabber" for your market (see www.xmltv.org for details).

 XMLTV tv_grab_uk_rt --configure

This example is for the United Kingdom market.

6) From the same folder download a sample listing to verify all is correct

 (Americas) XMLTV tv_grab_na_dd --days 1 --output TVListings.xml
 (UK) XMLTV tv_grab_uk_rt --days 1 

7 A) If there are no errors then all is well. Next configure the TVLobby plugin. You will need to specify the number of days of listings you want downloaded, the name of the grabber file and the name of the xml file that contains the listings. TVLobby will default 7 days of listings using the tv_grab_na_dd grabber. The listings file should be the one you created in step 6. Typically c:\xmltv\TVListings.xml if you installed to default directories (highly recommended).

7 B) For international users, if the TVListings.xml file does not include the channel numbers, it is possible to use a channel map. Look for a file named channel_ids (Usually located in share directory of XMLTV, if your grabber does not have one, use the one from the uk_rt grabber and modify to suit your region). The format of that file is "web site|channel number|channel name|icon||". Feel free to renumber and rename the channel to something more appropriate, then save that file under a different filename and use this modified version in the plugin.

For the uk_rt grabber with xmltv installed in c:\xmltv file is here.

C:\xmltv\share\xmltv\tv_grab_uk_rt

Web site = name of the web site from your grabbers conf file.

Channel number = local channel number (4 digit max for displaying in TVLobby.swf)

Channel name = channelName in tvlobby.swf (typically 7 uppercase characters, 10 lowercase maximum otherwise they get chopped in tvlobby.swf)

Example uk_rt modified line, this changes the default name of ITV1 Anglia to Anglia, channel number is set to local channel number of 3.

anglia.tv.co.uk|3|Anglia|www.lyngsat-logo.com/logo/tv/ii/itv1_anglia.jpg||

You can also reorder the lines according to lineups (i.e. OTA, cable, satellite, etc.) and use "### OTA" as section delimiter. Those new lineups will make it possible to restrict the displayed channels in the TV grid.

8) First setup the plugin, change the grabber name, verify the path to xmltv TVListings.xml file, setup the link to your channel map file. From the TVLobby plugin do File/ProcessListings or issue the command MLTVLobby|ProcessListings.

9) The listings are processed in the background via the TVListings.exe program. A DOS window will open and connect to XMLTV grabber and download the listings to the TVListings.xml file. After that, the TVListings.exe application will convert the TVListings.xml file to the TVLobby.mdb (which the TVLobby plugin uses as it's guide data). When everything completes continue with the setup of TVLobby for Channel Watch commands etc. and you will have your listings back.

10) Optionally, this download can set be up as a scheduled task in MLScheduler by executing the MLTVLobby|ProcessListings command.

Downloading of the XML data and processing it takes a fair amount of time (10 minutes to download and another 10 minutes to process, typically). Schedule this during off hours to minimize the impact on MLServer3 performance. The download and data conversion take place in seperate applications from MLServer3 to minimize system performance issues, but the CPU will still be taxed during this period.

MLTVLobby plugin settings get saved to MLServer.ini. You can copy the below into the MLServer.ini file (append to the bottom) to prepopulate some of these settings (as example):

[TVLobby]
XMLDays=7
XMLGrabber=tv_grab_na_dd
DotSwap=0
XMLData=c:\xmltv\TVListings.xml
WatchMLServeCmd=MLConditional|IsEqual##{{tvlobby_tvwatch}}##DirecTV1##MLDirectv|1~Channel~<<CHANNEL>>##REPEAT:MLUSBIR6|SendIR~HughesHD1~<<ChannelDigit>>
PlayRecordingMLServeCmd=MLServeCmd.AV.TT_{{{{clientname}}_activemovie}}_{{{{clientname}}_moviesize}}|PLAYFILE~<<FILENAME>>

Configuring BeyondTV4 Data Download

Requires MLTVLobby.dll of v 3.0.18 or newer and MLBeyondTV.dll of v 0.3.6.0 or newer

1) Install and configure BeyondTV4 on a networked PC [SnapStream Download]

2) Setup your TV guides following BeyondTV installation instructions.

3) Install and configure [MLBeyondTV Plugin]

4) Configure the MLBeyondTV plugin's Tuner card / Guide to download.

5) Click the "Update the Database" button

6) MLBeyondTV plugin will then connect to the BeyondTV server and update the TVLobby.mdb database with your selected guide data.

Note that if you use XMLTV, the BeyondTV guide data will replace the old data. And visa-versa.


Commands

The TVLobby plug-in supports 3 user-defined commands for changing channels and recorded program playback.


The first command “Watch Channel MLServeCmd” gets executed when you select a program in TVLobby and press the ‘WATCH’ button. Here you can define a command to change the channel on your hardware or software TV viewing system. For example,

MLServeCmd.MLUSBUIRT|SendIR~TV~<<CHANNEL1>>:SendIR~TV~<<CHANNEL2>>:SendIR~TV~<<CHANNEL3>>:SendIR~TV~<<CHANNEL4>>

will tell your computer to send the first, second, third and fourth digits of your selected channel out your infrared hardware to your TV. Valid substitutions are <<ClientName>>, <<ChannelDigit>>, <<CHANNEL1>>, <<CHANNEL2>>, <<CHANNEL3>> and <<CHANNEL4>> and <<CHANNEL>> which sends the entire channel as one (“607”).

Here is an example of how TVLobby can change the channel of a Hughes HD Receiver (using the MLDirecTV plugin) MLServeCmd.MLDirectv|1~Channel~<<CHANNEL>>

To specify a Watch Channel command to support channel numbers of varying length. Syntax is REPEAT:SomeMLServeCmd~<<ChannelDigit>>. For example: REPEAT:MLUSBIR6|SendIR~HDTV~<<ChannelDigit>>. This will automatically create a MLServeCmd.Macro with the appropriate commands. This example will produce this effect in MLServer:

MLServeCmd.Macro|MLUSBIR6|SendIR~HDTV~6!MLUSBIR6|SendIR~HDTV~0!MLUSBIR6|SendIR~HDTV~7

Processing Study1 MLUSBIR6|SendIR~HDTV~6

Processing Study1 MLUSBIR6|SendIR~HDTV~0

Processing Study1 MLUSBIR6|SendIR~HDTV~7

If you are using two different TV receivers and want to use a single scene of TVLobby for selecting channels to watch on both receivers, add a button in MainLobby user interface that can set a “tvwatch” variable to “DirecTV1” (SetVariable|tvlobby_tvwatch~DirecTV1) A second button would set “tvlobby_tvwatch” variable to “DirecTV2” (SetVariable|tvlobby_tvwatch~DirecTV2). Then, put this command in the TVLobby plugin Watch command:

MLConditional|IsEqual##{{tvlobby_tvwatch}}##DirecTV1##MLDirectv|1~Channel~<<CHANNEL>>##REPEAT:MLUSBIR6|SendIR~HDTV~<<ChannelDigit>>

In this example, the DirecTV1 receiver is one that is controlled via the MLDirecTV plugin (serial controllable). The DirecTV2 receiver is supported by IR only, so the USBIR6 IR transmitter is used to send the change channel commands to it. Within the USBIR6 plugin, the DirecTV2 receiver is defined as “HDTV”.

With the latest beta versions (3.0.30+), using the Watch command on a program in the future, will actually schedule that command to happen at the appropriate time, through MLScheduller (version 1.0.3+). It is also possible to issue the command MLTVLobby|ChangeChannel~800, to perform a Watch command at the current time.

The second “Pre-record Channel Change” command is currently not implemented.

The third “Play Recording” command allows you to launch a MLServeCmd when a user selects a recorded program from within TVLobby. Typical commands would be: MLServeCmd.MLFileOpen|<<FILENAME>> to simply open the file with the default player.


To change guide data

From a MLServeCmd:

MLTVLobby|UpdateNowPlaying~<somechannelnumber>. This will allow an external process used to change a TV channel to look up what is currently showing on the channel and then update the server variables.

To change guide data from a MLServeCmd when there are multiple Set Top Boxes:

MLConditional|IsEqual##{{tvlobby_tvwatch}}##DirecTV1##MLTVLobby|UpdateNowPlaying~{{mldirectv_channel_001}}##MLTVLobby|UpdateNowPlaying~{{mldirectv_channel_002}}

Where tvlobby_tvwatch is a variable that gets set that determines which STB to control / view.


Icons

Icons allows you to associate network logos with stations in your lineup. You must have the separately available Network Logos Library available from Cinemar networklogosus to see the results of this feature. This allows you to associate any channel in your lineup with an icon in the Network Logos Library. We have setup the most common combinations; however, they can be edited or deleted. You can add additional station/logo combinations by selected ‘Add’.


Setup of TVLobby3 User Interface

1. Copy the TVLobby files to your Program Files\Cinemar directory; including:

Program Files\Cinemar\tvlobby.swf

Program Files\Cinemar\tvlobby.ini

Program Files\Cinemar\tvlobby.mls

Program Files\Cinemar\skins\1024x768_Theme17_tvlobby.jpg

2. Edit your tvlobby.ini file to point to the computer you have MainLobby Server and the MLTVLobby plug-in installed. If your computer Windows name is “HTPC”, edit tvlobby.ini to serverDomain=HTPC&… and save it. You can also use “HTPC”s IP address if you have networking name resolution problems in your setup.

3. Launch MainLobby and open “tvlobby.mls” to begin using TVLobby.

4. For version 3.0.30+, the scene used to call tvlobby.swf should include "MLServeCmd.Macro|MLPause|1!MLTVLobby|Init" as part of the "Scene startup" (Options/More). You might need to increase that 1 second pause if the <<ClientName>> variable does not get setup properly (i.e. wireless client).


Navigating the listings grid

Use the UP/DOWN/LEFT/RIGHT/NOW areas to move around the listings grid.

UP – go to the previous page

DOWN – go to the next page

LEFT – go back 1 ½ hours

RIGHT – go forward 1 ½ hours

NOW – go to now


Digital channels will appear as 25.2, 4.1, etc. in the UI. Currently, only US date formats are supported.

Press the programs to see detailed information about individual programs.

Press ‘WATCH’ to issue a command to change channels to the currently selected program.

Press ‘RECORDINGS’ to view a list of recordings in your “capture” directories


Use the GUIDE/MOVIES/ACTORS/SPORTS buttons at the lower left of the screen to view specialized guides for each category of information.


Using lineups

Starting with the 3.0.67 release, it is possible to restrict the displayed channels according to lineups, based on the command:

MLTVLobby|SetLineupFor~{{Lineup}}~{{ClientName}}

where Lineup can be one of the "channel providers" as defined in the TVLobby database file (MLServer\Data\tv.mdb), or one of the list of favorite channels created in the MLServer/View/Plugins/MLTVLobby/Settings/Lineups section. Using "" or "All" will revert to no filtering.


Variables Created

The following variables are created in MLServer3 after the “Watch” channel command is sent. The variables will then be updated at 1 minute intervals after that:

TVLobby_Current_ChannelDisplayName

TVLobby_Current_ChannelDisplayNumber

TVLobby_Current_ChannelName

TVLobby_Current_ChannelProvider

TVLobby_Current_ProgramStart

TVLobby_Current_ProgramStop

TVLobby_Current_ProgramTitle

TVLobby_Current_ProgramSubtitle

TVLobby_Current_ProgramDescription

TVLobby_Current_ProgramCategory

TVLobby_Current_ProgramRating

TVLobby_Current_ProgramRepeat

TVLobby_Current_ProgramStereo

TVLobby_Current_ProgramCC

TVLobby_Current_ProgramIsSeries

TVLobby_Current_ProgramOriginalAirDate

TVLobby_Current_ProgramIsMovie

TVLobby_Current_ProgramMovieStars

TVLobby_Current_ProgramMovieRating

TVLobby_Current_ProgramMovieYear


With the versions passed 3.0.33, there is a new option to have the TVLobby_{{ClientName}}_ variables created each time a program is selected from the TV listings grid.

With the versions passed 3.0.67, a variable TVLobby_Lineup_{{ClientName}} is created when restricting the information to a specific lineup.

With the versions passed 3.0.69, a variable TVLobby_Lineups is created, it contains the list of Lineups and Favorites available, delimited by "~".


Establishing Capture Directories

If you use a PVR application to store recorded programs to your computers hard-drive or network, you may enter the path(s) to these programs here in the TVLobby plugin. TVLobby will allow you to play and/or manage these recorded programs. Define your Play MLServeCmd that you want to execute when hitting "Play".


Additional Information

Experienced users can additionally edit the .ini file to define up to 10 genre categories to be colored in user-defined categories.

For fault finding purposes, I found using a small dataset with the grabber speeded up the process. Save a copy of your conf file (c:\xmltv\.xmltv) as [grabber name].conf_mine (so you dont have to run --configure again. Modify the [grabber name].conf for say 1-5 channels (highlight and delete the other channels), save it. Configure the plugin to grab 1 days worth of data. Now process listings will run in a couple of minutes. When fault finding session is over, rename [grabber name].conf to [grabber name].conf_test and [grabber name].conf_mine to [grabber name].conf.

Bugs

Feature Requests

Version History

Version 3.0.69

- Added the MLServer variable "TVLobby_Lineups", which contains the list of available lineups and favorites, delimited by "~".

- Fix: SetLineupFor did not perform properly from the MLServer or a different client.


Version 3.0.52-68

- The socket and clientname detection should no longer fail.

- The work around using Client_of_* and MLTVLobby|Init are no longer needed.

- Added the possibility of creating multiple list of favorite channels.

- Added the command "MLTVLobby|SetLineupFor~{{lineup}}~{{clientname}}" to fill the content of TVLobby.swf, with only the data associated with that {{lineup}} (i.e. channel provider or favorite).


Version 3.0.39-51

- Improved the international XMLTV support, by allowing a channel mapping.

- Added arbitrary programID where needed.

- The Sports and Sport categories are now both recognized.

- The Movies category is now working for non-US (i.e. MPAA) ratings.

- Fixed a wrong window header for the About section.


Version 3.0.38

- Re-added the possibility of using the MLServer variable Client_of_{{LocalHostName}} = {{ClientName}} (i.e. Client_of_myHTPC = myClient1), should the MLTVLobby|Init command fails.


Version 3.0.37

- Moved the recording commands to their own tab, in order to clean up the UI.

- Increased the height of the text boxes used to setup commands.

- Fix: shortening the Watch command under 250 characters was not handled properly.


Version 3.0.36

- Increased the maximum length of the Watch command from ~255 characters to 500.


Version 3.0.35

- Fix: the "Fill variable" checkbox state was not re-read on MLServer launch.


Version 3.0.34

- Added the MLServer variable PVR_{{ClientName}}_AutoID, so PVR applications can find the record of the current selection.


Version 3.0.33

- MLTVLobby|ChangeChannel~800 is working properly again.


Version 3.0.32

- The auto-update of variables is now an option (off by default) and creates tvlobby_{{ClientName}}_* variables. The tvlobby_current_* should work as pre-3.0.30.

- MLTVLobby|ChangeChannel~800 does not currently update the variables properly.


Version 3.0.31

- Replaced the ListBox by a ListView for the Event log.

- Fixed the MLTVLobby|UpdateNowPlaying~555 (update the tvlobby_current_* variables) and MLTVLobby|ChangeChannel~555 (update the variables + execute watch) commands. No effect on the TV grid listing itself.


Version 3.0.30

- The tvlobby_current_* variables should reflect the current selection, instead of the program playing now on that channel.

- The empty tvlobby_current_* variables are no longer created.


Version 3.0.29

- Requires MLServer 3.0.389 (or more recent).

- No longer requires Client_of_{{LocalHostName}}, instead the scene used to call tvlobby.swf should include "MLServeCmd.Macro|MLPause|1!MLTVLobby|Init" as part of the "Scene startup".

- The {{variables}} expansion is now made through a standard MLServer method.


Version 3.0.28

- The tvlobby_current_* variables are now filled when a tv show/movie is selected, rather than only when the Watch button is pressed.


Version 3.0.27

- It is now possible to pad Channel, in the Watch command, to 3 or 4 digits.


Version 3.0.26

- It is now possible to use <<CLIENTNAME>> in the Watch command. Currently this requires setting Client_of_{{LocalHostName}} = {{ClientName}} (i.e. Client_of_myHTPC = myClient1).

- In the Watch command, the {{variables}} will be expanded (do not use the various {{tvlobby_current_*}} as they get filled after that step).


Version 3.0.25

- Added a user's command to be processed after a Watch command has been scheduled in the future. Improved the readability of the plugin/settings on system using oversized fonts.


Version 3.0.24

- Replaced the tvlobby_timeN and tvlobby_eventN variables by MLScheduler entries (requires version 1.0.2+).


Version 3.0.23

- Using Watch on a selection in the future, will create the appropriate variables (N = 1 to 20) tvlobby_timeN and tvlobby_eventN. The user should have some corresponding automation rules, deleting the variables after use.


Version 3.0.22

- Enabled support for more than 3 x 30 minutes columns in the tv grid. (will require an updated tvlobby.swf)

- Added a tvlobby_current_Selection variable for future use.


Version 3.0.21

- Fix to the Sport and Movies fix.


Version 3.0.20

Fixed the Sports and Movies listing on non English (US) systems and their display of accentuated characters.

Outdated Zap2It Configuration

Old setup instructions:

1. Open your web browser to labs.zap2it

2. If you don’t currently have an account, select ‘New User? Sign Up”

3. Accept the subscriber agreement terms

4. Enter your information

a. Enter ZYZM-TE5O-SBUT when asked for a certificate code

5. Select ‘Add a lineup’ to choose your TV Listings information

6. Add or remove channels from your lineup to include only the channels you want in your listings

7. Press ‘Finish’


Scheduled Listings Download

The MLTVLobby plug-in accepts a command for downloading listing information:

MLServeCmd.MLTVLobby|DownloadListings~username~password~days

Enter your Zap2It Labs username and password and the number of days you’d like to download. This can be issued from a button in MainLobby, via command-line, http request or for most people by using the MLScheduler plug-in to download listings at set intervals.


Plugin Setup

9. Enter your Username and Password as selected when setting up your account at Zap2It Labs

10. Select your Timezone Offset

11. Select the number of days of listing information you would like to download

12. To download listing data now, press ‘Download Listings’. This will spawn a second window to open where the TV listings are downloaded as a second PC process so as to not interfere with MLServer3 processing. TVListings.exe is launched from the MLServer folder for all downloads. MLTVLobby plug-in automatically compacts the database after a download of TV listings. No need to stop MLServer, the compaction happens automatically. If you are upgrading from an earlier version, the installer will overwrite your existing TV.mdb file. You will need to download new TV listings after installing this plugin.