Skip to content

Commit

Permalink
Fix issue when parsing dates formatted as "Streamed <q> <unit> ago".
Browse files Browse the repository at this point in the history
Closes #265 .
  • Loading branch information
Hexer10 committed Dec 21, 2023
1 parent dfbd944 commit 0756976
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.0.4
- Fix issue when parsing dates formatted as "Streamed <q> <unit> ago" due to a leading whitespace. #265

## 2.0.3
- Better performance for iterating through closed captions elements. #251
- Add publishDate and viewCount for playlists. #240
Expand Down
2 changes: 1 addition & 1 deletion lib/src/extensions/helpers_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ extension StringUtility2 on String? {
return null;
}

var parts = this!.split(' ');
var parts = this!.trim().split(' ');
if (parts.length == 4) {
// Streamed x y ago
parts = parts.skip(1).toList();
Expand Down

0 comments on commit 0756976

Please sign in to comment.