various fixes
This commit is contained in:
parent
713ef3d782
commit
711b6bcbc8
11 changed files with 18 additions and 20 deletions
|
@ -523,7 +523,7 @@
|
||||||
"settingsSectionThumbnails": "Thumbnails",
|
"settingsSectionThumbnails": "Thumbnails",
|
||||||
"settingsThumbnailShowLocationIcon": "Show location icon",
|
"settingsThumbnailShowLocationIcon": "Show location icon",
|
||||||
"settingsThumbnailShowMotionPhotoIcon": "Show motion photo icon",
|
"settingsThumbnailShowMotionPhotoIcon": "Show motion photo icon",
|
||||||
"settingsThumbnailShowRatingIcon": "Show rating icon",
|
"settingsThumbnailShowRating": "Show rating",
|
||||||
"settingsThumbnailShowRawIcon": "Show raw icon",
|
"settingsThumbnailShowRawIcon": "Show raw icon",
|
||||||
"settingsThumbnailShowVideoDuration": "Show video duration",
|
"settingsThumbnailShowVideoDuration": "Show video duration",
|
||||||
|
|
||||||
|
|
|
@ -375,6 +375,7 @@
|
||||||
"settingsSectionThumbnails": "Vignettes",
|
"settingsSectionThumbnails": "Vignettes",
|
||||||
"settingsThumbnailShowLocationIcon": "Afficher l’icône de lieu",
|
"settingsThumbnailShowLocationIcon": "Afficher l’icône de lieu",
|
||||||
"settingsThumbnailShowMotionPhotoIcon": "Afficher l’icône de photo animée",
|
"settingsThumbnailShowMotionPhotoIcon": "Afficher l’icône de photo animée",
|
||||||
|
"settingsThumbnailShowRating": "Afficher la notation",
|
||||||
"settingsThumbnailShowRawIcon": "Afficher l’icône de photo raw",
|
"settingsThumbnailShowRawIcon": "Afficher l’icône de photo raw",
|
||||||
"settingsThumbnailShowVideoDuration": "Afficher la durée de la vidéo",
|
"settingsThumbnailShowVideoDuration": "Afficher la durée de la vidéo",
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
"videoActionSetSpeed": "재생 배속",
|
"videoActionSetSpeed": "재생 배속",
|
||||||
"videoActionSettings": "설정",
|
"videoActionSettings": "설정",
|
||||||
|
|
||||||
"entryInfoActionEditDate": "날짜와 시간 수정",
|
"entryInfoActionEditDate": "날짜 및 시간 수정",
|
||||||
"entryInfoActionEditTags": "태그 수정",
|
"entryInfoActionEditTags": "태그 수정",
|
||||||
"entryInfoActionRemoveMetadata": "메타데이터 삭제",
|
"entryInfoActionRemoveMetadata": "메타데이터 삭제",
|
||||||
|
|
||||||
|
@ -375,6 +375,7 @@
|
||||||
"settingsSectionThumbnails": "섬네일",
|
"settingsSectionThumbnails": "섬네일",
|
||||||
"settingsThumbnailShowLocationIcon": "위치 아이콘 표시",
|
"settingsThumbnailShowLocationIcon": "위치 아이콘 표시",
|
||||||
"settingsThumbnailShowMotionPhotoIcon": "모션 포토 아이콘 표시",
|
"settingsThumbnailShowMotionPhotoIcon": "모션 포토 아이콘 표시",
|
||||||
|
"settingsThumbnailShowRating": "별점 표시",
|
||||||
"settingsThumbnailShowRawIcon": "Raw 아이콘 표시",
|
"settingsThumbnailShowRawIcon": "Raw 아이콘 표시",
|
||||||
"settingsThumbnailShowVideoDuration": "동영상 길이 표시",
|
"settingsThumbnailShowVideoDuration": "동영상 길이 표시",
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class VideoMetadataFormatter {
|
class VideoMetadataFormatter {
|
||||||
static final _epoch = DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
|
static final _epoch = DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
|
||||||
static final _anotherDatePattern = RegExp(r'(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})');
|
static final _anotherDatePattern = RegExp(r'(\d{4})[-/](\d{2})[-/](\d{2}) (\d{2}):(\d{2}):(\d{2})');
|
||||||
static final _durationPattern = RegExp(r'(\d+):(\d+):(\d+)(.\d+)');
|
static final _durationPattern = RegExp(r'(\d+):(\d+):(\d+)(.\d+)');
|
||||||
static final _locationPattern = RegExp(r'([+-][.0-9]+)');
|
static final _locationPattern = RegExp(r'([+-][.0-9]+)');
|
||||||
static final Map<String, String> _codecNames = {
|
static final Map<String, String> _codecNames = {
|
||||||
|
@ -112,9 +112,10 @@ class VideoMetadataFormatter {
|
||||||
return date.millisecondsSinceEpoch;
|
return date.millisecondsSinceEpoch;
|
||||||
}
|
}
|
||||||
|
|
||||||
// `DateTime` does not recognize:
|
// `DateTime` does not recognize these values found in the wild:
|
||||||
// - `UTC 2021-05-30 19:14:21`
|
// - `UTC 2021-05-30 19:14:21`
|
||||||
// - `2021`
|
// - `2021/10/31 21:23:17`
|
||||||
|
// - `2021` (not enough to build a date)
|
||||||
|
|
||||||
final match = _anotherDatePattern.firstMatch(dateString);
|
final match = _anotherDatePattern.firstMatch(dateString);
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class AIcons {
|
||||||
static const IconData locationOff = Icons.location_off_outlined;
|
static const IconData locationOff = Icons.location_off_outlined;
|
||||||
static const IconData mainStorage = Icons.smartphone_outlined;
|
static const IconData mainStorage = Icons.smartphone_outlined;
|
||||||
static const IconData privacy = MdiIcons.shieldAccountOutline;
|
static const IconData privacy = MdiIcons.shieldAccountOutline;
|
||||||
static const IconData ratingRejected = MdiIcons.starRemoveOutline;
|
static const IconData ratingRejected = MdiIcons.starMinusOutline;
|
||||||
static const IconData ratingUnrated = MdiIcons.starOffOutline;
|
static const IconData ratingUnrated = MdiIcons.starOffOutline;
|
||||||
static const IconData raw = Icons.raw_on_outlined;
|
static const IconData raw = Icons.raw_on_outlined;
|
||||||
static const IconData shooting = Icons.camera_outlined;
|
static const IconData shooting = Icons.camera_outlined;
|
||||||
|
|
|
@ -34,9 +34,11 @@ class Themes {
|
||||||
fontFeatures: [FontFeature.enable('smcp')],
|
fontFeatures: [FontFeature.enable('smcp')],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
colorScheme: const ColorScheme.dark(
|
colorScheme: ColorScheme.dark(
|
||||||
primary: _accentColor,
|
primary: _accentColor,
|
||||||
secondary: _accentColor,
|
secondary: _accentColor,
|
||||||
|
// surface color is used as background for the date picker header
|
||||||
|
surface: Colors.grey.shade800,
|
||||||
onPrimary: Colors.white,
|
onPrimary: Colors.white,
|
||||||
onSecondary: Colors.white,
|
onSecondary: Colors.white,
|
||||||
),
|
),
|
||||||
|
|
|
@ -183,7 +183,7 @@ class CollectionSearchDelegate {
|
||||||
_buildFilterRow(
|
_buildFilterRow(
|
||||||
context: context,
|
context: context,
|
||||||
title: context.l10n.searchSectionRating,
|
title: context.l10n.searchSectionRating,
|
||||||
filters: [0, -1, 5, 4, 3, 2, 1].map((rating) => RatingFilter(rating)).toList(),
|
filters: [0, 5, 4, 3, 2, 1, -1].map((rating) => RatingFilter(rating)).toList(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
@ -83,7 +83,7 @@ class ThumbnailsSection extends StatelessWidget {
|
||||||
onChanged: (v) => settings.showThumbnailRating = v,
|
onChanged: (v) => settings.showThumbnailRating = v,
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Text(context.l10n.settingsThumbnailShowRatingIcon)),
|
Expanded(child: Text(context.l10n.settingsThumbnailShowRating)),
|
||||||
AnimatedOpacity(
|
AnimatedOpacity(
|
||||||
opacity: opacityFor(current),
|
opacity: opacityFor(current),
|
||||||
duration: Durations.toggleableTransitionAnimation,
|
duration: Durations.toggleableTransitionAnimation,
|
||||||
|
|
|
@ -54,7 +54,7 @@ class InfoSearchDelegate extends SearchDelegate {
|
||||||
Widget buildSuggestions(BuildContext context) {
|
Widget buildSuggestions(BuildContext context) {
|
||||||
final l10n = context.l10n;
|
final l10n = context.l10n;
|
||||||
final suggestions = {
|
final suggestions = {
|
||||||
l10n.viewerInfoSearchSuggestionDate: 'date or time or when -timer -uptime -exposure -timeline',
|
l10n.viewerInfoSearchSuggestionDate: 'date or time or when -timer -uptime -exposure -timeline -verbatim',
|
||||||
l10n.viewerInfoSearchSuggestionDescription: 'abstract or description or comment or textual or title',
|
l10n.viewerInfoSearchSuggestionDescription: 'abstract or description or comment or textual or title',
|
||||||
l10n.viewerInfoSearchSuggestionDimensions: 'width or height or dimension or framesize or imagelength',
|
l10n.viewerInfoSearchSuggestionDimensions: 'width or height or dimension or framesize or imagelength',
|
||||||
l10n.viewerInfoSearchSuggestionResolution: 'resolution',
|
l10n.viewerInfoSearchSuggestionResolution: 'resolution',
|
||||||
|
|
|
@ -7,5 +7,6 @@ void main() {
|
||||||
|
|
||||||
expect(VideoMetadataFormatter.parseVideoDate('2011-05-08T03:46+09:00'), DateTime(2011, 5, 7, 18, 46).add(localOffset).millisecondsSinceEpoch);
|
expect(VideoMetadataFormatter.parseVideoDate('2011-05-08T03:46+09:00'), DateTime(2011, 5, 7, 18, 46).add(localOffset).millisecondsSinceEpoch);
|
||||||
expect(VideoMetadataFormatter.parseVideoDate('UTC 2021-05-30 19:14:21'), DateTime(2021, 5, 30, 19, 14, 21).millisecondsSinceEpoch);
|
expect(VideoMetadataFormatter.parseVideoDate('UTC 2021-05-30 19:14:21'), DateTime(2021, 5, 30, 19, 14, 21).millisecondsSinceEpoch);
|
||||||
|
expect(VideoMetadataFormatter.parseVideoDate('2021/10/31 21:23:17'), DateTime(2021, 10, 31, 21, 23, 17).millisecondsSinceEpoch);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,15 +9,7 @@
|
||||||
"editEntryDateDialogTargetFieldsHeader",
|
"editEntryDateDialogTargetFieldsHeader",
|
||||||
"collectionSortRating",
|
"collectionSortRating",
|
||||||
"searchSectionRating",
|
"searchSectionRating",
|
||||||
"settingsThumbnailShowRatingIcon"
|
"settingsThumbnailShowRating"
|
||||||
],
|
|
||||||
|
|
||||||
"fr": [
|
|
||||||
"settingsThumbnailShowRatingIcon"
|
|
||||||
],
|
|
||||||
|
|
||||||
"ko": [
|
|
||||||
"settingsThumbnailShowRatingIcon"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"ru": [
|
"ru": [
|
||||||
|
@ -30,6 +22,6 @@
|
||||||
"editEntryDateDialogTargetFieldsHeader",
|
"editEntryDateDialogTargetFieldsHeader",
|
||||||
"collectionSortRating",
|
"collectionSortRating",
|
||||||
"searchSectionRating",
|
"searchSectionRating",
|
||||||
"settingsThumbnailShowRatingIcon"
|
"settingsThumbnailShowRating"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue