Jump to content

Is there a way to make line break in overview?


uzbek

Recommended Posts

Is there a way to make line break in overview?

 

edit: found out that "</p>" or "<p>" works

Edited by uzbek
Link to comment
Share on other sites

Actually html in overviews is not supported. If it is working then it is by accident. It won't work on all devices.

Link to comment
Share on other sites

  • 1 year later...
Happy2Play

Custom css

/*Overview line break*/
#itemDetailPage  p.overview {white-space: pre-wrap; }

normal

5b8b4d996d04b_normal.jpg

 

css

5b8b4dac6af36_break.jpg

  • Like 2
Link to comment
Share on other sites

  • 11 months later...
marcelhehle

Actually html in overviews is not supported. If it is working then it is by accident. It won't work on all devices.

 

Luke, is there an official way to add a line break?

 

I've been experimenting myself with these results:

\n ... get's written as "\n"

[CR] ... get's written as "[CR]"

<br/> ... nfo doesn't get read

<p> ... nfo doesn't get read

... get's ignored

... get's ignored

 

 

So far the best result I get with just writing the overview (<plot></plot> tag) on multiple lines into the nfo-file and then using the css from the posting above. This works great in the web frontend, but not on my IPhone or AppleTV.

 

So what is the prefered approach (or is there any)?

Link to comment
Share on other sites

marcelhehle

Weird ... I just tried one more thing:

 

If I write a <br/> into an nfo file Emby doesn't read that file. But if I add <br/> manually into the metadata editor, then I get a line break not only in the web frontened, but also on iOS and tOS.

Link to comment
Share on other sites

Weird ... I just tried one more thing:

 

If I write a
into an nfo file Emby doesn't read that file. But if I add
manually into the metadata editor, then I get a line break not only in the web frontened, but also on iOS and tOS.

 

Emby will read the nfo, just run a library scan after editing it.

Link to comment
Share on other sites

  • 10 months later...
Guest ES_218

I would like to echo a request to resolve the line break issue. <br> works correctly in the metadata editor, however <br> in an .nfo file results in the .nfo file being ignored upon a library scan or a metadata refresh. I could go through my entire library and manually add <br> with the metadata editor, but if I do a library refresh at any point in the future, all that hard work would be for nothing.

I tried the custom CSS in post #4 above, but it did not work. 

Link to comment
Share on other sites

On 7/23/2020 at 3:50 PM, ES_218 said:

I would like to echo a request to resolve the line break issue. <br> works correctly in the metadata editor, however <br> in an .nfo file results in the .nfo file being ignored upon a library scan or a metadata refresh. I could go through my entire library and manually add <br> with the metadata editor, but if I do a library refresh at any point in the future, all that hard work would be for nothing.

I tried the custom CSS in post #4 above, but it did not work. 

Do you have your nfo overview content wrapped in cdata?

Link to comment
Share on other sites

Guest ES_218

Thanks for the reply. Not sure what you mean by cdata. Below is an example of one of my files album.nfo

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <review>This a brief description of the album.

This is a second paragraph about the album. It has been separated from the above paragraph by hitting the "Enter" key twice.

This is a third paragraph.</review>
</album>

I would like to do all of my metadata editing via nfo files rather than the metadata editor in the web client. The code above imports to Emby, however the line breaks are not displayed.

The code below, however, is ignored by Emby upon library refresh

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <review>This a brief description of the album.
<br>
This is a second paragraph about the album. It has been separated from the above paragraph by hitting the "Enter" key twice.
<br>
This is a third paragraph.</review>
</album>

 

The first example is correctly recognized by Kodi, and so that is how most of my nfo files are formatted, as I have been using Kodi for years. Do I need to edit the nfo files for Emby to display the line breaks?

Link to comment
Share on other sites

Guest ES_218

No, it didn't work. I tried several variants: <br> <br/> <br /> and </br> in an nfo will cause the nfo file to be ignored upon library refresh.

Link to comment
Share on other sites

14 hours ago, ES_218 said:

 


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <review>This a brief description of the album.
<br>
This is a second paragraph about the album. It has been separated from the above paragraph by hitting the "Enter" key twice.
<br>
This is a third paragraph.</review>
</album>

 

Curious, have to tried to view this in Kodi?  Does it do line breaks or show the <br> as text?

Link to comment
Share on other sites

serpi

The problem is, that the nfo file is XML and just adding a <br> into it means, that you are starting a new tag br.

