diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-26 19:40:15 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-26 19:40:15 -0500 |
| commit | 921ec9cd11b71171cb69fa538e9d1ec1f2ffbbd5 (patch) | |
| tree | 779a1bee9f1e8e4b1a715657f4cd3184b18945ba /Emby.Server.Implementations/Sync/SyncRepository.cs | |
| parent | d54c11fb747e3cf0369ddade42c93d7e795f5a4f (diff) | |
save additional info to recording nfo's
Diffstat (limited to 'Emby.Server.Implementations/Sync/SyncRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Sync/SyncRepository.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Sync/SyncRepository.cs b/Emby.Server.Implementations/Sync/SyncRepository.cs index d8bec1ce3..8cce7a8bf 100644 --- a/Emby.Server.Implementations/Sync/SyncRepository.cs +++ b/Emby.Server.Implementations/Sync/SyncRepository.cs @@ -229,7 +229,6 @@ namespace Emby.Server.Implementations.Sync commandText = "update SyncJobs set TargetId=?,Name=?,Profile=?,Quality=?,Bitrate=?,Status=?,Progress=?,UserId=?,ItemIds=?,Category=?,ParentId=?,UnwatchedOnly=?,ItemLimit=?,SyncNewContent=?,DateCreated=?,DateLastModified=?,ItemCount=? where Id=?"; } - paramList.Add(job.Id.ToGuidParamValue()); paramList.Add(job.TargetId); paramList.Add(job.Name); paramList.Add(job.Profile); @@ -249,6 +248,15 @@ namespace Emby.Server.Implementations.Sync paramList.Add(job.DateLastModified.ToDateTimeParamValue()); paramList.Add(job.ItemCount); + if (insert) + { + paramList.Insert(0, job.Id.ToGuidParamValue()); + } + else + { + paramList.Add(job.Id.ToGuidParamValue()); + } + connection.RunInTransaction(conn => { conn.Execute(commandText, paramList.ToArray()); @@ -698,7 +706,6 @@ namespace Emby.Server.Implementations.Sync } var paramList = new List<object>(); - paramList.Add(jobItem.Id.ToGuidParamValue()); paramList.Add(jobItem.ItemId); paramList.Add(jobItem.ItemName); paramList.Add(jobItem.MediaSourceId); @@ -716,6 +723,15 @@ namespace Emby.Server.Implementations.Sync paramList.Add(jobItem.JobItemIndex); paramList.Add(jobItem.ItemDateModifiedTicks); + if (insert) + { + paramList.Insert(0, jobItem.Id.ToGuidParamValue()); + } + else + { + paramList.Add(jobItem.Id.ToGuidParamValue()); + } + connection.RunInTransaction(conn => { conn.Execute(commandText, paramList.ToArray()); |
