Skip to content

Commit 94ad4c0

Browse files
committed
Merge branch 'develop'
2 parents 6803dae + 41ab5d8 commit 94ad4c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2779
-401
lines changed

.github/workflows/dependency-review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden Runner
20-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
20+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
2121
with:
2222
egress-policy: audit
2323

.github/workflows/quality-check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Harden Runner
21-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
21+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
2222
with:
2323
egress-policy: audit
2424

@@ -52,7 +52,7 @@ jobs:
5252
build-mode: manual
5353
steps:
5454
- name: Harden Runner
55-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
55+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
5656
with:
5757
egress-policy: audit
5858

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
id-token: write
1919
steps:
2020
- name: Harden Runner
21-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
21+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
2222
with:
2323
egress-policy: audit
2424

@@ -87,7 +87,7 @@ jobs:
8787
token: ${{ secrets.GITHUB_TOKEN }}
8888

8989
- name: Upload app bundle
90-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
90+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
9191
with:
9292
name: appbundle
9393
path: outputs/app-play-release.aab
@@ -98,7 +98,7 @@ jobs:
9898
runs-on: ubuntu-latest
9999
steps:
100100
- name: Harden Runner
101-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
101+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
102102
with:
103103
egress-policy: audit
104104

.github/workflows/scorecards.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
steps:
3333
- name: Harden Runner
34-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
34+
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
3535
with:
3636
egress-policy: audit
3737

@@ -63,7 +63,7 @@ jobs:
6363
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6464
# format to the repository Actions tab.
6565
- name: "Upload artifact"
66-
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
66+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
6767
with:
6868
name: SARIF file
6969
path: results.sarif

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44

55
## <a id="unreleased"></a>[Unreleased]
66

7+
## <a id="v1.12.2"></a>[v1.12.2] - 2025-01-13
8+
9+
### Added
10+
11+
- DDM coordinate format option
12+
13+
### Changed
14+
15+
- Video: use `media-kit` instead of `ffmpeg-kit` for metadata fetch
16+
- Info: show video chapters
17+
- Accessibility: apply system "touch and hold delay" setting
18+
19+
### Fixed
20+
21+
- crash when cataloguing some videos
22+
- switching to PiP for any inactive app state
23+
724
## <a id="v1.12.1"></a>[v1.12.1] - 2025-01-05
825

926
### Added

android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/AccessibilityHandler.kt

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import android.content.res.Configuration
66
import android.os.Build
77
import android.provider.Settings
88
import android.util.Log
9+
import android.view.ViewConfiguration
910
import android.view.accessibility.AccessibilityManager
1011
import deckers.thibault.aves.channel.calls.Coresult.Companion.safe
1112
import deckers.thibault.aves.utils.LogUtils
@@ -17,6 +18,7 @@ class AccessibilityHandler(private val contextWrapper: ContextWrapper) : MethodC
1718
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
1819
when (call.method) {
1920
"areAnimationsRemoved" -> safe(call, result, ::areAnimationsRemoved)
21+
"getLongPressTimeout" -> safe(call, result, ::getLongPressTimeout)
2022
"hasRecommendedTimeouts" -> safe(call, result, ::hasRecommendedTimeouts)
2123
"getRecommendedTimeoutMillis" -> safe(call, result, ::getRecommendedTimeoutMillis)
2224
"shouldUseBoldFont" -> safe(call, result, ::shouldUseBoldFont)
@@ -34,6 +36,10 @@ class AccessibilityHandler(private val contextWrapper: ContextWrapper) : MethodC
3436
result.success(removed)
3537
}
3638

