Eskin variables - accident12123/eversion GitHub Wiki

There are going to be places in your eskin where you will want to display jukebox data, have elements of your eskin change, or reference settings as part of a filename. Variables is how you accomplish this.

USAGE

Variables are enclosed in our tags: [::].

Examples:

  • [:fulltitle:]
  • [:season:]
  • [:@media:]
  • [:$testing:]
  • [:*overscan:]

Variables can be modified:

You may need to adjust the output to meet your skins design. To use a modified just add it to the variable: [:fulltitle,upper,blank:]. Modifiers with the exception of howmany are applied in order you list them.

Modifiers:

  • upper: convert to uppercase
  • lower: convert to lowercase
  • blank: if null or undefined or unknown return a blank ("").
  • evtrans: take the variable and get the language translation of the same name from the eversion language file.
  • estrans: take the variable output and get the language translation of the same name from the eskin language file.
  • round: Rounds the output up or down to the nearest integer.
  • abs: returns the absolute value.
  • ceil: return the ceiling of a value
  • floor: returns the floor of a value
  • sqrt: returns the square root.
  • length: returns how many characters long the variable output is.
  • #/howmany: Comma separated reduction of choices (,3 for example) usefull for cast/genre)
  • filesafe: replaces <>"|/:?* with .
  • yamjfilesafe: replaces the filesafe characters with - like yamj does for it's filename encoding
  • trun#: truncate output to # characters and add ... to the end. Note, we add 3 to the number for the ... so it will only truncate if needed to fit in the space including the ... (,tran12 for example)
  • cut#: (R0135): same as trun but does not add ... to the end
  • slice#: (R0135): chops off the first # characters. ex: ABCDE slice2 would result in CDE
  • nospaces: (R0140): removes spaces
  • escape: (R0160): escapes the variable, standard javascript style escape
  • unescape: (R0160): unescapes the variable, standard javascript style unescape. Appears to also convert xml entites in flash.

XPATH

With minor exceptions, you can xpath the xml directly. For instance if the movie xml has a value that isn't found in the special variables. just use it.

  • mjbVersion

You can also use more traditional xpath but /movie/ is added for you.

  • sets/set

You can also get to an attribute in the xpath just adding @attribute name to the end

  • ratings/rating@moviedb

NOTES:

  • xpath is limited to the actionscript 2.0 xpath options. it's damn limited.
  • there is no handling of multiple returns. if your xpathing something with multiple you'll need to narrow it down some other way.

Multi:

new multi variable for multiple xml elements. you can use the multi-element when your trying to get at xml data that has multiple entries. You first xpath out all the items, then pick the item and sub-xpath out the actual node your trying to reach.

The below is an example of using xpath to pull out all the movie awards that the movie has won and then getting the name and year of the award from element #2 in the list.

  • format: multi-xpath-#-subxpath-attribute(optional)

    • ex: [:multi-/movie/awards/award/event[@won='1']-2-/award:]
    • ex: [:multi-/movie/awards/award/event[@won='1']-2-/award-year:]
  • xpath and subxpath is relative.

  • the first is an example of looknig for all the award nodes where attribute won=1

  • the first subpath is to get the nodename (which is the award won)

  • the second example gets the attribute for year from the same award.

  • the # variable is what element you want. In our example it's the second xml block.

Xpath support is provided by flash/actionscript so please refer to their documentation for options/limitations with it.

WHERE THEY WORK

Our block reference will indicate where variables are supported or any special information you need to know about them but in general you can use variables where they are needed.

VARIABLE LIST

Eversion internal data

  • Prefix: @
  • Example: [:@sharedmedia:]

List:

  • sharedmedia: Path to shared eskin media folder
  • media: Path to eskin media folder
  • jukebox: Path to jukebox data
  • eskin: Path to eskin folder
  • indexname: friendly name of where you are. Includes the indexname when on an index and tvshow/movie name when in a tv/movie. Great for nav bars.
  • indextype: the type of index (EP, TV, INDEX, etc).
  • indexkind: friendly name translated by ev language file of the type of media on this screen (Episodes, movies, titles, tv shows, etc).
  • indexurl: yamj encoded filename of the data without .xml (only works with indexes). for example Set_my set_1.xml returns Set_my set_1
  • totaltiles: the number of items in a segment
  • pagecurrent: the current page per segment settings the user's cursor is at in a segment
  • pagetotal: the total number of pages per segment settings in the segment.
  • curpos: the tile# the user is on
  • evversion: The Eversion major verison number (0.2.2)
  • evrversion: the revision number (R0001)
  • yamjversion: the yamj major version (2.5 Snapshot) that made the jukebox.
  • yamjrversion: the yamj minor version (R2500) that made the jukebox.
  • jbtimestamp: the timestamp of the last jukebox update by yamj
  • model: model name of the hardware player
  • firmware: firmware version of the hardware player
  • hardwareid: the hardwareid of the player (same as macaddress on syabas units)
  • macaddress: same as hardwareid, the macaddress without :: of the player
  • eskinname: from load.eskin, the name of the eskin
  • eskinversion: from load.eskin, the version of the eskin
  • eskinhomepage: from load.eskin, the homepage of the eskin
  • artworkscanner: returns YES or NO if the alpha artwork scanner version of YAMJ is being used.

