INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Wrapping thumbnail text that's too long  (Read 3935 times)

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Wrapping thumbnail text that's too long
« on: June 29, 2016, 09:14:31 am »

I've been working on this problem.  You know, in Standard View, when your album name (or other) is too long and the thumbnail text only shows part of it and cuts off the rest?

I think I have a working solution for wrapping fields to multiple lines.  It's not pretty and requires some work, but it does seem to work.  The attached screen shot shows how I'm doing this with [Album Artist (auto)] and [Album] .  Notice that it's only using the number of lines necessary.

Currently I have it configured to display up to 2 lines for [Album Artist (auto)] and 3 lines for [Album].  This could be extended, but this is as far as I want to go with it right now.  The number of characters it breaks at is user configurable.  But it's manual.  You have to figure out how many characters (max) per line that you want to show and then put that into an expression.  It does NOT auto size based on anything.  It's manual.  In the screen shot, it's wrapped at 28 characters, which seems right for my particular setup.

If there's interest I could write up how I did this.

Brian.
Logged

phalanthus

  • Galactic Citizen
  • ****
  • Posts: 461
Re: Wrapping thumbnail text that's too long
« Reply #1 on: June 29, 2016, 09:50:26 am »

 ;D

definitely interested
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Wrapping thumbnail text that's too long
« Reply #2 on: June 29, 2016, 11:14:21 am »

I'll explain it from the top down and then tell you how to construct the fields and thumbnail text.

The whole idea of this is to build new fields for each line we want to display.  For example, for the lines to represent the Album, I built 3 new fields, asl1, asl2, and asl3.  Each are calculated fields that break up the [Album] field into pieces.  Up to 3 pieces, one per field.

Then we'll build a thumbnail expression which contains asl1, asl2, asl3 and our album artist fields also.

Here are the various fields I have constructed.  They are all string type fields with calculated data:

asreg:  This controls the number of characters used to split the fields into multiple lines.  Because of the regex, it splits on word boundaries at, or under the number specified.  Change the two "28" below to whatever number of characters you want to split your lines at.
Code: [Select]
/#^(.{1,28})(\s(.{1,28}))?(\s(.+))?$#/
asl1:  This and the next two are the 3 lines that [Album] are broken into.
Code: [Select]
Regex([Album],[asreg],-1,0)[R1]
asl2:
Code: [Select]
Regex([Album],[asreg],-1,0)[R2]
asl3:
Code: [Select]
Regex([Album],[asreg],-1,0)[R4]
aaal1:  This and the next one are the two lines that [Album Artist (auto)] are broken into.
Code: [Select]
Regex([Album Artist (auto)],[asreg],-1,0)[R1]
aaal2:
Code: [Select]
Regex([Album Artist (auto)],[asreg],-1,0)[R2]
Now that we have all of our custom fields defined, we need to customize the thumbnail text using these lines.  Here's a simple one that I'm using in the screen shot:

Code: [Select]
listbuild(1,/#
#/,[aaal1],[aaal2])
listbuild(1,/#
#/,[asl1],[asl2],[asl3])

That expression has two embedded newlines in it.  So you probably want to copy and paste it directly.  The newlines make the expression display each field on a different line.

That should be all you need to get started.  This technique can be extended to other large fields if you like.

Brian.
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Wrapping thumbnail text that's too long
« Reply #3 on: June 29, 2016, 11:31:03 am »


Nice.

Any suggestions how to do something similar in TheaterView Playing Now?

Currently it defaults to (as I recall) "Title ° Album Name ° Artists List" which often is too long to display on one line...


Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Wrapping thumbnail text that's too long
« Reply #4 on: June 29, 2016, 11:33:56 am »

Thanks mate!  This is beautiful
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Wrapping thumbnail text that's too long
« Reply #5 on: June 29, 2016, 12:13:08 pm »

Any suggestions how to do something similar in TheaterView Playing Now?

I currently only use the Mac version of MC, which doesn't have Theater View.  I've played around with Theater View for maybe 30 minutes total, so I'm not very experienced with it yet.

Brian.
Logged

phalanthus

  • Galactic Citizen
  • ****
  • Posts: 461
Re: Wrapping thumbnail text that's too long
« Reply #6 on: July 08, 2016, 04:01:37 am »

 ;D

hello all at JRiver from the chilly bottom part of our lovely little planet

have you ever considered this as a standard Media Center feature ??

if this is a stupid question or answered elsewhere i apologise

Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Wrapping thumbnail text that's too long
« Reply #7 on: July 08, 2016, 06:29:09 am »

That's great.
However I feel that this should be a standard option in JRiver.
Logged
Pages: [1]   Go Up