Skip to content

Commit

Permalink
Improve SRT support - handle optional index field. Collapse spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
amugofjava committed Jun 21, 2023
1 parent 2a4ed68 commit 5b9a7a5
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/core/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const userAgentAppString = String.fromEnvironment('USER_AGENT', defaultValue: ''
class Environment {
static const _applicationName = 'Anytime';
static const _applicationUrl = 'https://github.com/amugofjava/anytime_podcast_player';
static const _projectVersion = '1.3.0';
static const _build = '91';
static const _projectVersion = '1.3.1';
static const _build = '92';

static var _agentString = userAgentAppString;

Expand Down
2 changes: 1 addition & 1 deletion lib/repository/sembast/sembast_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class SembastRepository extends Repository {
}

Future<void> _cleanupEpisodes() async {
final threshold = DateTime.now().subtract(Duration(days: 32)).millisecondsSinceEpoch;
final threshold = DateTime.now().subtract(Duration(days: 60)).millisecondsSinceEpoch;

/// Find all streamed episodes over the threshold.
final filter = Filter.and([
Expand Down
2 changes: 1 addition & 1 deletion lib/services/audio/default_audio_player_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DefaultAudioPlayerService extends AudioPlayerService {
final BehaviorSubject<AudioState> _playingState = BehaviorSubject<AudioState>.seeded(AudioState.none);

/// Ticks whilst playing. Updates our current position within an episode.
final _durationTicker = Stream<int>.periodic(Duration(milliseconds: 500)).asBroadcastStream();
final _durationTicker = Stream<int>.periodic(Duration(milliseconds: 250)).asBroadcastStream();

/// Stream for the current position of the playing track.
final _playPosition = BehaviorSubject<PositionState>();
Expand Down
6 changes: 5 additions & 1 deletion lib/services/podcast/mobile_podcast_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,11 @@ class MobilePodcastService extends PodcastService {
}
} else {
if (groupSubtitle.start == subtitle.start) {
data = '${groupSubtitle.data} ${subtitle.data}';
if (groupSubtitle.data.endsWith(' ') || subtitle.data.startsWith(' ') || subtitle.data.length == 1) {
data = '${groupSubtitle.data}${subtitle.data}';
} else {
data = '${groupSubtitle.data} ${subtitle.data.trim()}';
}
completeGroup = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/podcast/podcast_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class _PodcastDetailsState extends State<PodcastDetails> {
iconColour: toolbarCollapsed && Theme.of(context).brightness == Brightness.light
? Theme.of(context).appBarTheme.foregroundColor
: Colors.white,
decorationColour: toolbarCollapsed ? Color(0x00000000) : Color(0x88888888),
decorationColour: toolbarCollapsed ? Color(0x00000000) : Color(0x22FFFFFF),
onPressed: () {
_resetSystemOverlayStyle();
Navigator.pop(context);
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/podcast/transcript_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class _TranscriptViewState extends State<TranscriptView> {
}
}
} catch (e) {
log.fine('We failed to find a transcript entry for position ${event.position.inMilliseconds}');
// We don't have a transcript entry for this position.
}
}

Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: anytime
description: Anytime Podcast Player

version: 1.3.0+91
version: 1.3.1+92

environment:
sdk: ">=2.10.0 <3.0.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ dependencies:
podcast_search:
git:
url: https://github.com/amugofjava/podcast_search.git
ref: feature/pc20-tags
ref: 2aacfcd5bd12a227c78481af26162749b5ec905f
provider: ^6.0.3
rxdart: ^0.27.4
scrollable_positioned_list: ^0.3.7
Expand Down

0 comments on commit 5b9a7a5

Please sign in to comment.