Revised remote manifest updates

This commit is contained in:
MikeMaximus
2018-03-03 20:04:59 -06:00
parent 9a024349f5
commit 9907565145
3 changed files with 13 additions and 19 deletions
+5 -3
View File
@@ -48,10 +48,12 @@ Public Class mgrBackup
oItem.CheckSum = sCheckSum oItem.CheckSum = sCheckSum
'Save Remote Manifest 'Save Remote Manifest
If mgrManifest.DoSpecificManifestCheck(oItem, mgrSQLite.Database.Remote) Then If Not oGameInfo.AppendTimeStamp Then
mgrManifest.DoManifestUpdateByManifestID(oItem, mgrSQLite.Database.Remote) If Not mgrManifest.DoUpdateLatestManifest(oItem, mgrSQLite.Database.Remote) Then
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
End If
Else Else
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote) mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
End If End If
'Save Local Manifest 'Save Local Manifest
+8 -11
View File
@@ -114,25 +114,22 @@
Return oBackupItem Return oBackupItem
End Function End Function
'This should only be used to update specific entries in the remote manifest Public Shared Function DoUpdateLatestManifest(ByRef oItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database) As Boolean
Public Shared Function DoSpecificManifestCheck(ByRef oItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database) As Boolean
Dim oDatabase As New mgrSQLite(iSelectDB) Dim oDatabase As New mgrSQLite(iSelectDB)
Dim oData As DataSet Dim oData As Object
Dim sSQL As String Dim sSQL As String
Dim hshParams As New Hashtable Dim hshParams As New Hashtable
sSQL = "SELECT * FROM manifest NATURAL JOIN monitorlist " sSQL = "SELECT ManifestID FROM manifest NATURAL JOIN monitorlist "
sSQL &= "WHERE MonitorID = @MonitorID AND FileName = @FileName" sSQL &= "WHERE MonitorID = @MonitorID ORDER BY DateUpdated DESC LIMIT 1"
hshParams.Add("MonitorID", oItem.MonitorID) hshParams.Add("MonitorID", oItem.MonitorID)
hshParams.Add("FileName", oItem.FileName)
oData = oDatabase.ReadParamData(sSQL, hshParams) oData = oDatabase.ReadSingleValue(sSQL, hshParams)
If oData.Tables(0).Rows.Count > 0 Then If Not oData Is Nothing Then
For Each dr As DataRow In oData.Tables(0).Rows oItem.ManifestID = CStr(oData)
oItem.ManifestID = CStr(dr("ManifestID")) DoManifestUpdateByManifestID(oItem, mgrSQLite.Database.Remote)
Next
Return True Return True
Else Else
Return False Return False
-5
View File
@@ -43,9 +43,4 @@ Linux Only:
- Mono style notifications will be displayed if notify-send is not available. - Mono style notifications will be displayed if notify-send is not available.
- The GBM icon will be displayed on notifications if it's been installed to the correct location (via makefile or deb). - The GBM icon will be displayed on notifications if it's been installed to the correct location (via makefile or deb).
Known Issues:
- After upgrading to v1.1.0, backup manifest entries and files created with prior versions are not overwritten when a new backup is created.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html