fix: Sync basename parsing for different hosts (#583)

This commit is contained in:
Benjamin Stern 2025-11-09 11:15:28 +02:00 committed by GitHub
parent 2f7328c954
commit 52c12e63b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View file

@ -3,6 +3,7 @@ import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:fladder/util/string_extensions.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart' hide ConnectionState;
@ -620,11 +621,11 @@ extension SyncNotifierHelpers on SyncNotifier {
if (parent == null) {
await _db.insertItem(syncItem);
}
return syncItem.copyWith(
fileSize: response.mediaSources?.firstOrNull?.size ?? 0,
syncing: false,
videoFileName: response.path?.split('/').lastOrNull ?? "",
videoFileName: response.path?.universalBasename ?? "",
);
}