Jump to content

Honor newline/carriage returns in Overviews on clients


TrackZ

Recommended Posts

The meta data pages let you separate text in the Overview with carriage returns; however, on the clients, the Overview text is pushed together into one continuous line/paragraph.

  • Like 1
Link to comment
Share on other sites

Do you mean \r? Or \r\n? Or just a bare \n? Usually a newline is respected. A carriage return may not be in most software.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Link to comment
Share on other sites

I'm not sure on the actual coded representation. Whatever MB logs in the Server when you use the Enter key on your keyboard when editing the Overview.

 

I did find that MBT and the iPad app display the carriage returns. The web client though did not.

Link to comment
Share on other sites

  • 6 years later...
rbjtech

Has anybody found a solution to this problem ?

I can't get the 'overview' metadata field to recognise any form of newline.

I'd like to use this as part of my crossover episode script (which auto generates the nfo) to list the episodes in the crossovers - but currently it's not recognising html tags, css or any \n?

So as an example below - I've used an asterisk to separate for the moment, but ideally I'd like to have each member of the crossover on a new line... 

Capture.thumb.PNG.f1a3e510749ffea8ebdc615722858cbb.PNG

Link to comment
Share on other sites

PenkethBoy

only for a browser via css - needs a hard return in the text

/*---- Item Detail - Overview line break----*/
 div.overview-side-text  {white-space: pre-wrap;}

there was talk of getting html tags recognised by Android etc but that appears to have died off - too difficult apparently

  • Thanks 1
Link to comment
Share on other sites

  • 2 years later...
GreatFlashMan

Thanks for pointing me to this @ebrI searched and my computer does not go all the way back to 2014???????????????????

 

Seriously, I did not find this and made a mention here,

How the ACTUAL **** can this STILL be an outstanding issue after 9 bloody years? It's a fairly easy piece of formatting code for heavens sake, not something "too difficult" as mentioned above. It this is an issue that is "Too Difficult to fix", then I am mightily surprised that Emby has managed to progress this far.

Link to comment
Share on other sites

rbjtech
On 09/08/2023 at 18:59, ebr said:

All Emby apps should recognize html line breaks (<br/>) at this time.

Yep - this has been working for some time ..

Very useful when creating collections ..

Works nicely on Android and AndroidTV - not tested on other clients.

image.thumb.png.ea8e4d8d3a5b63b6ce04c3028aed6a27.png

  • Thanks 1
Link to comment
Share on other sites

GreatFlashMan
On 09/08/2023 at 18:59, ebr said:

All Emby apps should recognize html line breaks (<br/>) at this time.

That's not exactly what i mean. The scrape of data that is stored in the nfo file omits these, leaving just a standard carriage return. if html tags are supported, then perhaps the scrape from TVDB etc. should replace them if they are not resepected.

Manually editing 1000's of overview (and other) texts in any form is both a long winded and unwarranted exercise when the software could do this at point of creation.

Link to comment
Share on other sites

rbjtech
44 minutes ago, GreatFlashMan said:

That's not exactly what i mean. The scrape of data that is stored in the nfo file omits these, leaving just a standard carriage return. if html tags are supported, then perhaps the scrape from TVDB etc. should replace them if they are not resepected.

Manually editing 1000's of overview (and other) texts in any form is both a long winded and unwarranted exercise when the software could do this at point of creation.

Do you have an example of a title that has a CR in it's metadata.  I've only ever wanted it for bespoke collections and specials etc.  'Finding' a CR in a block of text is easy enough, and then replace with <br/> in the emby data and/or nfo is pretty easy to do ..

  • Like 1
Link to comment
Share on other sites

GreatFlashMan

are you saying there is no line breaks at source?

I manually added a newline at the start of this, though not the second one. Checking TVDB it is shown all in a block, but no idea if that's the website backend, or the original text?

tvshow.nfo

if it is all stripped, this appears silly and it would be wonderful to have nicely organised text.

Link to comment
Share on other sites

rbjtech
45 minutes ago, GreatFlashMan said:

are you saying there is no line breaks at source?

Possibly - that's why I'm asking - emby can't do much if the source metadata doesn't contain line breaks ;)

the web browser (I've yet to check the clients) actually honours a fair bit of html formatting .. 👍

edit - Android Standard App & Emby Theatre does :) but AndroidTV does not .. 😪 ... @ebr

<strong>bold</strong>
<h1>Headline 1</h1>
<h2>Headline 2...</h2>
<h6>..Headline 6</h6>
<em>Italics</em>
<hr> horizonal line
<p> new paragraph </p>
Normal text
<br>
Normal &nbsp Text (with Tab)

image.png.7ee6bfc860ac68ff31585b238f576c5c.png

image.png.920508ec5bddd6d8150f5b1041a52e19.png

Edited by rbjtech
Link to comment
Share on other sites

rbjtech

This may actually introduce a new way of getting Album Media Info into the Music screens in emby - as they are sorely lacking in that area ..

This is Android (looks ok, it seems to ignore Bold but that might be the screen grab from the Shield) .. the 'overview' is now used to display that data ..