If you are using a tool for creating the nfo file (I'm using EMM), this will write proper code into the text: &lt;br&gt; why is described here (in german, but you will get it) for example.

Ciao, Alfred

  • Like 1
Link to comment
Share on other sites

Guest ES_218
50 minutes ago, cayars said:

Curious, have to tried to view this in Kodi?  Does it do line breaks or show the <br> as text?

Half works - Kodi will display everything up to the <br> but everything after is ignored.

30 minutes ago, serpi said:

The problem is, that the nfo file is XML and just adding a <br> into it means, that you are starting a new tag br.

If you are using a tool for creating the nfo file (I'm using EMM), this will write proper code into the text: &lt;br&gt; why is described here (in german, but you will get it) for example.

Ciao, Alfred

This is interesting. &lt;br&gt; works correctly with Emby nfo library refresh, however Kodi displays a literal <br>

Same with the Emby metadata editor on the web client, if you enter &lt;br&gt it will display a literal <br>

This is progress. My goal here is to be able to edit metadata via nfo files, but not have to maintain a separate database for Emby and Kodi.

Edited by ES_218
Clarity
Link to comment
Share on other sites

I remember having exactly this issue previously where I could get the results in Emby or Kodi but not both.

Kodi isn't a web browser so it doesn't interpret the codes as such while Emby parses and handles the codes but won't take literal text as is (hard returns) but Kodi will.

Link to comment
Share on other sites

Maybe, but I never found it. When I saw how each handled things I couldn't think of handling the formatting so I stopped trying and did a work around on my system.

It's was unique to my system. I automated the following.

Set Emby as the master so that I'd do edits here and allow Emby to write the NFO file.  Now a set of scripts watch for an NFO file being written to any directory and moves it to another location and is symlinked back to the folder.  Thus Emby see's it as exactly the same even though the nfo is in another location in storage.  Then a simple parse of this NFO file is done to replace certain tags that work in Emby to something that works for kodi like changing the coded <br> sequence to hard line returns and this NFO is saved to another place in my storage.

Now I create a virtual drive of my base location using the subst command and get a drive letter B:  I then do the same symlink process (mlink) to link the kodi NFO back in with the virtual B drive files and have a files system that looks like the real thing.  So I create two virtual file systems that each have a different NFO version.

I used to do other similar things as well for plex and kodi and plex and emby to work out difference like being able to use the same bif file instead of having both system generate their own.

Emby happy, Kodi happy

I only run Emby now so I removed this type of thing but it wasn't hard to do if you can script or do light programming. Took about two hours do do from start to finish.

I defiantly used a chainsaw to do a job a butter knife should have been able to do but it worked and solved my problem. :)

 

Link to comment
Share on other sites

Guest ES_218

Interesting work-around.

I was thinking of doing something similar. Is it possible to specify the nfo file Emby will scrape metadata? Say for example album_Emby.nfo rather than album.nfo?

Link to comment
Share on other sites

Not that I know of. If we could do that it would be much easier to work around this as you could just script the copy/edit of one NFO file to another and they could both be in the same directory!

Link to comment
Share on other sites

chef
16 hours ago, ES_218 said:

Thanks for the reply. Not sure what you mean by cdata. Below is an example of one of my files album.nfo


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <review>This a brief description of the album.

This is a second paragraph about the album. It has been separated from the above paragraph by hitting the "Enter" key twice.

This is a third paragraph.</review>
</album>

I would like to do all of my metadata editing via nfo files rather than the metadata editor in the web client. The code above imports to Emby, however the line breaks are not displayed.

The code below, however, is ignored by Emby upon library refresh


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <review>This a brief description of the album.
<br>
This is a second paragraph about the album. It has been separated from the above paragraph by hitting the "Enter" key twice.
<br>
This is a third paragraph.</review>
</album>

 

The first example is correctly recognized by Kodi, and so that is how most of my nfo files are formatted, as I have been using Kodi for years. Do I need to edit the nfo files for Emby to display the line breaks?

If the XML contains <![CDATA elements then anything in the element would be taken literally and therefore any < or & or > would be taken a their string value and not the code value. 😃

Edited by chef
Link to comment
Share on other sites

pwhodges
2 hours ago, ES_218 said:

This is interesting. &lt;br&gt; works correctly with Emby nfo library refresh, however Kodi displays a literal <br>

I'd suggest trying the same correction as before: &lt;br /&gt; or maybe &lt;br&nbsp;&sol;&gt;

Paul

Link to comment
Share on other sites

Guest ES_218
44 minutes ago, pwhodges said:

I'd suggest trying the same correction as before: &lt;br /&gt; or maybe &lt;br&nbsp;&sol;&gt;

Paul

Same result as &lt;br&gt; 

Link to comment
Share on other sites

have you tried saving with the emby metadata editor to see an example of what it ends up looking like in your nfo?

Link to comment
Share on other sites

Guest ES_218
On 7/30/2020 at 1:30 PM, Luke said:

have you tried saving with the emby metadata editor to see an example of what it ends up looking like in your nfo?

<br> and its variants <br/> <br /> and </br> all write a carriage return to the NFO. Same with an actual carriage return (hitting the Enter key). Problem is, once you refresh metadata, it reverts back to a wall of text. 

&lt;br&gt; and &lt;br /&gt; writes &amp;lt;br&amp;gt; and &amp;lt;br /&amp;gt; respectively to the NFO, but displays a literal <br> in Emby.

I prefer not to use the Emby metadata editor. I have all my Kodi clients set to read-only privileges. This way, I know that I am the only one making changes to the NFO files with my text editor of choice.

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...