39+
private fun getLongPressTimeout(@Suppress("unused_parameter") call: MethodCall, result: MethodChannel.Result) {
40+
result.success(ViewConfiguration.getLongPressTimeout())
41+
}
42+
3743
private fun hasRecommendedTimeouts(@Suppress("unused_parameter") call: MethodCall, result: MethodChannel.Result) {
3844
result.success(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
3945
}

android/app/src/main/kotlin/deckers/thibault/aves/channel/streams/SettingsChangeStreamHandler.kt

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import android.os.Handler
77
import android.os.Looper
88
import android.provider.Settings
99
import android.util.Log
10+
import android.view.ViewConfiguration
1011
import deckers.thibault.aves.model.FieldMap
1112
import deckers.thibault.aves.utils.LogUtils
1213
import io.flutter.plugin.common.EventChannel
@@ -21,6 +22,7 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
2122
private val contentObserver = object : ContentObserver(null) {
2223
private var accelerometerRotation: Int = 0
2324
private var transitionAnimationScale: Float = 1f
25+
private var longPressTimeoutMillis: Int = 0
2426

2527
init {
2628
update()
@@ -36,6 +38,7 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
3638
hashMapOf(
3739
Settings.System.ACCELEROMETER_ROTATION to accelerometerRotation,
3840
Settings.Global.TRANSITION_ANIMATION_SCALE to transitionAnimationScale,
41+
KEY_LONG_PRESS_TIMEOUT_MILLIS to longPressTimeoutMillis,
3942
)
4043
)
4144
}
@@ -54,6 +57,11 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
5457
transitionAnimationScale = newTransitionAnimationScale
5558
changed = true
5659
}
60+
val newLongPressTimeout = ViewConfiguration.getLongPressTimeout()
61+
if (longPressTimeoutMillis != newLongPressTimeout) {
62+
longPressTimeoutMillis = newLongPressTimeout
63+
changed = true
64+
}
5765
} catch (e: Exception) {
5866
Log.w(LOG_TAG, "failed to get settings with error=${e.message}", null)
5967
}
@@ -93,5 +101,8 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
93101
companion object {
94102
private val LOG_TAG = LogUtils.createTag<SettingsChangeStreamHandler>()
95103
const val CHANNEL = "deckers.thibault/aves/settings_change"
104+
105+
// cf `Settings.Secure.LONG_PRESS_TIMEOUT`
106+
const val KEY_LONG_PRESS_TIMEOUT_MILLIS = "long_press_timeout"
96107
}
97108
}

android/app/src/main/res/values-ja/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
<string name="analysis_channel_name">メディアスキャン</string>
99
<string name="analysis_notification_default_title">メディアをスキャン中</string>
1010
<string name="analysis_notification_action_stop">停止</string>
11+
<string name="map_shortcut_short_label">マップ</string>
1112
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
In v1.12.2:
2+
- enjoy the app in Danish
3+
Full changelog available on GitHub
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
In v1.12.2:
2+
- enjoy the app in Danish
3+
Full changelog available on GitHub

lib/l10n/app_cs.arb