image.png.18403d5701bbe6ab4107750c64ed56bb.png

Browser looks ok .. 

image.png.cc779310d1013268e0c904c0b97e372e.png

AndroidTV is a bit of a mess though (but I much prefer the look of it generally .. note how much info is missing from the Android above - album length, track length.. )  - but to be fair, I don't play music from my TV devices, it's browser or mobile (Android).

image.png.2cdd6e20d0651b1daecdf3929c8c372c.png

 

I may add into the MediaInfo plugin - to scrape the Album Folder name which contains these details ...

 

 

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

4 hours ago, rbjtech said:

Android Standard App & Emby Theatre does :) but AndroidTV does not .. 😪

That's because those other apps UI is actually rendered in html but TV is not. 

  • Thanks 1
Link to comment
Share on other sites

5 hours ago, GreatFlashMan said:

are you saying there is no line breaks at source?

In most cases I imagine that is correct. It wouldn't make sense to have hard line breaks when you don't know what container it will be shown in. 

  • Agree 1
Link to comment
Share on other sites

GreatFlashMan

TVShows meta don't appear to have returns in them as a rule (but would be wonderful if honoured if they did)

But music artists do, and like this example, it would really enhance the view in Emby.

image.thumb.png.0d4d82e3ae836515f2006ca7a61e61ce.png

rather than presented as this,

image.thumb.png.29224f694014e15cb88a29543682721d.png

 

 

 

Link to comment
Share on other sites

rbjtech

So looking at the API - emby is storing the New Line in the 'Overview' as a \n

ie in Overview -  (scroll right)

{
  "Items": [
    {
      "Name": "Tape 1, Side A",
      "ServerId": "5f9c466f4ecc4319b1d48f55e311d249",
      "Id": "3091060",
      "Overview": "As the school mourns the death of Hannah Baker, her friend Clay receives a box of tapes with messages she recorded before she committed suicide. \nTest New Line.\n\nTest New Line with Space.",
      "RunTimeTicks": 31776630000,
      "IndexNumber": 1...................................

It looks correct in the metadata editor .. 

image.png.8ce1c8b1de1ad01647e83361e16a4002.png

 but these are being ignored in the clients.

We know </br> works (HTML formatting) - so why not just interpret \n as a </br> and things will start to look much better ?

It is simple enough to just replace a \n with a </br> in the actual emby 'overview' entry itself - but probably better to do it at the client level.

Remember that the overview only has 3-5 lines visable anyway - but on Android, Web and possibly other clients, you can click on it to get a full expansion.  For Bio's and Music - I agree it looks so much better with proper line breaks and paragraph spacing ...

image.thumb.png.a34d750b1c4c85e08a60065f89e7673a.png

Edited by rbjtech
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

rbjtech

I've just added this into the MediaInfo Plugin .. haha.

It's so small it's not worth it's own code - so I've got it to just replace the item overview with the HTML formatting style.

If you reprocess all the items in MediaInfo Plugin - then it will replace them all automatically - and as new entries as the Plugin processes them ..

(Probably quicker than waiting for all the clients to be updated to acknowledge \n - if that even gets agreed ...)

I'll post an update in the MediaInfo Plugin thread shortly ... but it's working well for me.. 👍

Edited by rbjtech
Link to comment
Share on other sites

2 hours ago, rbjtech said:

 but these are being ignored in the clients.

Android TV should already respect '\n'.  In fact, that is what it converts the html breaks to since it isn't rendering html...

  • Agree 1
Link to comment
Share on other sites

rbjtech
11 minutes ago, ebr said:

Android TV should already respect '\n'.  In fact, that is what it converts the html breaks to since it isn't rendering html...

FireTV appears to respect the HTML line break ? - I believe only the shield shows the </br> instead of acting on it.

Ideally, the clients should do this - but it was just a quick code change in the MediaInfo Plugin to add it - as it's always bothered me as well ... 🤪

edit - ah, correction - so both FireTV and AndroidTV are fine with </br> - it displays nicely in all clients now.

Edited by rbjtech
Link to comment
Share on other sites

2 minutes ago, rbjtech said:

FireTV appears to respect the HTML line break ?

Yes, because it converts it to '\n'...  Therefore, converting '\n' to the html code is just causing more conversion in that particular app - but necessary for uniformity with the others.  My point was, if your source already contains '\n' new lines, then the TV app should already be respecting those.

 

  • Like 1
Link to comment
Share on other sites

rbjtech
3 minutes ago, ebr said:

Yes, because it converts it to '\n'...  Therefore, converting '\n' to the html code is just causing more conversion in that particular app - but necessary for uniformity with the others.  My point was, if your source already contains '\n' new lines, then the TV app should already be respecting those.

 

Yes - and ideally we would want to keep them as \n - but all the other clients ignore it.   If all clients worked with \n (and converted to </br> as required) - then there would be no need to edit the emby overview source.     

Low priority in the grand scheme of things, but maybe something to add to the next round of client updates if it's quick and easy .. ;) 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...