fix: Sync leaving left over temp files (#73)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-10-25 18:58:44 +02:00 committed by GitHub
parent c5e39db9ec
commit 8d15e319d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 644 additions and 406 deletions

View file

@ -17,6 +17,7 @@ final _privateConstructorUsedError = UnsupportedError(
/// @nodoc
mixin _$SyncedItem {
String get id => throw _privateConstructorUsedError;
bool get syncing => throw _privateConstructorUsedError;
String? get parentId => throw _privateConstructorUsedError;
String get userId => throw _privateConstructorUsedError;
String? get path => throw _privateConstructorUsedError;
@ -48,6 +49,7 @@ abstract class $SyncedItemCopyWith<$Res> {
@useResult
$Res call(
{String id,
bool syncing,
String? parentId,
String userId,
String? path,
@ -82,6 +84,7 @@ class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
@override
$Res call({
Object? id = null,
Object? syncing = null,
Object? parentId = freezed,
Object? userId = null,
Object? path = freezed,
@ -101,6 +104,10 @@ class _$SyncedItemCopyWithImpl<$Res, $Val extends SyncedItem>
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
syncing: null == syncing
? _value.syncing
: syncing // ignore: cast_nullable_to_non_nullable
as bool,
parentId: freezed == parentId
? _value.parentId
: parentId // ignore: cast_nullable_to_non_nullable
@ -195,6 +202,7 @@ abstract class _$$SyncItemImplCopyWith<$Res>
@useResult
$Res call(
{String id,
bool syncing,
String? parentId,
String userId,
String? path,
@ -229,6 +237,7 @@ class __$$SyncItemImplCopyWithImpl<$Res>
@override
$Res call({
Object? id = null,
Object? syncing = null,
Object? parentId = freezed,
Object? userId = null,
Object? path = freezed,
@ -248,6 +257,10 @@ class __$$SyncItemImplCopyWithImpl<$Res>
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
syncing: null == syncing
? _value.syncing
: syncing // ignore: cast_nullable_to_non_nullable
as bool,
parentId: freezed == parentId
? _value.parentId
: parentId // ignore: cast_nullable_to_non_nullable
@ -309,6 +322,7 @@ class __$$SyncItemImplCopyWithImpl<$Res>
class _$SyncItemImpl extends _SyncItem {
_$SyncItemImpl(
{required this.id,
this.syncing = false,
this.parentId,
required this.userId,
this.path,
@ -329,6 +343,9 @@ class _$SyncItemImpl extends _SyncItem {
@override
final String id;
@override
@JsonKey()
final bool syncing;
@override
final String? parentId;
@override
final String userId;
@ -373,7 +390,7 @@ class _$SyncItemImpl extends _SyncItem {
@override
String toString() {
return 'SyncedItem(id: $id, parentId: $parentId, userId: $userId, path: $path, markedForDelete: $markedForDelete, sortName: $sortName, fileSize: $fileSize, videoFileName: $videoFileName, introOutSkipModel: $introOutSkipModel, fTrickPlayModel: $fTrickPlayModel, fImages: $fImages, fChapters: $fChapters, subtitles: $subtitles, userData: $userData)';
return 'SyncedItem(id: $id, syncing: $syncing, parentId: $parentId, userId: $userId, path: $path, markedForDelete: $markedForDelete, sortName: $sortName, fileSize: $fileSize, videoFileName: $videoFileName, introOutSkipModel: $introOutSkipModel, fTrickPlayModel: $fTrickPlayModel, fImages: $fImages, fChapters: $fChapters, subtitles: $subtitles, userData: $userData)';
}
@override
@ -382,6 +399,7 @@ class _$SyncItemImpl extends _SyncItem {
(other.runtimeType == runtimeType &&
other is _$SyncItemImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.syncing, syncing) || other.syncing == syncing) &&
(identical(other.parentId, parentId) ||
other.parentId == parentId) &&
(identical(other.userId, userId) || other.userId == userId) &&
@ -411,6 +429,7 @@ class _$SyncItemImpl extends _SyncItem {
int get hashCode => Object.hash(
runtimeType,
id,
syncing,
parentId,
userId,
path,
@ -437,6 +456,7 @@ class _$SyncItemImpl extends _SyncItem {
abstract class _SyncItem extends SyncedItem {
factory _SyncItem(
{required final String id,
final bool syncing,
final String? parentId,
required final String userId,
final String? path,
@ -455,6 +475,8 @@ abstract class _SyncItem extends SyncedItem {
@override
String get id;
@override
bool get syncing;
@override
String? get parentId;
@override
String get userId;