+49-1
Original file line numberDiff line numberDiff line change
@@ -1516,5 +1516,53 @@
15161516
"chipActionShowCollection": "Zobrazit ve sbírce",
15171517
"@chipActionShowCollection": {},
15181518
"mapAttributionOsmData": "Mapová data © [OpenStreetMap](https://www.openstreetmap.org/copyright) přispěvatelé",
1519-
"@mapAttributionOsmData": {}
1519+
"@mapAttributionOsmData": {},
1520+
"videoActionShowNextFrame": "Zobrazit další snímek",
1521+
"@videoActionShowNextFrame": {},
1522+
"newAlbumDialogAlbumAlreadyExistsHelper": "Album již existuje",
1523+
"@newAlbumDialogAlbumAlreadyExistsHelper": {},
1524+
"renameProcessorHash": "Hash",
1525+
"@renameProcessorHash": {},
1526+
"albumTierDynamic": "Dynamické",
1527+
"@albumTierDynamic": {},
1528+
"collectionActionAddDynamicAlbum": "Přidat dynamické album",
1529+
"@collectionActionAddDynamicAlbum": {},
1530+
"sortOrderShortestFirst": "Nejkratší první",
1531+
"@sortOrderShortestFirst": {},
1532+
"sortOrderLongestFirst": "Nejdelší první",
1533+
"@sortOrderLongestFirst": {},
1534+
"mapAttributionOpenTopoMap": "[SRTM](https://www.earthdata.nasa.gov/sensors/srtm) | Dlaždice z [OpenTopoMap](https://opentopomap.org/), [CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/)",
1535+
"@mapAttributionOpenTopoMap": {},
1536+
"collectionActionSetHome": "Nastavit jako domov",
1537+
"@collectionActionSetHome": {},
1538+
"chipActionRemove": "Odstranit",
1539+
"@chipActionRemove": {},
1540+
"videoActionShowPreviousFrame": "Zobrazit předchozí snímek",
1541+
"@videoActionShowPreviousFrame": {},
1542+
"dynamicAlbumAlreadyExists": "Dynamické album již existuje",
1543+
"@dynamicAlbumAlreadyExists": {},
1544+
"newDynamicAlbumDialogTitle": "Nové dynamické album",
1545+
"@newDynamicAlbumDialogTitle": {},
1546+
"selectStorageVolumeDialogTitle": "Vybrat úložiště",
1547+
"@selectStorageVolumeDialogTitle": {},
1548+
"explorerActionSelectStorageVolume": "Vyberte úložiště",
1549+
"@explorerActionSelectStorageVolume": {},
1550+
"mapStyleOsmLiberty": "OSM Liberty",
1551+
"@mapStyleOsmLiberty": {},
1552+
"mapAttributionOsmLiberty": "Dlaždice z [OpenMapTiles](https://www.openmaptiles.org/), [CC BY](http://creativecommons.org/licenses/by/4.0) • Hostované na [OSM Americana](https://tile.ourmap.us)",
1553+
"@mapAttributionOsmLiberty": {},
1554+
"setHomeCustom": "Vlastní",
1555+
"@setHomeCustom": {},
1556+
"sortByDuration": "Podle trvání",
1557+
"@sortByDuration": {},
1558+
"chipActionGoToExplorerPage": "Zobrazit v průzkumníku",
1559+
"@chipActionGoToExplorerPage": {},
1560+
"explorerPageTitle": "Průzkumník",
1561+
"@explorerPageTitle": {},
1562+
"chipActionDecompose": "Rozdělit",
1563+
"@chipActionDecompose": {},
1564+
"appExportDynamicAlbums": "Dynamická alba",
1565+
"@appExportDynamicAlbums": {},
1566+
"mapStyleOpenTopoMap": "OpenTopoMap",
1567+
"@mapStyleOpenTopoMap": {}
15201568
}

lib/l10n/app_en.arb

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
"albumTierRegular": "Others",
211211

212212
"coordinateFormatDms": "DMS",
213+
"coordinateFormatDdm": "DDM",
213214
"coordinateFormatDecimal": "Decimal degrees",
214215
"coordinateDms": "{coordinate} {direction}",
215216
"@coordinateDms": {

lib/l10n/app_ja.arb

+39-3
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@
11551155
"@vaultDialogLockModeWhenScreenOff": {},
11561156
"newVaultDialogTitle": "新しい保管庫",
11571157
"@newVaultDialogTitle": {},
1158-
"authenticateToConfigureVault": "保管庫を設定するための認証",
1158+
"authenticateToConfigureVault": "認証して保管庫を設定",
11591159
"@authenticateToConfigureVault": {},
11601160
"vaultDialogLockTypeLabel": "ロックの種類",
11611161
"@vaultDialogLockTypeLabel": {},
@@ -1167,7 +1167,7 @@
11671167
"@pinDialogConfirm": {},
11681168
"passwordDialogEnter": "パスワードを入力",
11691169
"@passwordDialogEnter": {},
1170-
"authenticateToUnlockVault": "認証して保管庫のロックを解除する",
1170+
"authenticateToUnlockVault": "認証して保管庫を解除",
11711171
"@authenticateToUnlockVault": {},
11721172
"passwordDialogConfirm": "パスワードの確認",
11731173
"@passwordDialogConfirm": {},
@@ -1360,5 +1360,41 @@
13601360
"filterLocatedLabel": "位置情報あり",
13611361
"@filterLocatedLabel": {},
13621362
"mapAttributionOsmData": "地図データ © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors",
1363-
"@mapAttributionOsmData": {}
1363+
"@mapAttributionOsmData": {},
1364+
"sortByDuration": "期間順",
1365+
"@sortByDuration": {},
1366+
"explorerActionSelectStorageVolume": "ストレージを選択",
1367+
"@explorerActionSelectStorageVolume": {},
1368+
"newAlbumDialogAlbumAlreadyExistsHelper": "アルバムはすでに存在します",
1369+
"@newAlbumDialogAlbumAlreadyExistsHelper": {},
1370+
"videoActionShowPreviousFrame": "前のフレームを表示",
1371+
"@videoActionShowPreviousFrame": {},
1372+
"videoActionShowNextFrame": "次のフレームを表示",
1373+
"@videoActionShowNextFrame": {},
1374+
"albumTierDynamic": "ダイナミック",
1375+
"@albumTierDynamic": {},
1376+
"dynamicAlbumAlreadyExists": "ダイナミックアルバムはすでに存在します",
1377+
"@dynamicAlbumAlreadyExists": {},
1378+
"stateEmpty": "州なし",
1379+
"@stateEmpty": {},
1380+
"appExportDynamicAlbums": "ダイナミックアルバム",
1381+
"@appExportDynamicAlbums": {},
1382+
"chipActionRemove": "削除",
1383+
"@chipActionRemove": {},
1384+
"newDynamicAlbumDialogTitle": "新規ダイナミックアルバム",
1385+
"@newDynamicAlbumDialogTitle": {},
1386+
"setHomeCustom": "カスタム",
1387+
"@setHomeCustom": {},
1388+
"mapStyleOsmLiberty": "OSM Liberty",
1389+
"@mapStyleOsmLiberty": {},
1390+
"mapStyleOpenTopoMap": "OpenTopoMap",
1391+
"@mapStyleOpenTopoMap": {},
1392+
"selectStorageVolumeDialogTitle": "ストレージを選択",
1393+
"@selectStorageVolumeDialogTitle": {},
1394+
"sortOrderShortestFirst": "短いものから表示",
1395+
"@sortOrderShortestFirst": {},
1396+
"sortOrderLongestFirst": "長いものから表示",
1397+
"@sortOrderLongestFirst": {},
1398+
"collectionActionAddDynamicAlbum": "ダイナミックアルバムを追加",
1399+
"@collectionActionAddDynamicAlbum": {}
13641400
}

lib/l10n/app_sk.arb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1562,5 +1562,7 @@
15621562
"newDynamicAlbumDialogTitle": "Nový dynamický album",
15631563
"@newDynamicAlbumDialogTitle": {},
15641564
"dynamicAlbumAlreadyExists": "Dynamický album už existuje",
1565-
"@dynamicAlbumAlreadyExists": {}
1565+
"@dynamicAlbumAlreadyExists": {},
1566+
"chipActionDecompose": "Rozdeliť",
1567+
"@chipActionDecompose": {}
15661568
}

lib/model/app/dependencies.dart

