Web publishing template for Ant Movie Catalog

Created by Bergware International

Version 3.0

Date: 4 March 2011

 

INTRODUCTION

This template is based on Twinks excellent template beta version 0.8. Several fixes and speed improvements are included in this release to overcome the known issues in the original template. This template has been tested with Internet Explorer, Mozilla Firefox, Google Chrome and Opera.

 

This template introduces a dynamic web page construction which allows you to change the displayed output on-the-fly yourself to suit your needs. XML files are used to give an easy way to setup a customized layout at web creation time.

 

This template requires the export of the AMC database in XML format.

 

An example of the template output is given below.

 

 

GETTING STARTED

Follow the instructions given below to setup your export folder which contains the information suitable for your browser to display. Once you have it running with the default settings, you may want to customize the looks to your own liking.

 

 

THE EXPORT FOLDER

Unzip and copy the following files and folders from this package to your export folder:

/images/*            contains subfolders with image files

/themes/*           contains the style sheet files

index.html           entry page for browser, holds the frame setup

header.html        header file to show top frame

footer.html          footer file to show bottom frame

movies.html       main frame holding movie details

layout.xml           XML layout files numbered 1 to 6

locale.xml           translations into local language (default English)

movies.js            Javascript source file

cvi_reflex_lib.js   Javascript file from Christian Effenberger

cvi_strip_lib.js    Javascript file from Christian Effenberger

 

The only thing needed from the AMC application is an export of the database into XML format. Save your file as movies.xml to your export folder and make sure the pictures are copied as separate files together with the export. Prior to the saving in XML format, change the preferences of AMC to have the following settings selected, this allows the picture files to be saved under the name “movies_xxx” (xxx is a sequence number) rather then the name of the film title:

Movie Information -> Picture Importation -> Use movie number

Movie Information -> Picture Importation -> Use catalog name as prefix for the picture name

 

Congratulations - You are now ready to view your online database by double clicking on the newly created index.html file or by directing your browser to the web site.

 

Tip 1: You may keep your AMC database in XML format and any future updates can be made directly on this file in your export folder, this way these changes become instantly available on your web page too.

 

Tip 2: You can store the database XML file and associated picture files in a sub-folder of your export folder. This keeps your data separate from the web files. See “Change folder of the AMC database”.

 

 

THEMES

Using the .css files found in the "themes" directory the colours of the table can be changed. Four themes/styles are included with this template: cyan (default), blue, black and orange. The themes can be changed on-the-fly by selecting the appropriate colour in the settings menu.

 

CUSTOMIZE OUTPUT

The layout.xml files are used to define the generated output format. The default output format is layout1.xml, but this can be changed in the "movies.html" file. Output formats can be changed on-the-fly once the web page is displayed. Cookies are used to remember the personal settings.

 

It is possible to adjust the existing output formats to suit your own needs or create a new layout.xml file all together (e.g. layout7.xml). Note that when creating a new layout file you must give it a corresponding display name, which is defined in the array 'formats' within the locale.xml file. As long as no name is given, it won't appear in the list of available choices.

 

The content of the layout.xml file is now further explained and can help you in changing or creating the desired output format.

 

Options

The options section is used to overwrite the default values of the JavaScript source file. The following entries are allowed:

category       defines which category is displayed at startup, default is ALL

pagesize      defines the number of movie titles displayed per page, default is 10

sortkey         defines which column is used as initial sorting index, default is NONE

searchkey    defines which fields are included in the search function, default is the DESCRIPTION field

separator      defines whether a colored line is used between movie titles, default is FALSE

 

Groups

The groups section defines the selectable categories (see the settings menu on the web page). For each category the script will automatically find the available entries. Use the "checked=true" option to have a category included as default item on display. Category names are customizable with the movie attributes available within the AMC application.

 

For certain categories, e.g. country names and subtitles,  you may use the option “flag=true” this will display a flag instead of the category name.

 

Entries which can not be placed under a certain category because they are empty or have an incorrect value specified, are stored under the “Unknown” part of the given category. These appear at the first row and you should make a correction in your database.

 

Default

The default section defines general settings, usually you do not need to change this unless you have renamed folders or want to include your own images. The following entries are specified:

images               defines the main folder which holds this template images

empty                 defines the name of the image when the source image is not present

arrow                  defines the name of the file holding the sort direction image

rating                  defines the name of the files representing the stars rating

flag                     defines the name of the files holding the flag images

video                   defines the name of the files holding the video images

audio                  defines the name of the files holding the audio images

mpaa                  defines the folder containing the film rating images

region                 defines the folder containing the DVD region images

default_region    defines the default region when none is specified

more                   defines whether a popup with totals is displayed or not (bottom right of page)

top                      defines how many top actors/directors/countries are listed in the popup

expand               enables or disables the expand button [++] functionality

 

Header Row Attributes

This section defines the actual layout of the web page. The row and cell tags are used to build the table format. Study the existing layout files to understand their functioning!

 

The first row is the header row and is used to define the heading of each column and whether a column is sortable or not, implicitly it also defines the total number of columns. This row must be present and visible. The following attributes are exclusively for a header row definition:

hover            defines highlighting of rows when moving the mouse over them (this does not work in IE5.5 and lower)

thumbnails   defines the page display has only images. The “click” attribute can be given the value “true” or “false” and defines whether tooltips dynamically appear (false) or the user must click on an image (true). The only allowed cell content type is "img" (see file layout4.xml for more details)

                     The image is given a 'title’ attribute which displays the customizable information when moving or clicking the mouse over or on an image

pin                defines the reference to a hidden row as a row action. Clicking anywhere on the row will make the hidden information visible

 

Row Attributes

Any next rows define the layout of the visible information on the screen. These rows are optional and may have the following attributes:

pin                defines the reference to a hidden row as a row action. Clicking anywhere on the row will make the hidden information visible

popup           defines the reference to a popup window as a row action. Moving the mouse anywhere over the row will make the hidden information visible as popup window (see file layout3.xml for more details)

 

Hidden Row Attributes

Hidden rows are initially invisible and can be made visible when the user does a mouse click or mouse movement on the referencing row or cell (see above).

hide              defines the row as initially invisible; hidden rows must have a unique 'id' associated with them which links the hidden row the referencing row or cell

id                  sets the identification of a hidden row subsequent hidden rows need an additional unique level setting (1-25), see the layout files for an example

 

Cell Attributes

The following attributes can be given to a cell definition:

pin                defines the reference to a hidden row(s) as an individual cell action. Clicking on the cell will make the hidden information visible

popup           defines the reference to a popup window as an individual cell. Moving the mouse over the cell will make the hidden information visible as popup window

title                defines the title to be displayed in the header of the column (applicable only to a cell in the header row)

sortby           defines the initial category used for sorting (applicable only to a cell in the header row)

sortlist          creates a dropdown menu with selectable fields for sorting (see layout4.xml)

width             defines the width of the column (applicable only to a cell in the header row)

 

Cell Content Attributes

The content of a cell can be manipulated using the following optional attributes:

align              defines the horizontal alignment (left,right,center), default is left

valign            defines the vertical alignment (top,bottom,center), default is center

rowspan       defines how many rows are spanned, default is 1

colspan        defines how many columns are spanned, default is 1

ident             defines the cell content to be indented or not (true, false), default is false

 

Cell Content Tags

The content of a cell can be one of the following tags:

rowindex       this keyword is used to display a sequence number as text

<text>           creates a text message, literal text must be given between quotes. The optional “style” attribute can be used to change the display of the given text as follows:

bold           text is displayed in bold

underline   text is displayed as underlined

italic           text is displayed in italics

justify         text is left and right aligned

 

<img>           creates an image reference with optional attributes as follows

src             specifies the name of the image source file

width          specifies the width of the image in pixels

height        specifies the height of the image in pixels

class         specifies a 3D effect, possible settings are “film” and “reflex”

url              specifies a link to an external site

target         specifies how links are opened

alt/title        adds a plain text tooltip to the url reference

alt/title        When used in combination with the "thumbnails" setting. It refers to a customizable tooltip similar to pin and popup

<rate>          creates a stars picture from a rating value. Rating values are from 0 to 10

<flag>           translates an original name into a flag image, this can be used on country and language names. Optional switches with true/false values may be used:

group         multiple flags are replaced by a single EU flag

text            original text value is displayed after the flag image

newline      multiple entries are displayed on separate lines

<mpaa>       creates a film rating system image based on MPAA values. This tag is unused by default, because no input field within AMC exists for it, you must select one yourself and edit the layout.xml files accordingly

<region>       translates a DVD region number into an image. Multiple region numbers must be separated by a comma (e.g. 2, 4). No default input field exists for DVD region information. And you must select one yourself

<video>        translates a video format name into an image. Multiple video format names must be separated by a comma (e.g. PAL, XVID).

<audio>        translates an audio format name into an image. Multiple audio format names must be separated by a comma (e.g. DD5.1, DTS5.1). The following attributes may be used:

track          links an audio entry to a language entry. The number of languages and number of audio formats must correspond (e.g. languages = English, French; audio formats = DD5.1, DD2.0)

flag            linked languages (see “track” above) can be displayed as flags or text

newline      multiple entries are displayed on separate lines

<br/>            inserts a line break character

<sp/>            inserts a none breaking space

<hr>             inserts a continues line

<box>           inserts a checkbox to allow the title to be added to the favorites category. It has the following attributes:

pin             specifies the reference to the source information

value          specifies the information which will be put in the email body

totals         include totals in email list

save          remember favorites upon next visit

 

Change folder of AMC database

By default the AMC database and associated pictures are stored at the top level of the export folder. If you wish to move the database and pictures to a subfolder, which will give a cleaner overview when you have a lot of titles in your database then edit the file “movies.html” and change the value of variable “datapath” to the name of the subfolder you are using (e.g. datapath=”moviesDB”)

 

Helper functions

There are several helper functions available made for the XML layout file:

append()       append individual items together, if any of these items is 'null' then an empty string is returned. This function is useful for items which do not have content all the time, and must be suppressed when they are empty

merge()        concatenate individual items together, but if any of these items is 'null' then the first item is returned. This function is useful for items which have optional text appended

format()        formats the standard movie duration in minutes to something else. The following formats are supported (default is ‘mm’):

                     h       "h:mm hour"

                     m      "mm min"

                     s       "sss sec"

site()             truncates a URL to the domain name only (e.g. http://www.mydomain.com)

list()              used to limit the number of entries to be displayed, e.g. list(movie.getAttribute(‘Actors’),3) will shorten the list to the first three entries only.

 

Flags instead of names

In order to display flag images the tag “<flag>” is used for translating a local name into a 2 letter ISO code, which refers to the flag image name. The flags folder contains images for the most common countries but this can be expanded if needed.

 

The flag function uses the "locale.xml" file to make the necessary translations. For the flags to appear correctly you must edit this file and add the local names of the countries as they appear in your database. It is allowed to put multiple translations under the flag code (default are English names). The following example shows how to build a multi-language translation file:

 

<flag file="nl">

  <id>netherlands</id>

  <id>holland</id>

  <id>nederland</id>

  <id>pays-bas</id>

  <id>dutch</id>

</flag>

Movie Attributes

All of the available movie attributes known by AMC can be used in your layout file. Remember that names are case sensitive. Refer to AMC to see the possible values.

 

Summary Popup

A summary popup is displayed when the mouse is moved over the total titles field in the right lower corner. This popup is dynamic and gives information about the list of titles currently selected. This means that the user can make a selection first, e.g. choose a genre, and get a summary over that selection, including most favoured actors, directors and countries.

 

Date format of XML Database

When your database is saved in XML format then AMC will use the local settings of your computer to determine how dates are stored. For the script to be able to know which date format is in use it will read the “system” setting from the locale.xml file. By default this is set to European date format of “dmy”, but this may be changed to English format “mdy” or Asian format “ymd”.

 

Translations

Obviously the content of the database will be displayed as is stored originally. Any localization in here you must do yourself.

 

If you want to localize the web output to your own language, there are four places where to make changes:

a)   In the LOCALE.XML file you have to make your local translations

b)   In the LAYOUT.XML files you have to adjust the "name", "title" and "text" settings

c)   In the MOVIES.HTML file you need to translate the style names and waiting message at the top of the file

d)   In the HEADER.HTML file you need to change the header titles at the top

 

Both the XML and HTML files use the character code set ISO-8859-1 which will work with most languages, for other languages you might need to change this code set to the one which supports your character set.

 

Features

* Interactive list display

* Customizable output format (6 formats are included)

* Changeable number of rows per page

* Changeable category selection

* Search function with phonetic support to overcome typical spelling mistakes

* Multiple category support (titles appear in all sub-categories)

* Per category display

* Empty or unknown category support

* Sorting on different columns both ascending and descending

* On-the-fly changeable layout

* Thumbnail view with customizable tooltip either dynamic or clickable appearance

* Concealed information as row(s), popup or tooltip

* Mouse hover function

* CSS/style support (4 styles are included)

* Internet Explorer, Mozilla, Chrome and Opera support

* Remember personal settings when page is re-opened

* Rating with 5 stars indication

* Quick show/hide buttons for additional information display

* Selectable time format for film duration

* Flags display for country, language and subtitle names

* MPAA film rating

* DVD region indication

* Audio & video image display with most common names readily available

* Information function

* Summary popup function

* About function

* Page loading indicator

* Favorites section with email capability

 

Known Issues

It may happen that the XML file is not accepted by your browser because some 'corrupting' characters appear in the content. The easiest way to verify the correctness of the XML file is by opening it directly in your browser. Any error messages will be given referring to the offending part(s). Please correct them! Specially Mozilla is very strict and doesn't display anything as long as the XML file is not recognized as a proper file. Internet Explorer seems to be a bit more relaxed, it will usually display the XML file even though some errors are present; however it is recommended to fix them anyway.

 

Email export from Internet Explorer to Mozilla Thunderbird 3 results in an empty body message.

 

Version 3.0

New

  • Possibility to play files locally on your PC (Internet Explorer only)
  • Possibility to stream files to your PC
  • Possibility to start playing files remotely on Dune media player
  • New field in settings to select desired player
  • Player settings section in ‘locale.xml’ file
  • Advanced player settings (for on-the-fly changes)
  • Frameless design using CSS styles, single HTML file
  • New “list” helper function to shorten the list of entrees (see layout1 for an example)
  • Using updated style sheet for buttons display
  • Support of displaying content on mobile phones (auto detection)
  • Dedicated style sheet for mobile display
  • Header translations in ‘locale.xml’ (no more need to edit source HTML file)
  • Remote control for Dune media player
  • Updated video and audio images
  • Large and small flag sizes included
  • Updated layout files to reflect new possibilities (not compatible with v2)
  • Latest versions of 3D scripts from Christian Effenberger included

 

Corrections

  • Sorting of movie titles with ‘number only’ is now done correctly
  • OK/Enter button in settings closes dialog and updates immediate
  • Category selection made persistent over all layouts
  • Table is now fully extended in Firefox
  • Favorite selection in “image view mode” made persistent
  • Corrected switching to another layout while email popup is open
  • Other corrections & improvements

 

 

How to play files on your PC

 

Playing media files on your PC can be done in two ways:

 

[1] Open file directly in Windows Media Player (Internet Explorer only)

[2] Stream file from a web server using HTTP (all browsers)

 

Mode 1: Open in Windows Media Player

The advantage of this mode of operation is that it does not require any installations, the disadvantage however is that this mode is restricted to Internet Explorer only; other browsers such as Firefox and Chrome do not allow the launch of executables locally on your PC.

 

The default security settings of Internet Explorer prohibit ActiveX activation and this needs to be changed first, otherwise the javascript engine will fail with the error message:

 

Automation server can’t create object

 

Change the Internet Explorer Security settings:

 

  • Select Tools -> Internet Options
  • Select the “Security” tab
  • Select “Trusted sites”
  • Click on “Sites”
  • Add the URL of your webpage (e.g. http://mywebpage.com/film-collection)
  • Click on “Custom level”
  • Change setting of “Initialize and script ActiveX controls not marked as safe for scripting” to enable
  • Apply new settings by clicking the OK buttons

 

Your web site is now in the list of “trusted sites”. See the status bar at the bottom for verification, and program execution is permitted.

 

Mode 2: Stream from web server

This mode of operation requires the installation of a web server (not covered here). Streaming of the content happens via regular HTTP protocol, this will work out-of-the-box with any web server though it is not “true” streaming as compared to a dedicated web streamer application. The advantage here is that most browsers support this way of delivery (with the correct MIME settings).

 

The difference between mode [1] and mode [2] is made in the file “locale.xml”, see below.

 

 - Edit LOCALE.XML

 

Open the file “locale.xml” in notepad or another text editor and scroll to the PC player section. The settings look like this:

 

<player

  model="PC"

  application="c:\progra~1\window~2\wmplayer.exe"

  server="localhost"

  share="share-name"

  dvd="DVD,DVD5,DVD9"

  bluray="BD,BRD,BLU-RAY,BLURAY"

  scan="last"

 />

 

model

This setting identifies the type of player; leave this on ‘PC’

 

application

This setting identifies the location of the executable to start. It points to Windows Media Player, which is present in most Windows installations. You may change this to your own preferred player, but keep in mind that anyone viewing your website needs to have this executable too. Also path notations must follow the ‘old’ DOS style.

 

Note: any video and audio codec to view your files must be pre-installed on the target machine otherwise WMP (or your own player) won’t be able to play the content.

 

server

This setting identifies the location of your media files. If your videos are stored locally on the PC from which you are viewing your web page then keep the setting “localhost” otherwise change it to the IP address of the server which holds your collection.

 

share

This setting is used in several different ways:

<share name>   identifies the name of the share which contains your video collection. Check the setting on your NAS to find the name or in case you are using you own PC (localhost) then you need to make the folder which contains your collection shareable.

<local disk>        when you play files from your local machine (localhost) and you do not want to setup a share, then you can use an absolute path notation instead, e.g. “D:\Movies”

 

http:                    when the share name is set to ‘http:’ (note the colon at the end) it will invoke the http streaming mode. In this case the server address points to your web server.

 

dvd

This setting identifies the media types which refer to a DVD disk. The script reads the AMC field “Media Type” to find the corresponding types. If a match is found then the extension “/VIDEO_TS/VIDEO_IFO” is automatically appended to find and start a DVD folder.

 

Note: this mechanism only works when your movies are in separate folders and DVDs are stored in their original format. If this is not the case, e.g. you don’t use sub-folders “VIDEO-TS” or you use ISO files then set the DVD section to empty (“”), this will prevent automatic appending.

 

bluray

This setting identifies the media types which refer to a BLURAY disk. Similar as the DVD setting the script reads the AMC field “Media Type” to append automatically the extension “/BDMV/INDEX.BDMV” to find and start a bluray folder.

 

Note: this mechanism only works when your movies are in separate folders and blurays are stored in their original format. If this is not the case, e.g. you don’t use sub-folders “BDMV” or you use ISO files then set the bluray section to empty (“”), this will prevent automatic appending.

 

scan

This setting identifies which Media Type entry to take when more than one value exists. For example you have the movie in different formats: DVD and MKV. The script will select the last entry as the one to play. This setting can be changed to “first”.

 

 

- Make File References in AMC

 

The layout.xml files have a new statement to make a ‘play’ action possible.

 

<play src="'images/play-button.png'" width="28" height="28"

      url="movie.getAttribute('URL')"

      title="movie.getAttribute('FormattedTitle')"/>

 

In this example the URL field (but any other field is allowed too) in AMC is used to make a reference to the file location and this information is parsed by the script for playing. The reference includes the path and file name, excluding the share name.

 

Some examples will clarify the usage!

 

Example 1: your video files are on a NAS server

 

Usage: different family members in your home have access to your local web site and each of them is able to play a video on his or her PC.

 

Preparation: have a SMB server running with a share called “Movies”

 

locale.xml

  server=”192.168.1.254”

  share=”Movies”

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  12 Angry Men

 

a) This will play the file: //192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //192.168.1.254/Movies/12 Angry Men/video_ts/video.ifo

 

 

Example 2: your video files are available by a WEB server

 

Usage: different family members in your home have access to your local web site and each of them is able to play a video on his or her PC.

 

Preparation: have a web server running which has access to your video & audio collection

 

locale.xml

  server=”192.168.1.254”

  share=”http:”

 

URL field in AMC

a)  Movies/Armageddon/Armageddon.iso

b)  Movies/Sci-fi/1995/Apollo 13.mkv

c)  Movies/12 Angry Men

 

a) This will open the file: http://192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will open the file: http://192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will open the DVD folder: http://192.168.1.254/Movies/12 Angry Men/video_ts/video.ifo

 

 

Example 3: your video files are on your own computer (using shares)

 

Usage: you are the only viewer and maintain the web site for personal use.

 

Preparation: share the folder on your PC containing the video content as “MyMovies

 

locale.xml

  server=”localhost

  share=”MyMovies

  dvd=””  ç no automatic appending

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men/video.ifo

 

a) This will play the file: //127.0.0.1/MyMovies/Armageddon/Armageddon.iso

b) This will play the file: //127.0.0.1/MyMovies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //127.0.0.1/MyMovies/DVD/12 Angry Men/video.ifo

 

 

Example 4: your video files are on your own computer (using absolute path)

 

Usage: you are the only viewer and maintain the web site for personal use.

 

Preparation: none

 

locale.xml

  server=”localhost

  share=”D:\Movies”

  dvd=””  ç no automatic appending

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men/video.ifo

 

a) This will play the file: D:\Movies\Armageddon\Armageddon.iso

b) This will play the file: D:\Movies\Sci-fi/1995\Apollo 13.mkv

c) This will play the DVD folder: D:\Movies\DVD\12 Angry Men\video.ifo

 

Note1: Usage of ‘spaces’ is allowed in the name and path

 

Note2: Forward and backward slashes are converted automatically to their appropriate usage.

 

Note3: Viewing your video content from the Internet is not supported due to security hazards.

 

 

How to play files on your Dune Media Player

 

People in the possession of a Dune Media Player are able to control its playback via the web interface. This feature requires the latest Dune firmware, which supports “IP Remote Control”.

 

 - Edit LOCALE.XML

 

Open the file “locale.xml” in notepad or another text editor and scroll to the Dune player section. The settings look like this:

 

<player

  model="Dune"

  dune="ip-address"

  server="none"

  protocol="local"

  share="drive-name"

  none="file"

  file="MKV,AVI"

  dvd="DVD,DVD5,DVD9"

  bluray="BD,BRD,BLU-RAY,BLURAY"

  scan="last"

 />

 

model

This setting identifies the type of player; leave it on ‘Dune’

 

dune

This setting identifies the location of your Dune media player. Enter here the IP address that is assigned to your Dune media player.

 

server

This setting identifies the location of your media files. If your videos are stored on a locally attached drive to the Dune, then keep the setting “none” otherwise change it to the IP address of the NAS server which holds your collection.

 

protocol

This setting identifies the protocol used to retrieve the media content. If your videos are stored on a locally attached drive to the Dune, then keep the setting “local” otherwise change it to either “smb” or “nfs” to communicate with your NAS server. In this case a correct server IP address must be supplied too (see previous entry).

 

share

This setting identifies the name of the share which contains your video collection. Check the setting on your NAS server to find the name or in case you are using an attached drive (local) it is the name of your local storage device. For the ‘nfs’ protocol it represents the “export-path”.

 

none

This setting identifies the default media type in case no value or a unknown value for the media type is specified.

 

file

This setting identifies the media types which refer to a single file. The script reads the AMC field “Media Type” to find the corresponding types. The script uses this entry to construct the correct command to be sent to the Dune media player.

 

dvd

This setting identifies the media types which refer to a DVD disk. The script reads the AMC field “Media Type” to find the corresponding types. The script uses this entry to construct the correct command to be sent to the Dune media player.

 

bluray

This setting identifies the media types which refer to a BLURAY disk. Similar as the DVD setting the script reads the AMC field “Media Type” to construct the correct command to be sent to the Dune media player.

 

scan

This setting identifies which Media Type entry to take when more than one value exists. For example you have the movie in different formats: DVD and MKV. The script will select the last entry as the one to play. This setting can be changed to “first”.

 

Note: it is important that the field “Media Type” in AMC is correctly filled in otherwise the script can not send the correct command to the Dune media player.

 

 

 - Make File References in AMC

 

The layout.xml files have a new statement to make a ‘play’ action possible.

 

<play src="'images/play-button.png'" width="28" height="28"

      url="movie.getAttribute('URL')"

      title="movie.getAttribute('FormattedTitle')"/>

 

In this example the URL field (but any other field is allowed too) is used to make a reference to the file location and this information is parsed by the script to the Dune media player for playing the content. The reference includes the path and file name, excluding the share name.

 

Some examples will clarify the usage!

 

Example 1: your video files are on a NAS server using SMB

 

Usage: you have a centralized storage which the Dune can access to play content

 

Preparation: have a NAS server running with a SMB share called “Movies”

 

locale.xml

  dune=”192.168.1.5”

  server=”192.168.1.254”

  protocol=”smb

  share=”Movies”

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  12 Angry Men

 

a) This will play the file: //192.168.1.254/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //192.168.1.254/Movies/12 Angry Men

 

 

Example 2: your video files are on a NAS server using NFS

 

Usage: you have a centralized storage which the Dune can access to play content

 

Preparation: have a NAS server running with a NFS export path called “Video”

 

locale.xml

  dune=”192.168.1.5”

  server=”192.168.1.254”

  protocol=”nfs”

  share=”Video”

 

URL field in AMC

a)  Movies/Armageddon/Armageddon.iso

b)  Movies/Sci-fi/1995/Apollo 13.mkv

c)  Movies/12 Angry Men

 

a) This will play the file: //192.168.1.254:/Video:/Movies/Armageddon/Armageddon.iso

b) This will play the file: //192.168.1.254:/Video:/Movies/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD: //192.168.1.254:/Video:/Movies/12 Angry Men

 

 

Example 3: your video files are on an attached hard drive

 

Usage: you have your collection together with the Dune media player

 

Preparation: have the local storage called “MyHDD” (use dune_folder.txt)

 

locale.xml

  dune=”192.168.1.5”

  server=”none”

  protocol=”local”

  share=”MyHDD

 

URL field in AMC

a)  Armageddon/Armageddon.iso

b)  Sci-fi/1995/Apollo 13.mkv

c)  DVD/12 Angry Men

 

a) This will play the file: //storage_name:/MyHDD/Armageddon/Armageddon.iso

b) This will play the file: //storage_name:/MyHDD/Sci-fi/1995/Apollo 13.mkv

c) This will play the DVD folder: //storage_name:/MyHDD/DVD/12 Angry Men

 

Note1: usage of ‘spaces’ is allowed in the name and path

 

Note2: Controlling the Dune media player from the Internet is not supported due to security hazards.

 

 

Advanced XML Usage

 

There are several ways to define the playing of content in the XML layout files.

 

1.      Using the PLAY command

This is commonly used when the play action is associated with an image. In other words clicking on the image initiates the playing. See for an example layout1.xml

 

2.      Using the PLAY function

This is commonly used when the play action is associated with text. In other words clicking on some text initiates the playing. See for an example layout2.xml

 

3.      Using the “play:” directive

An alternative way to associate the play action with either an image or text is to prefix the URL entry in AMC with the directive “play:”. For example: play://12 Angry Men.mkv will initiate the playback of the file “12 Angry Men.mkv”.