Bug Default subtitle offset/Delay is ignored
#1
When using this addon to download subtitles it resets the subtitle offset/delay to 0.000s always. Basically ignoring this setting: <subtitledelay>0.600000</subtitledelay> in guisettings.xml.

It happens in Linux and Windows version.

How to reproduce:
1. Download a subtitle
2. Audio dialog > Set the subtitle offset/delay to whatever you prefer.
3. Then click "Set as default for all videos"
4. Download another subtitle and check the offset/delay again (Notice it has returned to 0.000s)

It should not ignore this setting. Personally it forces me to change the offset every time i watch a video/tv-series because my boxee box (linux device) is abit lazy when it comes to showing subtitles and always manages to delay it by 600ms.

(Please don't ask me to download the correct subtitles for the video.)

XBMC Windows version: 13.0 Git:20140505-f42f5b5
Reply
#2
To be more specific:

https://github.com/xbmc/xbmc/blob/master...s.cpp#L579

It should have a "if" phrase to check if settings <subtitledelay> is there or not, then just either set it to the settings subtitledelay or 0.
Reply
#3
Its intentional, once new subtittle is downloaded offset is reset to 0

Since you dont want me to tell you to download correct sub or fix issues with your hardware i have no other solutions for you, sorry
Reply
#4
Even if it's intentional it is a bug. Look at it this way.

If the fix is applied.
You download, set a new offset, you don't save the setting as default, download another subtitle. It will reset the offset to 0 or whatever the default value is. It will work exactly the way it is now.

This is also helpful if you're watching many episodes and there is no correct subtitle release version to choose from. You can just have a default offset throughout the series.

If you still don't get it. I guess I'll just write the code myself and try to get it into xbmc master.

I know you're the Creator and I'm really grateful for this whole feature. But this will save many a few extra clicks and time. I don't know how to explain it better.
Reply
#5
Its wrong, it will not go into xbmc

You download the sub, you adjust it and it doesnt work... What then? You download new sub and need to revert offset back to 0. The subtitle offset is saved on per movie base as you do it. Not sure you will be able to distinguish between it being default for all or set for movie... Try and let us know , and since you are alone with this you will have to convince is that is needed.

You are the only person that disagrees with it this way and that is because you start with it being wrong by default.
Reply
#6
It is right, because XBMC already have this implemented when using local subtitles.

From your example you don't need to revert it back to 0 because the default value is normally 0. It is not saved per movie if you don't want to do it. Look for the "Set as default for all videos" in Audio dialog. This is what saves it. If you don't click that it will revert to 0 again for each subtitle loading or new video you load up.

It's pretty strange that XBMC does this by default without your addon. Perhaps i should ask them to remove this default offset saving feature? If it's so useless i mean.

I'm the only person so far Wink It doesn't mean i'm wrong though. Just look at the man who said the earth was round and not flat. (Hehe, yeah i just had to include that Big Grin )
Reply
#7
We need to reset it per subtitle as it will keep the offset from the pervious one.

One way would be to have a global offset setting that player will check on activation, at the moment that offset value is read from database on per movie basis and its saved as you are adjusting. No way to know what default value was (i think, as i am not next to a computer Smile )
Reply
#8
Alright, since i said i was gonna do it myself. I finally managed to do it. (After while of setting up XBMC windows compiler, damn hard to do it first time around.)

Code:
void CGUIDialogSubtitles::SetSubtitles(const std::string &subtitle)
{
  if (g_application.m_pPlayer)
  {
    int nStream = g_application.m_pPlayer->AddSubtitle(subtitle);
    if(nStream >= 0)
    {
      g_application.m_pPlayer->SetSubtitle(nStream);
      g_application.m_pPlayer->SetSubtitleVisible(true);
      CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay = CMediaSettings::Get().GetDefaultVideoSettings().m_SubtitleDelay;
      g_application.m_pPlayer->SetSubTitleDelay(CMediaSettings::Get().GetDefaultVideoSettings().m_SubtitleDelay);
    }
  }
}

Notice the difference between GetDefaultVideoSettings and GetCurrentVideoSettings.

This does exactly what i meant. It now resets to default value each time you load a new subtitle. Naturally to 0 if you don't mess with the "Set as default for all videos".

The github crashed somehow so i can't actually make a pull/merge request to master. But if you find this acceptable could you throw it in github for me and try to get it to master?
Reply
#9
there, https://github.com/xbmc/xbmc/pull/4683


I still think "Set as default for all videos" is silly and that you should fix the root of your problem... but who am I to argue
Reply
#10
Like i've said, it's not only to fix the root of my problems. It's also in case of a tv-series marathon someone might have and you want subtitles. It downloads automatically each time but it's off sync. Someone then could just set a subtitle offset default for all videos and it will load correctly throughout the series Wink

I agree i shouldn't use this to fix my individual problem, but since it fixes several things at same time and doesn't hurt anyone i felt it should be included.

Thanks for accepting and submitting the merge request.

Sorry for being such an pain in the arse, just hard to explain it properly Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Default subtitle offset/Delay is ignored0