Eversion Language/prompts

  • Prefix: %
  • Example: [:%season:]

List:

  • XML node names from the Eversion language files (located in interface/eversion/settings/)

Eversion Settings

  • Prefix: *
  • Example: [:*overscan:]

List:

  • XML node names from the Eversion settings (located in interface/eversion/settings/)

Eskin Settings

  • Prefix: #
  • Example: [:#indexINDEX:]

List:

  • XML node names from your settings

Eskin Language/prompts

  • Prefix: $
  • Example: [:$season:]

List:

  • XML node names from your language file

Jukebox Data

You can direct call anything in the YAMJ xml files by using the xml node name. For example,

  • Prefix: NONE
  • Example: [:fulltitle:]

List:

You can direct call any xml setting by using just the exactly matching XML node name. For example, mjbVersion will return the yamj major version that made the xml file. In some cases you need more processing, see below for these.

ARTWORK VARIABLES:

Eversion is starting to support the new Artwork scanner version of YAMJ. We strongly recommend you use our special variables now so your ready.

Special Variables:

  • action: When on an index, returns the screen action of index or detail for that particular title.
  • file: the same as baseFilename, used for consistency between xml and control files for eversion automatic navigation.
  • poster, thumbnail, banner, fanart: the url to the image if any. It returns unknown if there is a dummy image being used for custom dummy artwork.
  • mtype: returns TVSET, MOVIESET, TV or MOVIE.
  • genres, actors, writers, directors: returns comma separated list of these. Use the # modifier to limit how many are returned. Directors have legacy jukebox support and do support multiple-directors if available in the xml or the old way of saving just 1.
  • fulltitle: title expanded to include season # or specials in the name for tv shows. Movies return the same as title. (recommended for index usage)
  • smarttitle: title reduced to show only season # or specials instead of title if available. otherwise normal title is returned. (recommended for movieset/tvset usage).
  • fullseason: same as smarttitle except movie title and tv show without a season is blank. Useful for navigation bars/where you are located in the jukebox.
  • genres,actors,writers,directors: returns comma separated list of type. use ,# modifier to limit.
  • smartoutline: returns the outline or plot, whichever comes first
  • smartplot: returns the plot or outline, whichever is found first.
  • score,score10: movie rating divided by 10.
  • score5: movie rating divided by 20 (for 5 star ratings)
  • scoreyamj: html math of round(rating/10)*10 used by html skins for their star artwork.
  • smartcontainer: attempts to take YAMJ mediainfo data and make it a simple short what container it is (mkv for Matroska for example)
  • smartvideocodec: Attempts to filter down the YAMJ video codec info to something good to show the user or use in a filename
  • smartaudiocodec: same as video but with the audio codec.
  • smartchannels: returns the first auto track in a text friendly 2, 2.1, 5.1, etc format.
  • smartaspect: html skin math for aspect outputted in text friendly 2.35:1 format
  • aspectyamj: html skin math for aspect outputted in html icon filename 235 format.
  • smartres: determines type of video from resolution, can return 3D720, 3D1080, HD720, HD1080,HD4:3,SD. We cannot tell 3D on interleaved formats, the 3d are SBS and TB end user friendly readouts. (use filesafe or yamjfilename for images)
  • isextras: YES/NO if there are extras with the file.
  • issubtitles: returns UNKNOWN if there are no subtitles
  • setorder: returns the order # of the set. Warning if a jukebox boxset doesn't have a set order you'll get unexpected results.

Special Purtiy flag Variables:

Special Episode Variables:

  • season: the season of the episode
  • episode: the episode number
  • title: episode title
  • plot: episode plot
  • videoimage: url to videoimage.
  • videoimageurl: (R0141) url yamj found the videoimage at. UNKNOWN=dummy image in use
  • watched: true/false if the episode is viewed per yamj
  • playname: the name of the video that will appear in the player if you played it
  • aired: date the episode aired originally on tv
  • smartplot,outline,smartoutline: same as plot, episodes don't have multiple
  • url: play url to the video (preprocessing/mounted)
  • newpart: true if first part of a multi-episode file. (disc rips parts may not be in order so be careful with special combined visual tiles)
⚠️ **GitHub.com Fallback** ⚠️