fixed playing video from app content provider

This commit is contained in:
Thibault Deckers 2023-03-16 16:15:19 +01:00
parent cb5afa9014
commit 4e86d2f1fe
2 changed files with 12 additions and 2 deletions

View file

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## <a id="unreleased"></a>[Unreleased]
### Fixed
- Viewer: playing video from app content provider
## <a id="v1.8.3"></a>[v1.8.3] - 2023-03-13
### Added

View file

@ -228,11 +228,12 @@ class _HomePageState extends State<HomePage> {
canAnalyze: false,
);
}
} else {
await _initViewerEssentials();
}
break;
case AppMode.setWallpaper:
// for video playback storage
await metadataDb.init();
await _initViewerEssentials();
break;
case AppMode.pickMediaInternal:
case AppMode.pickFilterInternal:
@ -248,6 +249,11 @@ class _HomePageState extends State<HomePage> {
));
}
Future<void> _initViewerEssentials() async {
// for video playback storage
await metadataDb.init();
}
bool _isViewerSourceable(AvesEntry? viewerEntry) {
return viewerEntry != null && viewerEntry.directory != null && !settings.hiddenFilters.any((filter) => filter.test(viewerEntry));
}