MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins » Hot Plugins » My TVSeries


My TVSeries MediaPortal MyTV-Series plugin

Reply
 
Thread Tools Display Modes
Old 2007-04-12, 19:57   #1 (permalink)
Portal Designer
 
Inker's Avatar
 
Join Date: Dec 2004
Posts: 1,550
Thanks: 34
Thanked 133 Times in 57 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 14:44.
Inker is offline   Reply With Quote
Old 2007-04-13, 14:32   #2 (permalink)
Portal Designer
 
Inker's Avatar
 
Join Date: Dec 2004
Posts: 1,550
Thanks: 34
Thanked 133 Times in 57 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 12:50.
Inker is offline   Reply With Quote
Old 2007-04-17, 00:47   #3 (permalink)
MP Donator
 
Sh4nn0w's Avatar
 
Join Date: Sep 2006
Location: Hook, Hampshire
Age: 28
Posts: 213
Thanks: 17
Thanked 6 Times in 6 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
__________________
Desktop:
Intel Core 2 Duo E6750 | Patriot 4GB PC2-6400 | Gigabyte GA-P35-DS3R | BFG GeForce 8800 GTS OC 512MB
2x WD Caviar WD5000AAKS 500GB | Pioneer DVR-109 DVD±RW
Antec P160 Case | Seasonic S12 430W PSU | Samsung SM-226BW
Media Server:
Intel Pentium Dual Core E2180 | 2GB Kingston PC2-5300 | Gigabyte GA-G33-DS3R | Pinnacle 3010iX TV Tuner |
2x Icy Dock MB-454SPF | 2x WD5000AAKS 500GB | 4x WD10EACS 1TB
Cooler Master Centurion 590 | Seasonic M12 600W PSU
Sh4nn0w is offline   Reply With Quote
Old 2007-06-08, 19:51   #4 (permalink)
Portal Member
 
Join Date: Apr 2007
Age: 25
Posts: 19
Thanks: 0
Thanked 7 Times in 6 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, 22:26   #5 (permalink)
Portal Member
 
Join Date: Feb 2007
Location: Im Harz
Age: 26
Posts: 33
Thanks: 12
Thanked 1 Time in 1 Post

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, 17:22   #6 (permalink)
Portal Member
 
Join Date: Aug 2005
Location: B
Posts: 70
Thanks: 4
Thanked 0 Times in 0 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 17:28.
Vergo is offline   Reply With Quote
Old 2007-12-16, 02:06   #7 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts


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
Old 2008-02-05, 05: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, 21:02   #9 (permalink)
Portal Member
 
spuck's Avatar
 
Join Date: Apr 2007
Location: north pole
Age: 20
Posts: 274
Thanks: 12
Thanked 37 Times in 21 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
__________________
Rate and download MP-TVSeries FanArt here. Get Fan Art from TheTVDB.com instead.

Last edited by spuck; 2008-03-14 at 21:12.
spuck is offline   Reply With Quote
Old 2008-03-29, 03:49   #10 (permalink)
Portal Member
 
z3us's Avatar
 
Join Date: Dec 2007
Posts: 186
Thanks: 29
Thanked 3 Times in 3 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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default expressions/double episodes Vergo My TVSeries 31 2008-09-01 09:32
Regular Expressions question johnslayer MediaPortal 1 Talk 2 2006-07-02 18:26


All times are GMT +1. The time now is 10:26.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress