[chronojump] Delete session now deletes the videos
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Delete session now deletes the videos
- Date: Sat, 10 Oct 2020 20:57:11 +0000 (UTC)
commit c45f3b8e5fc223cbf55b92646761ef397d66ed19
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Oct 10 22:55:06 2020 +0200
Delete session now deletes the videos
src/sqlite/session.cs | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index bacc63e7..e84e9570 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -1133,7 +1133,19 @@ class SqliteSession : Sqlite
Util.FileDelete(file.Name);
}
- //TODO: delete multimedia stuff of persons that have to be deleted, eg. on export: persons
that are not in session (just for privacity)
+ // <----- delete runEncoder end
+
+ // 7) delete videos
+ //on export we only want to delete SQL stuff, because files of other sessions will not be
copied
+ if(! export)
+ {
+ folderSession = new System.IO.DirectoryInfo(
+ Util.GetVideoSessionDir (Convert.ToInt32(sessionID)));
+
+ if(folderSession.Exists)
+ foreach (FileInfo file in folderSession.GetFiles())
+ Util.FileDelete(file.Name);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]