Bug #2527

Description is cut when fetching from tmdb

Added by Rural Hunter over 5 years ago. Updated about 3 years ago.

Status:AcceptedStart date:01/28/2015
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:User interface
Target version:-
Found in version:4.9.120 Platform:Linux

Description

The movie introduction retrieved from meta server are cut and only part of it is visible. I guess this should be caused by the string length calculation for characters that are not single byte. It's same on linux and PS3.

showtime1.png (679 KB) Rural Hunter, 01/28/2015 09:03 AM

Screenshot - 01292015 - 12_28_06 AM.png (390 KB) Buksa Noob, 01/29/2015 09:31 AM

friends.png (321 KB) Rural Hunter, 12/07/2015 03:52 AM

History

#1 Updated by Rural Hunter over 5 years ago

The language code of Chinese is 'zh' in themoviedb/thetvdb if you want to test.

#2 Updated by Leonid Protasov over 5 years ago

I suppose log could be useful to reproduce it.

#3 Updated by Leonid Protasov over 5 years ago

  • Subject changed from Movie introduction in Chinese is not shown fully to Description is cut when fetching from tmdb
  • Category set to Metadata
  • Status changed from New to Need feedback
  • Assignee set to Andreas Smas

#4 Updated by Rural Hunter over 5 years ago

There is nothing about this in the log, even I tried to update the metadata of the video:
00:00:04.004: navigator [INFO ]:Opening /home/ruralhunter/video
00:00:05.789: DB [DEBUG]:Opened database /home/ruralhunter/.hts/showtime/metadb/meta.db pages: free=0 total=208
00:01:41.223: GLW [DEBUG]:UI size scale changed to 28 (user adjustment: 0)
00:01:42.570: navigator [INFO ]:Opening settings:
00:01:44.801: navigator [INFO ]:Opening settings:metadata
00:01:58.150: Freetype [DEBUG]:Loaded font family='liberation sans' fullname='liberation sans regular' style='Regular' from /usr/local/share/showtime/resources/fonts/liberation/LiberationSans-Regular.ttf domain:0
00:02:07.570: navigator [INFO ]:Opening /home/ruralhunter/video

#5 Updated by Rural Hunter over 5 years ago

Maybe I didn't describe the issue clearly. The metadata is retrieved correctly. It's just the view problem in UI. You can see it in the attached image: The end of the first line of the introduction part(in red square) is not complete.

#6 Updated by Leonid Protasov over 5 years ago

Rural Hunter wrote:

Maybe I didn't describe the issue clearly. The metadata is retrieved correctly. It's just the view problem in UI. You can see it in the attached image: The end of the first line of the introduction part(in red square) is not complete.

Maybe metadata lookups in settings:dev can help to understand what you get from tmdb on the request. We can't read chinese (maybe Andreas does :) so that's why it is hard for us even understand what is cut :)

#7 Updated by Buksa Noob over 5 years ago

st get full description from http://www.thetvdb.com/api/0ADF8BA762FED295/series/79168/default/10/4/zh.xml
we have problem with "wordwraping"
as you can see on screenshot full description

#8 Updated by Rural Hunter over 5 years ago

yes, it's a line wrapping problem.

#9 Updated by Andreas Smas almost 5 years ago

  • Status changed from Need feedback to Fixed
  • Target version set to 5.0

This is better in 5.0 i think.

#10 Updated by Rural Hunter almost 5 years ago

Seems it's not. The new UI doesn't even auto-wrap the text? I tried to change the window size and the text wrap didn't change.

#11 Updated by Andreas Smas almost 5 years ago

  • Status changed from Fixed to Accepted

Ok, got it

#12 Updated by Andreas Smas almost 5 years ago

  • Target version deleted (5.0)

I will have to revisit this when i rewrite the font rendering. Not for 5.0 unfortunately

#13 Updated by Andreas Smas almost 5 years ago

  • Category changed from Metadata to User interface

#14 Updated by Rural Hunter about 3 years ago

I found the root cause. The problem is at the line wrapping code:

while (k > 0 && items[li->start + k - 1].code != ' ') {
k--;
w2 -= items[li->start + k].adv_x +
(k > 0 ? items[li->start + k].kerning : 0);
}

It only considers to wrap line if there is a space in the string. In Chinese, there is no space in the description so the line never wraps.

Also available in: Atom PDF