Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting empty list! #16

Open
fadone opened this issue Jul 16, 2024 · 2 comments
Open

Getting empty list! #16

fadone opened this issue Jul 16, 2024 · 2 comments

Comments

@fadone
Copy link

fadone commented Jul 16, 2024

1
00:00:02,250 --> 00:00:03,509
Why am I here?

2
00:00:03,960 --> 00:00:05,539
Why is anyone here?

3
00:00:05,559 --> 00:00:07,869
What's the point if this is all going to be over in the end?

4
00:00:07,880 --> 00:00:11,029
Are we all just doomed to die and cease to exist?

5
00:00:11,039 --> 00:00:12,430
Living is inconsequential.

6
00:00:12,439 --> 00:00:14,359
So we may as well be done already.

7
00:00:14,449 --> 00:00:15,310
Hey,

8
00:00:15,319 --> 00:00:15,989
you good.

9
00:00:16,149 --> 00:00:16,719
Yeah.

10
00:00:16,729 --> 00:00:17,829
Uh Thanks.

var controller = SubtitleController(
    provider: SubtitleProvider.fromString(
      data: data,
      type: SubtitleType.srt,
    ),
  );

print(controller.subtitles);
[]
@fadone
Copy link
Author

fadone commented Jul 16, 2024

My bad. Forgot to intialize it.
await controller.initial();

@fadone fadone closed this as completed Jul 16, 2024
@fadone
Copy link
Author

fadone commented Jul 18, 2024

For anyone who is getting empty list, you have to remove the carriage return '\r' from the subtitle file.
data.replaceAll('\r\n', '\n')

@fadone fadone reopened this Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant