Subtitle toast improvements
#1
Not sure if it's XBMC or the Skin that controls this.

When toggling between subtitles ('l') the messages in the "toast" isn't always very user friendly. Example:

I have an .mkv file which contain multiple internal PGS subtitles in various languages. The track names are unfortunatly only set to "PGS", but the language fields are properly set. I also have two external subtitle present: a.quite.long.filename.for.this.example.English.srt and a.quite.long.filename.for.this.example.Director's Commentary.srt, using the common <moviename>.<language or track name>.srt naming convention.

When toggling between the subtitles this is the information shown in the "toast" (also note that the filenames shown are truncated and none of the skins I've used scroll this text):
  • "PGS"
  • "PGS"
  • "PGS"
  • "a.quite.long.filen..."
  • "a.quite.long.filen..."
  • "Disabled"

Not very helpful. Something like this would be far more useful:
  • "PGS (English)"
  • "PGS (Swedish)"
  • "PGS (Spanish)"
  • "English" or "English (a.quite.long.filename.for.this.example.English.srt)
  • "Director's Commentary" or "Director's Commentary (a.quite.long.filename.for.this.example.Director's Commentary.srt)
  • "Disabled"
Reply
#2
Agreed - a patch for this would be most welcome. The .srt issue should be relatively easy to sort out I should think, as we already must have the information available when we find it - it's just a matter of ensuring that information stays around so that the UI can provide something useful.

Add a ticket to trac, ideally with some sample files that allow this to be easily reproduced easily.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Ticket and sample: http://trac.xbmc.org/ticket/11715
Reply
#4
I've created a fix for this, however I'm only able to display short language codes (eng, nor, swe etc) rather than full language names (English, Norwegian, Swedish etc). This seems better than nothing, but I'd prefer to use the full names if possible.

Can any of the devs tell me, is there anything in the code base which allows the mapping of codes to full names, or is this the best I can do for now?
Reply
#5
See langcodeexpander
Reply
#6
Code:
#include "utils/LangCodeExpander.h"

...

if (g_LangCodeExpander.Lookup(langfullname, langcode))
{
  // langfullname is found based on langcode
}

What's your plan with handling "unknown language" subtitles (f.e. a.quite.long.filename.for.this.example.srt)?
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#7
Thanks for the pointers.

Re the file based subs my plan is to take the basename of the video filename and remove that from the subtitle stream name, and then removing the extension:

a.quite.long.filename.for.this.example.English.srt > English (a.quite.long.filename.for.this.example.English.srt)

In cases where no language is specified (resultiing in an empty string), I suppose the best thing would be to use "Unknown (a.quite.long.filename.for.this.example.srt)".

Does that sound reasonable, or can anyone suggest a better approach?
Reply
#8
Mindzai Wrote:Thanks for the pointers.

Re the file based subs my plan is to take the basename of the video filename and remove that from the subtitle stream name, and then removing the extension:

a.quite.long.filename.for.this.example.English.srt > English (a.quite.long.filename.for.this.example.English.srt)

In cases where no language is specified (resultiing in an empty string), I suppose the best thing would be to use "Unknown (a.quite.long.filename.for.this.example.srt)".

Does that sound reasonable, or can anyone suggest a better approach?
Well, there's nothing more we can do about it - scenario I had in mind is having 2 unkown_language subtitle files (say moviename.srt and moviename.txt) - if there is more than 1 unkown subtitle stream - there should be some way to distinguish between them.

Other than that - all is fine.
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#9
What about when you have external files with trackname/language that's part of the filename? Will those be handled as well?

a.quite.long.filename.for.this.example.English.srt
a.quite.long.filename.for.this.example.Director's Commentary.srt
Reply
#10
pieh Wrote:Well, there's nothing more we can do about it - scenario I had in mind is having 2 unkown_language subtitle files (say moviename.srt and moviename.txt) - if there is more than 1 unkown subtitle stream - there should be some way to distinguish between them.

Other than that - all is fine.

Yes like you say, nothing more can be done in that case and it will have to revert to the filename.

sialivi Wrote:What about when you have external files with trackname/language that's part of the filename? Will those be handled as well?

a.quite.long.filename.for.this.example.English.srt
a.quite.long.filename.for.this.example.Director's Commentary.srt

Yes, they would become:


a.quite.long.filename.for.this.exama.quite.long.filename.for.this.example.Director's Commentary.srtple.English.srt > English (a.quite.long.filename.for.this.example.English.srt)
a.quite.long.filename.for.this.example.Director's Commentary.srt > Director's Commentary (a.quite.long.filename.for.this.example.Director's Commentary.srt)

(or just the language/description without the parenthesized filename if that would be preferable?)
Reply

Logout Mark Read Team Forum Stats Members Help
Subtitle toast improvements0