MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » Community Skins and Plugins » MediaPortal Plugins » Popular Plugins » Maintained Plugins » My TVSeries


Reply
 
LinkBack Thread Tools Display Modes
Old 2007-04-12, 20:57   #1 (permalink)
Retired Team Member
 
Inker's Avatar
 
Join Date: Dec 2004
Posts: 1,667
Thanks: 46
Thanked 149 Times in 65 Posts

My System

Lightbulb Expressions/Rules exchange

Please use this thread to share your generated logo rules and parsing expressions that you think might be useful for other users. Please do not reply with requests and any other small talk ;-) Stay on topic. Questions/discussussions pls into the request thread.

To copy a Parsing expression, select it in configuration and hit Ctrl+C. Then paste it between the [code] tag in the template.
To copy a Logo Rule, bring up its configuration and click "Copy". All nesessary info is now in your clipboard. Paste it between the [code] tag in the template. This only works for versions dated 2007-04-13 and up.

To paste a Parsing Expression Copy it (Ctrl+C) and paste it into a new entry field in your configuration (Ctrl+V) and make sure you select the correct type (Simple/Regex).
To paste a Logo Rule, copy everything between the Code tags in the template (Ctrl+C), Click Add Rule and click Paste. You might want to/have to change the path to the filename. Then save the result. This only works for versions dated 2007-04-13 and up.

For everyones convinience I suggest everybody use this template:

Template for Parsing expressions:

Type: Parsing - simple/Regex
<TITLE>
Description:
<describe in a few words what the goal is/was and maybe its limitations>
Expression:
Code:
<add the parsing expression here>
Template for Parsing expressions:

Type: Logo Rule
<TITLE>
Description:
<describe in a few words what the goal is/was and maybe its limitations>
Expected Filename: static/dynamic
<give an example filename if dynamic, or the static filename expected>
Rule:
Code:
<add the copied rule here>
Let's help each other out :-)
__________________

There are only two industries that refer to their customers as "users".
- Edward Tufte

Last edited by Inker; 2007-04-13 at 15:44..
Inker is offline   Reply With Quote
Old 2007-04-13, 15:32   #2 (permalink)
Retired Team Member
 
Inker's Avatar
 
Join Date: Dec 2004
Posts: 1,667
Thanks: 46
Thanked 149 Times in 65 Posts

My System

Default

