Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Fix duplicated line breaks in subtitles converted to srt #108

Merged
merged 4 commits into from Jan 28, 2020

Conversation

Paco8
Copy link
Contributor

@Paco8 Paco8 commented Jan 27, 2020

Please check that your pull request pass this checks:

  • My changes respect the Kodi add-on development rules
  • My code is both Python 2 and 3 compatible
  • My code follows the code style of this project
  • I made sure there wasn't another Pull Request opened for the same update/change
  • I have successfully tested my changes locally

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Adding a new region/hbo go version

Description:

I'm using HBO Spain, I found a problem with a subtitle, this one:
https://production-static.hboespana.com/p/3b1f95c-00b2c24d769/5d8cbcca77d341e580d62f3faa42a30c.xml

This subtitle contains \n characters but the conversion function to srt also converts "<br />" to \n, so the resulting srt contains duplicated \n characters, which creates empty lines between the texts:

1
00:00:50,240 --> 00:00:55,560
Le he dicho: "Señora,

los asientos no han encogido...

2
00:00:55,720 --> 00:00:58,600
...es su trasero el que ha crecido".


3
00:01:41,040 --> 00:01:44,640
Lo siento, señor. Esta cabina

es solo para primera clase.

When this happens kodi only displays the first line of the text.

I think the problem can be fixed just by removing the "\n" characters from the original text.

@arvvoid
Copy link
Owner

arvvoid commented Jan 28, 2020

Hello, tnx

@arvvoid arvvoid merged commit 501d45a into arvvoid:master Jan 28, 2020
@Paco8 Paco8 deleted the fix-duplicated-line-breaks-in-subtitles branch January 28, 2020 19:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants