xmltv - new line (1 Viewer)

steo

Portal Member
October 31, 2014
8
1
38
Home Country
Germany Germany
Hi,

I am using the xmltv-plugin togehter with Mediaportal 1.13.
The "tvguide.xml" is getting generated by self-made powershell script.
I have attached en example file.

The problem is that all line breaks and new lines inside the "description" getting ignored from media portal.
I think they are getting removed from the plugin. Is there a way to leave the strings untouched?

regards

Steffen
 

Vasilich

Portal Pro
August 30, 2009
3,394
1,170
Germany, Mayence
Home Country
Russian Federation Russian Federation
as you use self-made script, then easiest way would be to use tag <br> as line ending sign in XML (exactly to say, you need to use the encoded form "&lt;br&gt;" without quotes), generated by your script. This is because the conversion does following:
C#:
      StringWriter writer = new StringWriter();

      System.Web.HttpUtility.HtmlDecode(html, writer);

      String DecodedString = writer.ToString();
      strippedHtml = DecodedString.Replace("<br>", "\n");
don't ask me why it was designed to decode HTML though we are use XML on this place....
 

steo

Portal Member
October 31, 2014
8
1
38
Home Country
Germany Germany
thanks Vasilich.
@mm1352000: I just wanted to write the same but you where the faster one ;)
I will try it with <br> in the afternoon but as you already said it will be replace later in the code.
Is there no one using xmltv-files with line breaks?
 

pünktchen

Portal Pro
October 26, 2010
537
201
Home Country
Germany Germany
Hi,

I am using the xmltv-plugin togehter with Mediaportal 1.13.
The "tvguide.xml" is getting generated by self-made powershell script.
I have attached en example file.

The problem is that all line breaks and new lines inside the "description" getting ignored from media portal.
I think they are getting removed from the plugin. Is there a way to leave the strings untouched?

regards

Steffen
Download "xmltvimport_mit_Zeilenumbruch.zip" from this post: https://forum.team-mediaportal.com/index.php?posts/1096789 and replace the dll in your TVServer installation directory. After a service restart and reimport of your xml, the line breaks should be there.
 

steo

Portal Member
October 31, 2014
8
1
38
Home Country
Germany Germany
@Püntchen: Great! It´s working...
Any reason why this is not implemented in stable version or are there any plans to do that?
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    wtf, do we really need this conversion?
    Presumably it was done to minimise space usage in the UI/skin, but that's a complete guess. IMHO titles and episode names should never contain new lines (ie. current code is good); maybe for descriptions it's arguable.

    Any reason why this is not implemented in stable version or are there any plans to do that?
    Nobody has asked for it until now.
     

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    titles and episode names should never contain new lines (ie. current code is good); maybe for descriptions it's arguable.
    surely for titles of any kind the conversion is needed. But descriptions definitely need support of CR/LF. AFAIK the decision whether to show line feeds or not can be taken for each skin (though i can be wrong there).
     

    Users who are viewing this thread

    Top Bottom