kodi-svtplay / xbmc-svtplay

Unofficial addon for watching SVT Play on Kodi
GNU General Public License v3.0
66 stars 34 forks source link

Initial formatting support for list items #281

Closed tomplast closed 1 year ago

tomplast commented 1 year ago

Have been annoyed by tags (among others) showing up in the titles for the the list items. Therefore this is a tiny small modification to correctly format those titles, an alternative would be to just drop them but I think there are other formatting applied by the data from SVT aswell.

linqcan commented 1 year ago

Thanks for your contribution!

I have yet to see these HTML tags show up myself. Would you be able to give me an example of where you see them (which listing) and what platform you use and version of the addon?

linqcan commented 1 year ago

Ah, I think I see it now. It is Search that produces this. SVTPlay highlights the search term in the web GUI.

Highlighting makes sense for the web gui, but not really for the Kodi addon I would say.

Due to this, and in case they add more tags I would instead want the addon to remove HTML tags.

I you could redo the function to remove HTML tags and add a test for it I would be happy to merge it :)

  • [ ] Formatter should strip/remove HTML tags
  • [ ] Add tests to verify that the formatter work
tomplast commented 1 year ago

@linqcan You know, I realized that the same issue occurs in the description of the programs - I could easily make sure that I strip all html tags both from the title and the description. How about that?

Also, should I just rename this PR to reflect the change of nature or should I close it and open up a new one?

tomplast commented 1 year ago

@linqcan I took the liberty to make the changes I suggested. Please take a look when you get time :). Thank you!

linqcan commented 1 year ago

And @tomplast it seems like the Git user you are using is called "BuildTools" and does not match your Github account. FYI