Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerst committed Jan 13, 2025
2 parents 6803dae + 41ab5d8 commit 94ad4c0
Show file tree
Hide file tree
Showing 61 changed files with 2,779 additions and 401 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
build-mode: manual
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
id-token: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload app bundle
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: appbundle
path: outputs/app-play-release.aab
Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: SARIF file
path: results.sarif
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

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

## <a id="v1.12.2"></a>[v1.12.2] - 2025-01-13

### Added

- DDM coordinate format option

### Changed

- Video: use `media-kit` instead of `ffmpeg-kit` for metadata fetch
- Info: show video chapters
- Accessibility: apply system "touch and hold delay" setting

### Fixed

- crash when cataloguing some videos
- switching to PiP for any inactive app state

## <a id="v1.12.1"></a>[v1.12.1] - 2025-01-05

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.content.res.Configuration
import android.os.Build
import android.provider.Settings
import android.util.Log
import android.view.ViewConfiguration
import android.view.accessibility.AccessibilityManager
import deckers.thibault.aves.channel.calls.Coresult.Companion.safe
import deckers.thibault.aves.utils.LogUtils
Expand All @@ -17,6 +18,7 @@ class AccessibilityHandler(private val contextWrapper: ContextWrapper) : MethodC
override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
when (call.method) {
"areAnimationsRemoved" -> safe(call, result, ::areAnimationsRemoved)
"getLongPressTimeout" -> safe(call, result, ::getLongPressTimeout)
"hasRecommendedTimeouts" -> safe(call, result, ::hasRecommendedTimeouts)
"getRecommendedTimeoutMillis" -> safe(call, result, ::getRecommendedTimeoutMillis)
"shouldUseBoldFont" -> safe(call, result, ::shouldUseBoldFont)
Expand All @@ -34,6 +36,10 @@ class AccessibilityHandler(private val contextWrapper: ContextWrapper) : MethodC
result.success(removed)
}

private fun getLongPressTimeout(@Suppress("unused_parameter") call: MethodCall, result: MethodChannel.Result) {
result.success(ViewConfiguration.getLongPressTimeout())
}

private fun hasRecommendedTimeouts(@Suppress("unused_parameter") call: MethodCall, result: MethodChannel.Result) {
result.success(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.os.Handler
import android.os.Looper
import android.provider.Settings
import android.util.Log
import android.view.ViewConfiguration
import deckers.thibault.aves.model.FieldMap
import deckers.thibault.aves.utils.LogUtils
import io.flutter.plugin.common.EventChannel
Expand All @@ -21,6 +22,7 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
private val contentObserver = object : ContentObserver(null) {
private var accelerometerRotation: Int = 0
private var transitionAnimationScale: Float = 1f
private var longPressTimeoutMillis: Int = 0

init {
update()
Expand All @@ -36,6 +38,7 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
hashMapOf(
Settings.System.ACCELEROMETER_ROTATION to accelerometerRotation,
Settings.Global.TRANSITION_ANIMATION_SCALE to transitionAnimationScale,
KEY_LONG_PRESS_TIMEOUT_MILLIS to longPressTimeoutMillis,
)
)
}
Expand All @@ -54,6 +57,11 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
transitionAnimationScale = newTransitionAnimationScale
changed = true
}
val newLongPressTimeout = ViewConfiguration.getLongPressTimeout()
if (longPressTimeoutMillis != newLongPressTimeout) {
longPressTimeoutMillis = newLongPressTimeout
changed = true
}
} catch (e: Exception) {
Log.w(LOG_TAG, "failed to get settings with error=${e.message}", null)
}
Expand Down Expand Up @@ -93,5 +101,8 @@ class SettingsChangeStreamHandler(private val context: Context) : EventChannel.S
companion object {
private val LOG_TAG = LogUtils.createTag<SettingsChangeStreamHandler>()
const val CHANNEL = "deckers.thibault/aves/settings_change"

// cf `Settings.Secure.LONG_PRESS_TIMEOUT`
const val KEY_LONG_PRESS_TIMEOUT_MILLIS = "long_press_timeout"
}
}
1 change: 1 addition & 0 deletions android/app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
<string name="analysis_channel_name">メディアスキャン</string>
<string name="analysis_notification_default_title">メディアをスキャン中</string>
<string name="analysis_notification_action_stop">停止</string>
<string name="map_shortcut_short_label">マップ</string>
</resources>
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/142.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In v1.12.2:
- enjoy the app in Danish
Full changelog available on GitHub
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/14201.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In v1.12.2:
- enjoy the app in Danish
Full changelog available on GitHub
50 changes: 49 additions & 1 deletion lib/l10n/app_cs.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1516,5 +1516,53 @@
"chipActionShowCollection": "Zobrazit ve sbírce",
"@chipActionShowCollection": {},
"mapAttributionOsmData": "Mapová data © [OpenStreetMap](https://www.openstreetmap.org/copyright) přispěvatelé",
"@mapAttributionOsmData": {}
"@mapAttributionOsmData": {},
"videoActionShowNextFrame": "Zobrazit další snímek",
"@videoActionShowNextFrame": {},
"newAlbumDialogAlbumAlreadyExistsHelper": "Album již existuje",
"@newAlbumDialogAlbumAlreadyExistsHelper": {},
"renameProcessorHash": "Hash",
"@renameProcessorHash": {},
"albumTierDynamic": "Dynamické",
"@albumTierDynamic": {},
"collectionActionAddDynamicAlbum": "Přidat dynamické album",
"@collectionActionAddDynamicAlbum": {},
"sortOrderShortestFirst": "Nejkratší první",
"@sortOrderShortestFirst": {},
"sortOrderLongestFirst": "Nejdelší první",
"@sortOrderLongestFirst": {},
"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/)",
"@mapAttributionOpenTopoMap": {},
"collectionActionSetHome": "Nastavit jako domov",
"@collectionActionSetHome": {},
"chipActionRemove": "Odstranit",
"@chipActionRemove": {},
"videoActionShowPreviousFrame": "Zobrazit předchozí snímek",
"@videoActionShowPreviousFrame": {},
"dynamicAlbumAlreadyExists": "Dynamické album již existuje",
"@dynamicAlbumAlreadyExists": {},
"newDynamicAlbumDialogTitle": "Nové dynamické album",
"@newDynamicAlbumDialogTitle": {},
"selectStorageVolumeDialogTitle": "Vybrat úložiště",
"@selectStorageVolumeDialogTitle": {},
"explorerActionSelectStorageVolume": "Vyberte úložiště",
"@explorerActionSelectStorageVolume": {},
"mapStyleOsmLiberty": "OSM Liberty",
"@mapStyleOsmLiberty": {},
"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)",
"@mapAttributionOsmLiberty": {},
"setHomeCustom": "Vlastní",
"@setHomeCustom": {},
"sortByDuration": "Podle trvání",
"@sortByDuration": {},
"chipActionGoToExplorerPage": "Zobrazit v průzkumníku",
"@chipActionGoToExplorerPage": {},
"explorerPageTitle": "Průzkumník",
"@explorerPageTitle": {},
"chipActionDecompose": "Rozdělit",
"@chipActionDecompose": {},
"appExportDynamicAlbums": "Dynamická alba",
"@appExportDynamicAlbums": {},
"mapStyleOpenTopoMap": "OpenTopoMap",
"@mapStyleOpenTopoMap": {}
}
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
"albumTierRegular": "Others",

"coordinateFormatDms": "DMS",
"coordinateFormatDdm": "DDM",
"coordinateFormatDecimal": "Decimal degrees",
"coordinateDms": "{coordinate} {direction}",
"@coordinateDms": {
Expand Down
42 changes: 39 additions & 3 deletions lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@
"@vaultDialogLockModeWhenScreenOff": {},
"newVaultDialogTitle": "新しい保管庫",
"@newVaultDialogTitle": {},
"authenticateToConfigureVault": "保管庫を設定するための認証",
"authenticateToConfigureVault": "認証して保管庫を設定",
"@authenticateToConfigureVault": {},
"vaultDialogLockTypeLabel": "ロックの種類",
"@vaultDialogLockTypeLabel": {},
Expand All @@ -1167,7 +1167,7 @@
"@pinDialogConfirm": {},
"passwordDialogEnter": "パスワードを入力",
"@passwordDialogEnter": {},
"authenticateToUnlockVault": "認証して保管庫のロックを解除する",
"authenticateToUnlockVault": "認証して保管庫を解除",
"@authenticateToUnlockVault": {},
"passwordDialogConfirm": "パスワードの確認",
"@passwordDialogConfirm": {},
Expand Down Expand Up @@ -1360,5 +1360,41 @@
"filterLocatedLabel": "位置情報あり",
"@filterLocatedLabel": {},
"mapAttributionOsmData": "地図データ © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors",
"@mapAttributionOsmData": {}
"@mapAttributionOsmData": {},
"sortByDuration": "期間順",
"@sortByDuration": {},
"explorerActionSelectStorageVolume": "ストレージを選択",
"@explorerActionSelectStorageVolume": {},
"newAlbumDialogAlbumAlreadyExistsHelper": "アルバムはすでに存在します",
"@newAlbumDialogAlbumAlreadyExistsHelper": {},
"videoActionShowPreviousFrame": "前のフレームを表示",
"@videoActionShowPreviousFrame": {},
"videoActionShowNextFrame": "次のフレームを表示",
"@videoActionShowNextFrame": {},
"albumTierDynamic": "ダイナミック",
"@albumTierDynamic": {},
"dynamicAlbumAlreadyExists": "ダイナミックアルバムはすでに存在します",
"@dynamicAlbumAlreadyExists": {},
"stateEmpty": "州なし",
"@stateEmpty": {},
"appExportDynamicAlbums": "ダイナミックアルバム",
"@appExportDynamicAlbums": {},
"chipActionRemove": "削除",
"@chipActionRemove": {},
"newDynamicAlbumDialogTitle": "新規ダイナミックアルバム",
"@newDynamicAlbumDialogTitle": {},
"setHomeCustom": "カスタム",
"@setHomeCustom": {},
"mapStyleOsmLiberty": "OSM Liberty",
"@mapStyleOsmLiberty": {},
"mapStyleOpenTopoMap": "OpenTopoMap",
"@mapStyleOpenTopoMap": {},
"selectStorageVolumeDialogTitle": "ストレージを選択",
"@selectStorageVolumeDialogTitle": {},
"sortOrderShortestFirst": "短いものから表示",
"@sortOrderShortestFirst": {},
"sortOrderLongestFirst": "長いものから表示",
"@sortOrderLongestFirst": {},
"collectionActionAddDynamicAlbum": "ダイナミックアルバムを追加",
"@collectionActionAddDynamicAlbum": {}
}
4 changes: 3 additions & 1 deletion lib/l10n/app_sk.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1562,5 +1562,7 @@
"newDynamicAlbumDialogTitle": "Nový dynamický album",
"@newDynamicAlbumDialogTitle": {},
"dynamicAlbumAlreadyExists": "Dynamický album už existuje",
"@dynamicAlbumAlreadyExists": {}
"@dynamicAlbumAlreadyExists": {},
"chipActionDecompose": "Rozdeliť",
"@chipActionDecompose": {}
}
5 changes: 0 additions & 5 deletions lib/model/app/dependencies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ class Dependencies {
licenseUrl: 'https://github.com/material-foundation/flutter-packages/blob/main/packages/dynamic_color/LICENSE',
sourceUrl: 'https://github.com/material-foundation/flutter-packages/tree/main/packages/dynamic_color',
),
Dependency(
name: 'FFmpegKit (Aves fork)',
license: lgpl3,
sourceUrl: 'https://github.com/deckerst/ffmpeg-kit',
),
Dependency(
name: 'Floating',
license: mit,
Expand Down
1 change: 1 addition & 0 deletions lib/model/entry/entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ class AvesEntry with AvesEntryBase {

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

bool get isCatalogued => _catalogMetadata != null;
Expand Down
18 changes: 17 additions & 1 deletion lib/model/entry/extensions/info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:aves/ref/mime_types.dart';
import 'package:aves/services/common/services.dart';
import 'package:aves/services/metadata/svg_metadata_service.dart';
import 'package:aves/theme/colors.dart';
import 'package:aves/theme/format.dart';
import 'package:aves/theme/text.dart';
import 'package:aves/widgets/viewer/info/metadata/metadata_dir.dart';
import 'package:aves_model/aves_model.dart';
Expand Down Expand Up @@ -82,6 +83,21 @@ extension ExtraAvesEntryInfo on AvesEntry {
directories.add(MetadataDirectory(MetadataDirectory.mediaDirectory, _toSortedTags(formattedMediaTags)));
}

if (mediaInfo.containsKey(Keys.chapters)) {
final allChapters = (mediaInfo.remove(Keys.chapters) as List).cast<Map>();
if (allChapters.isNotEmpty) {
allChapters.sortBy((v) => v[Keys.time] as num? ?? 0);

final chapterTags = SplayTreeMap.of(Map.fromEntries(allChapters.mapIndexed((i, chapter) {
final chapterNumber = i + 1;
final time = Duration(seconds: (chapter[Keys.time] as num? ?? 0).round());
final title = chapter[Keys.title] as String? ?? 'Chapter $chapterNumber';
return MapEntry('$chapterNumber${AText.separator}${formatFriendlyDuration(time)}', title);
})), compareNatural);
directories.add(MetadataDirectory('Chapters', chapterTags));
}
}

if (mediaInfo.containsKey(Keys.streams)) {
String getTypeText(Map stream) {
final type = stream[Keys.streamType] ?? MediaStreamTypes.unknown;
Expand All @@ -96,7 +112,7 @@ extension ExtraAvesEntryInfo on AvesEntry {
case MediaStreamTypes.timedText:
return 'Text';
case MediaStreamTypes.video:
return stream.containsKey(Keys.fpsDen) ? 'Video' : 'Image';
return stream.containsKey(Keys.fpsDen) || stream.containsKey(Keys.fps) ? 'Video' : 'Image';
case MediaStreamTypes.unknown:
default:
return 'Unknown';
Expand Down
15 changes: 9 additions & 6 deletions lib/model/filters/coordinate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ class CoordinateFilter extends CollectionFilter {

@override
String getLabel(BuildContext context) {
return _formatBounds((latLng) => settings.coordinateFormat.format(
context,
latLng,
minuteSecondPadding: minuteSecondPadding,
dmsSecondDecimals: 0,
));
return _formatBounds((latLng) {
final format = settings.coordinateFormat;
return format.format(
context,
latLng,
minuteSecondPadding: minuteSecondPadding,
dmsSecondDecimals: format == CoordinateFormat.ddm ? 2 : 0,
);
});
}

@override
Expand Down
Loading

0 comments on commit 94ad4c0

Please sign in to comment.