-5
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ class Dependencies {
7373
licenseUrl: 'https://github.com/material-foundation/flutter-packages/blob/main/packages/dynamic_color/LICENSE',
7474
sourceUrl: 'https://github.com/material-foundation/flutter-packages/tree/main/packages/dynamic_color',
7575
),
76-
Dependency(
77-
name: 'FFmpegKit (Aves fork)',
78-
license: lgpl3,
79-
sourceUrl: 'https://github.com/deckerst/ffmpeg-kit',
80-
),
8176
Dependency(
8277
name: 'Floating',
8378
license: mit,

lib/model/entry/entry.dart

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ class AvesEntry with AvesEntryBase {
232232

233233
// the MIME type reported by the Media Store is unreliable
234234
// so we use the one found during cataloguing if possible
235+
@override
235236
String get mimeType => _catalogMetadata?.mimeType ?? sourceMimeType;
236237

237238
bool get isCatalogued => _catalogMetadata != null;

lib/model/entry/extensions/info.dart

+17-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import 'package:aves/ref/mime_types.dart';
99
import 'package:aves/services/common/services.dart';
1010
import 'package:aves/services/metadata/svg_metadata_service.dart';
1111
import 'package:aves/theme/colors.dart';
12+
import 'package:aves/theme/format.dart';
1213
import 'package:aves/theme/text.dart';
1314
import 'package:aves/widgets/viewer/info/metadata/metadata_dir.dart';
1415
import 'package:aves_model/aves_model.dart';
@@ -82,6 +83,21 @@ extension ExtraAvesEntryInfo on AvesEntry {
8283
directories.add(MetadataDirectory(MetadataDirectory.mediaDirectory, _toSortedTags(formattedMediaTags)));
8384
}
8485

86+
if (mediaInfo.containsKey(Keys.chapters)) {
87+
final allChapters = (mediaInfo.remove(Keys.chapters) as List).cast<Map>();
88+
if (allChapters.isNotEmpty) {
89+
allChapters.sortBy((v) => v[Keys.time] as num? ?? 0);
90+
91+
final chapterTags = SplayTreeMap.of(Map.fromEntries(allChapters.mapIndexed((i, chapter) {
92+
final chapterNumber = i + 1;
93+
final time = Duration(seconds: (chapter[Keys.time] as num? ?? 0).round());
94+
final title = chapter[Keys.title] as String? ?? 'Chapter $chapterNumber';
95+
return MapEntry('$chapterNumber${AText.separator}${formatFriendlyDuration(time)}', title);
96+
})), compareNatural);
97+
directories.add(MetadataDirectory('Chapters', chapterTags));
98+
}
99+
}
100+
85101
if (mediaInfo.containsKey(Keys.streams)) {
86102
String getTypeText(Map stream) {
87103
final type = stream[Keys.streamType] ?? MediaStreamTypes.unknown;
@@ -96,7 +112,7 @@ extension ExtraAvesEntryInfo on AvesEntry {
96112
case MediaStreamTypes.timedText:
97113
return 'Text';
98114
case MediaStreamTypes.video:
99-
return stream.containsKey(Keys.fpsDen) ? 'Video' : 'Image';
115+
return stream.containsKey(Keys.fpsDen) || stream.containsKey(Keys.fps) ? 'Video' : 'Image';
100116
case MediaStreamTypes.unknown:
101117
default:
102118
return 'Unknown';

lib/model/filters/coordinate.dart

+9-6
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,15 @@ class CoordinateFilter extends CollectionFilter {
6060

6161
@override
6262
String getLabel(BuildContext context) {
63-
return _formatBounds((latLng) => settings.coordinateFormat.format(
64-
context,
65-
latLng,
66-
minuteSecondPadding: minuteSecondPadding,
67-
dmsSecondDecimals: 0,
68-
));
63+
return _formatBounds((latLng) {
64+
final format = settings.coordinateFormat;
65+
return format.format(
66+
context,
67+
latLng,
68+
minuteSecondPadding: minuteSecondPadding,
69+
dmsSecondDecimals: format == CoordinateFormat.ddm ? 2 : 0,
70+
);
71+
});
6972
}
7073

7174
@override

0 commit comments

Comments
 (0)