INTERACT FORUM
More => Old Versions => JRiver Media Center 30 for Windows => Topic started by: lepa on January 31, 2023, 11:25:03 am
-
Continuing how to series. This one is discussed in many old threads already but those old discussions are sometimes hard to find as the title might be misleading topic burdened with old MC release or the actual discussion have lots of off topic messages to make it hard to follow. But anyway....
Custom Tooltips Per Media Type
1. Go to: Options -> Library & Folders -> ... Manage Library Fields...
2. Create library field: "Tooltip" and set it to Calculated Field
MC will use this field to display file's tooltip. Group tooltips are not customizable.
Note: Technically you can enter your rules for different categories right into Tooltip field but it is more convenient to maintain rules by splitting the rule sets to logical parts (fields) so insert following string as an expression for Tooltip
FirstNotEmpty([Tooltip - Audio], [Tooltip - Movie], [Tooltip - TV Show])
This will select first tooltip rule (field) which is matching the file for which tooltip is shown. You can of course create more different rules (fields) but for this example I limited it to these three.
Now we can create actual rule/display fields for Tooltip.
3. Create Library Field: "Tooltip - Audio" and set it to Calculated data
Insert expression for it which limits the candidates for this templates to Media Type = Audio. If file is not Audio then this expression is skipped
If(IsEqual([Media Type],Audio,1),
<font color="#3399ff"><b>Artist<//b><//font>
[Artist]
<font color="#3399ff"><b>Name<//b><//font>
[Name] /([Duration]/)
<font color="#3399ff"><b>If(!IsEmpty(Composer),Composer<//b><//font>
Replace([Composer],;,/ /// ),)
<font color="#3399ff"><b>Album<//b><//font>
[Album] If(!IsEmpty([Date]),/([Date (Year)]/),)
<font color="#3399ff"><b>Last Played<//b><//font> If([Last Played],<br>/ CompareDates([Last Played,0], Now()) ago, Never)
<font color="#3399ff"><b>Filename<//b><//font>
[Filename]/
,)
4. Create Library Field: "Tooltip - Movie" and set it to be Calculated data
Insert expression for it which limits the candidates for this templates to Media Sub Type = Movie. (example tooltip template inside the rule)
If(IsEqual([Media Sub Type],Movie,1),
<font size="200"><b>[Name]<//b><//font>
<font size="130">[Date (Year)]/
/ FormatNumber(Math([Duration,0]/60)) min/
If([mpaa rating],/ [mpaa rating],)/
/ <font color="#CCEE11">★<//font> FirstNotEmpty([imdb rating],
[tmdb rating],
ListItem(RemoveLeft([critic rating],5),0,/ // ))/
If([Rotten Tomatoes],/ <font color="#AA2200">⬤<//font> [rotten tomatoes],)/
/ Ends at FormatDate(Math(Replace(Now(),/,,.) + (Replace([Duration,0],/,,.)/86400)),HH:mm)<//font>
<font valign="Top">Video RemoveLeft(ListItem([Compression],0,/,),18)<//font>
<font valign="Bottom">Audio RemoveRight(RemoveLeft(ListItem([Compression],1,/,),6),1)<//font>/
If([Tag line],<br><br>[Tag line],)
[Description]
If([Genre],Genre <b>Replace([Genre],;,/,/ )<//b>,)
If([Director],Director <b>[Director]<//b>,)
If([Screenwriter],Writers <b>ListFormat([Screenwriter],2)<//b>,)
If([Actors],Stars <b>ListFormat(ListLimit([Actors],6),2)<//b>,)
[Filename]/
,)
5. Create Library Field: "Tooltip - TV Show" and set it to be Calculated data
Insert expression for it which limits the candidates for this templates to Media Sub Type = TV Show. (example tooltip template inside the rule)
If(IsEqual([Media Sub Type],TV Show,1),
<font Size="200"><b>[Series]<//b><//font>
Season PadNumber([Season],2)/
/ Episode PadNumber([Episode],2)/
/ FormatNumber(Math([Duration,0]/60)) min/
/ <font color="#CCEE11">★<//font> FirstNotEmpty([imdb rating],
[tmdb rating],
ListItem(RemoveLeft([critic rating],5),0,/ // ))
<font size="120">[Name]<//font>
[Description]
Stars ListFormat(ListLimit([Actors],6),2)
[Filename]/
,)
Now you should have different tooltips for Audio, Movies and TV Shows. Examples are just simple expressions to introduce the system. Now head e.g. to zybex's thread to see more comprehensive tooltip example(s) and perhaps also share your own creations.
LINKS:
zybex thread to collect tooltip examples. Use it to show case your custom tooltips templates (https://yabb.jriver.com/interact/index.php/topic,119874.0.html)
REF:
Old discussion about tooltip customization (https://yabb.jriver.com/interact/index.php/topic,99227.0.html)
Customize tooltips (mostly about theaterview customization) (https://yabb.jriver.com/interact/index.php/topic,119385.0.html)
-
reserved
-
Thanks, lepa!
-
You also should say that the fields for [Tooltip .....
should be hidden and also from type "without input". I have noticed that otherwise the script code is not executed correctly.