OK, to get us started, and maybe to show you some real life examples (I know it isn't documented very well) let me start off.

Type: Logo Rule
Episode Images
Description:
Display a manually downloaded/created episode image. The Image should be in the banners/Seriesname folder (where your banners reside) and in the format SeasonxEpisode.jpg.
Expected Filename: dynamic
plugins\windows\banners\Lost/3x1.jpg
Rule:
Code:
plugins\windows\banners\<Series.Pretty_Name>\<Episode.SeasonIndex>x<Episode.EpisodeIndex>.jpg;-;;-;=;-;;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
Network (Channel) Logo
Description:
Display an Network (Channel) Logo.
Expected Filename: dynamic
Plugins\Windows\Logos\Networks\abc.png
Rule:
Code:
Plugins\Windows\Logos\Networks\<Series.Network>.png;-;;-;=;-;;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
HD 720p
Description:
Display a Logo for files with a dimension of 1280x720 (HD 720p)
Expected Filename: static
Plugins\Windows\Logos\hd_720p_logo.png
Rule:
Code:
Plugins\Windows\Logos\hd_720p_logo.png;-;<Episode.videoWidth>;-;=;-;1280;-;AND;-;<Episode.videoHeight>;-;=;-;720;-;AND;-;;-;=;-;;-;
*************************************************


Type: Logo Rule
Surround Sound Logo
Description:
Display a surround sound logo for files with more than (or equal) 5 Audio channels (surround).
Expected Filename: static
Plugins\Windows\Logos\dolby_logo.png
Rule:
Code:
Plugins\Windows\Logos\dolby_logo.png;-;<Episode.AudioChannels>;-;>=;-;5;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
Video Codec
Description:
Display a logo depending on the Video Codec for a given file.
Note that some codecs are parsed not in their "friendly" name. Check the Episode Details in the Configuration to find out what a codec parses as.
Examples:
DivX: divx
XVID: xvid
H264: V_MPEG4_ISO_AVC
Expected Filename: dynamic
Plugins\Windows\Logos\logo_V_MPEG4_ISO_AVC.png
Rule:
Code:
Plugins\Windows\Logos\logo_<Episode.VideoCodec>.png;-;;-;=;-;;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
Audio Codec
Description:
Display a logo depending on the Audio Codec for a given file.
Note that some codecs are parsed not in their "friendly" name. Check the Episode Details in the Configuration to find out what a codec parses as.
Examples:
MP3: MPEG-1A L3
AC3: A_AC3
Expected Filename: dynamic
Plugins\Windows\Logos\logo_MPEG-1A L3.png
Rule:
Code:
Plugins\Windows\Logos\logo_<Episode.AudioCodec>.png;-;;-;=;-;;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
16:9 Logo
Description:
Display a logo for files in 16:9 (Widescreen) Aspect Ratio. Values from 1.7 - 1.85 are accepted.
Expected Filename: static
Plugins\Windows\Logos\logo_16-9.png
Rule:
Code:
Plugins\Windows\Logos\logo_16-9.png;-;<Episode.VideoAspectRatio>;-;>;-;1.7;-;AND;-;<Episode.VideoAspectRatio>;-;<;-;1.85;-;AND;-;;-;=;-;;-;
*************************************************

Type: Logo Rule
4:3 Logo
Description:
Display a logo for files in 4:3 (Fullscreen) Aspect Ratio. Values from 1.3 - 1.5 are accepted.
Expected Filename: static
Plugins\Windows\Logos\logo_16-9.png
Rule:
Code:
Plugins\Windows\Logos\logo_4-3.png;-;<Episode.VideoAspectRatio>;-;>;-;1.3;-;AND;-;<Episode.VideoAspectRatio>;-;<;-;1.5;-;AND;-;;-;=;-;;-;
__________________

There are only two industries that refer to their customers as "users".
- Edward Tufte

Last edited by Inker; 2007-05-05 at 13:50..
Inker is offline   Reply With Quote
Old 2007-04-17, 01:47   #3 (permalink)
MP Donator
 
Sh4nn0w's Avatar
 
Join Date: Sep 2006
Location: Hampshire
Age: 30
Posts: 298
Thanks: 55
Thanked 7 Times in 7 Posts

Country:

My System

Default

For anyone doing dynamic logos, i've come across the following so far:

*************************************************
Type: Logo Rule
Video Codec


Other Divx Variations:
DIV3
DX50

*************************************************
Type: Logo Rule
Audio Codec


AC3 is also sometimes just identified as AC3 not A_AC3

*************************************************

Just duplicate as instructed & change filename to alternative
__________________
HTPC:
Vista x86 | Intel E7300 | GeIL 2GB PC2-6400C4 | GA-G31M-S2L | Sapphire HD 4550 512M | WD6400AAKS 640GB | Kworld DVB-T 399U
Moneual 301 | Antec NeoHE 430W
Server:
WHS | Intel E2180 | 2GB PC2-5300 | Gigabyte GA-G33-DS3R | 2x Icy Dock MB-454SPF | 2x WD5000AAKS 500GB | 5x WD10EACS 1TB | Cooler Master Centurion 590 | Seasonic M12 600W PSU
Sh4nn0w is offline   Reply With Quote
Old 2007-06-08, 20:51   #4 (permalink)
Portal Member
 
Join Date: Apr 2007
Age: 27
Posts: 25
Thanks: 0
Thanked 9 Times in 8 Posts

Country:


Default

For anyone that needs to get double episodes

Type: Parsing - Regex
Description:
Had a lot of downloaded files with their original file such as
[DB]_Bleach_50_[23A18CB4].avi
[DB]_Bleach_52-53_[069BE2EB].avi
[DB]_Bleach_63_Special_[C70774F3].avi
[DB]_Bleach_75-76_Special_[31E39A56].avi

This expression will always return the series and episode and extension, if episode2 exists then it will also return it.

Expression:
Code:
\[DB\]_(?<series>[^_]*?)_(?<episode>[0-9]{1,3})(-(?<episode2>[0-9]{1,3}))?[\w\[\]]*.(?<ext>[^\\]*)
JonJon is offline   Reply With Quote
Old 2007-06-23, 23:26   #5 (permalink)
Portal Member
 
Join Date: Feb 2007
Location: Im Harz
Age: 27
Posts: 81
Thanks: 20
Thanked 19 Times in 5 Posts

Country:


Lightbulb Just my two cents...

You can find the logos used in these rules over at: this thread...

Following rules will show the:
- favorite logo
- genre logo
- runtime logs

************************************************************
Type: Logo Rule
Favorite Show
Description:
Display a favorite logo for shows you marked as favorites from within the tv-series plugin.
Expected Filename: static
Thumbs\MPTVSeriesBanners\!logos\Favorite.png
Rule:
Code:
Thumbs\MPTVSeriesBanners\!logos\Favorite.png;-;<Series.isFavourite>;-;=;-;1;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
************************************************************
Type: Logo Rule
Genre
Description:
Display a logo for a show according to it's genre on thetvdb.com.
Expected Filename: static
Thumbs\MPTVSeriesBanners\!logos\Adventure.png
Rule:
Code:
Thumbs\MPTVSeriesBanners\!logos\Adventure.png;-;<Series.Genre>;-;contains;-;adventure;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
************************************************************
Type: Logo Rule
Runtime (i.e.: approx. 20min playtime)
Description:
Display a 1/3 filled clock logo when the runtime for an episode is just below 25mins or 1500000millisecs (don't believe me? ask google ).
Expected Filename: static
Thumbs\MPTVSeriesBanners\!logos\20min.png
Rule:
Code:
Thumbs\MPTVSeriesBanners\!logos\20min.png;-;<Episode.localPlaytime>;-;<;-;1500000;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;

bye,
Anthrax

PS: the runtime stuff is object to heavy tweaking - this was just a glimpse hint on how it could be done
Anthrax is offline   Reply With Quote
Old 2007-06-27, 18:22   #6 (permalink)
Portal Member
 
Join Date: Aug 2005
Location: Brugge
Posts: 162
Thanks: 13
Thanked 59 Times in 19 Posts

Country:

My System

Default WS

Type: Logo Rule
16:9 Logo
Description:
This is in my humble opinion the best way to get this right. Since every 4:3 has 1.33 as aspect ratio, all others are widescreen
Expected Filename: static
169 wide black
Rule:
Code:
Plugins\Windows\Logos\169 wide black.png;-;<Episode.VideoAspectRatio>;-;!=;-;1.333;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;

Last edited by Vergo; 2007-06-27 at 18:28..
Vergo is offline   Reply With Quote
Old 2007-12-16, 03:06   #7 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 29
Thanks: 2
Thanked 1 Time in 1 Post


Default

Template for Parsing expressions:

Type: Parsing - Regex
Band of Brothers
Description:
For files labeled as "Ep01", such as Band.of.Brothers.Ep05.2001.720p.HDDVD.DTS.x264-ESiR.mkv
However, you will have to set a simple expression to replace "x264" with <empty> before matching. Also, make sure that the files are in a folder under "season 1"

Expression:
Code:
(?<season>[0-9])[\\](?<series>[\w.]*)\.Ep(?<episode>[0-9]*)(?:[-.\w])*\.(?<ext>[^\\]{0,3})
quanfer is offline   Reply With Quote
These User Thank You:
Old 2008-02-05, 06:50   #8 (permalink)
Portal User
 
Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

Type: Parsing - Regex

Description:
made for me by Karyudo for files named like this "Z:\TV Shows\Entourage\Season 1\104 - Date Night.avi"
the 1 in the filename meaning season 1 and 04 the episode number.
works great so long as your files are exactly like this.

Expression:

Code:
(?<series>[\w .,'!&$]*)\\[\w\s0-9]*\\(?<season>[0-9]{1})(?<episode>[0-9]{2}).{3}(?<title>[\w .,'!&$]*)\.
mascot4hire is offline   Reply With Quote
Old 2008-03-14, 22:02   #9 (permalink)
Community Skin Designer
 
spuck's Avatar
 
Join Date: Apr 2007
Location: north pole
Age: 22
Posts: 387
Thanks: 14
Thanked 58 Times in 35 Posts

Country:

My System

Default

Here are a few of my formatting rules that I use in the Aeon skin port.

Type: Formatting Rule
VIDEOFILE INFORMATION
Result: 1280x720 (1,78) 23,976fps

Rule:
Skin Variable: #TVSeries.Episode.InfoPanelLine1Value
Code:
<Enabled>1<Format><Episode.InfoPanelLine1Value><FormatAs><Episode.videoWidth>x<Episode.videoHeight> (Eval(Round(<Episode.VideoAspectRatio>*100)/100)) Eval(Round(<Episode.VideoFrameRate>*1000)/1000)fps


Type: Formatting Rule
CODEC/BITRATE INFORMATION
Result: (H264) 5,9 Mbps, (AC3) 384 Kbps

Rule:
Skin Variable: #TVSeries.Episode.InfoPanelLine2Value
Code:
<Enabled>1<Format><Episode.InfoPanelLine2Value><FormatAs>(<Episode.VideoCodec>) Eval(Round(PrettyBytes1000(<Episode.VideoBitrate>)*10)/10-> | Kbps| Mbps| Gbps), (<Episode.AudioCodec>) Eval(Round(PrettyBytes1000(<Episode.AudioBitrate>)*10)/10-> | Kbps| Mbps| Gbps)


Type: Formatting Rule
VIDEO/CODEC/BITRATE CRAP CLEANUP
Result: Result will be empty. Note: You can make it say whatever.
Description:
If the file that is highlighted doesn't exist some crap will still be displayed. These Rules will remove it completely. Or maybe write some text saying the file is not present.

Rule:
Code:
<Enabled>1<Format>x () fps<FormatAs> 
<Enabled>1<Format>() , ()<FormatAs>


Type: Formatting Rule
RATING STARS
Result: "tvseries\star0.png" -> "tvseries\star10.png"
Description: You can use full paths as well but this way the stars are always in "[your skin]\Media\tvseries\" folder. Be sure to put the star pngs in that folder. "tvseries\star.png" can be used to display 10 empty stars when it's not rated yet, looks a lot better IMO.

Rule: (My Episode Rating)
Skin Variable: #TVSeries.Episode.myRatingPath
Code:
<Enabled>1<Format><Episode.myRatingPath><FormatAs>tvseries\star<Episode.myRating>.png
Rule: (My Series Rating)
Skin Variable: #TVSeries.Series.myRatingPath
Code:
<Enabled>1<Format><Series.myRatingPath><FormatAs>tvseries\star<Series.myRating>.png
Rule: (TVDB Episode Rating)
Skin Variable: #TVSeries.Episode.RatingPath
Code:
<Enabled>1<Format><Episode.RatingPath><FormatAs>tvseries\starEval(Round(Abs(<Episode.Rating>))).png
Rule: (TVDB Series Rating)
Skin Variable: #TVSeries.Series.RatingPath
Code:
<Enabled>1<Format><Series.RatingPath><FormatAs>tvseries\starEval(Round(Abs(<Series.Rating>))).png

Last edited by spuck; 2008-03-14 at 22:12..
spuck is offline   Reply With Quote
Old 2008-03-29, 04:49   #10 (permalink)
Portal Member
 
z3us's Avatar
 
Join Date: Dec 2007
Posts: 535
Thanks: 92
Thanked 19 Times in 19 Posts

Country:


Default

Type: Logo Rule
EPISODE IN DVD
Description:
Shows a DVD logo if the episode file is stored in a DVD. You should have added it to the DB in the DVD and u should change "e:\" for the letter of your DVD unit
Expected Filename: static/dynamic
thumbs\TVseries\DVD.png
Rule:
Code:
thumbs\TVseries\DVD.png;-;<Episode.EpisodeFilename>;-;contains;-;e:\;-;AND;-;;-;=;-;;-;AND;-;;-;=;-;;-;
z3us is offline   Reply With Quote
Reply

Bookmarks

Tags
exchange, expressions or rules

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default expressions/double episodes Vergo My TVSeries 37 2009-03-11 22:15
Regular Expressions question johnslayer MediaPortal 1 Talk 2 2006-07-02 19:26


All times are GMT +1. The time now is 01:27.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden