| | #1 (permalink) |
| Portal Designer | 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> 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>
__________________ There are only two industries that refer to their customers as "users". - Edward Tufte Last edited by Inker; 2007-04-13 at 15:44. |
| | |
| | #2 (permalink) |
| Portal Designer | 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. |
| | |
| | #3 (permalink) |
| MP Donator ![]() Join Date: Sep 2006 Location: Hook, Hampshire Age: 29
Posts: 253
Thanks: 30
Thanked 6 Times in 6 Posts
Country: | 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
__________________ TV/Media Server: Intel 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 |
| | |
| | #4 (permalink) |
| Portal Member Join Date: Apr 2007 Age: 26
Posts: 19
Thanks: 0
Thanked 7 Times in 6 Posts
Country: | 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>[^\\]*)
|
| | |
| | #5 (permalink) |
| Portal Member Join Date: Feb 2007 Location: Im Harz Age: 26
Posts: 50
Thanks: 12
Thanked 9 Times in 2 Posts
Country: | 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 ![]() |
| | |
| | #6 (permalink) |
| Portal Member | 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. |
| | |
| | #7 (permalink) |
| Portal Member Join Date: Dec 2007
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
| 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})
|
| | |
| | #8 (permalink) |
| Portal User Join Date: Feb 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | 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 .,'!&$]*)\.
|
| | |
| | #9 (permalink) |
| Portal Member Join Date: Apr 2007 Location: north pole Age: 21
Posts: 356
Thanks: 13
Thanked 54 Times in 32 Posts
Country: | 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 Skin Variable: #TVSeries.Series.myRatingPath Code: <Enabled>1<Format><Series.myRatingPath><FormatAs>tvseries\star<Series.myRating>.png Skin Variable: #TVSeries.Episode.RatingPath Code: <Enabled>1<Format><Episode.RatingPath><FormatAs>tvseries\starEval(Round(Abs(<Episode.Rating>))).png 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. http://forum.team-mediaportal.com/streamedmp-301/ Last edited by spuck; 2008-03-14 at 22:12. |
| | |
| | #10 (permalink) |
| Portal Member Join Date: Dec 2007
Posts: 343
Thanks: 64
Thanked 11 Times in 11 Posts
Country: | 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;-;;-;=;-;;-; |
| | |
![]() |
| Bookmarks |
| Tags |
| exchange, expressions or rules |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Default expressions/double episodes | Vergo | My TVSeries | 36 | 2008-11-08 03:43 |
| Regular Expressions question | johnslayer | MediaPortal 1 Talk | 2 | 2006-07-02 19:26 |