mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-06 18:37:32 +02:00
2021-05-01
- added "Settings / Reset to defaults and restart" function to delete the stored customized settings in case something went wrong (like massively oversized column widths) - Philips ChannelMap\_30: fixed error when trying to save this type of list - Upgraded to DevExpress WinForms 20.2.7 user interface library
This commit is contained in:
@@ -340,31 +340,26 @@ left outer join Lcn l on l.ServiceId=fi.ServiceId and l.FavoriteId=fi.FavoriteId
|
||||
if (tvOutputFile != FileName)
|
||||
File.Copy(FileName, tvOutputFile, true);
|
||||
|
||||
using (var conn = new SqliteConnection("Data Source=" + tvOutputFile))
|
||||
using var conn = new SqliteConnection("Data Source=" + tvOutputFile);
|
||||
conn.Open();
|
||||
using var trans = conn.BeginTransaction();
|
||||
using var cmd = conn.CreateCommand();
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
using (var trans = conn.BeginTransaction())
|
||||
using (var cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.Transaction = trans;
|
||||
try
|
||||
{
|
||||
#if !LOCK_LCN_LISTS
|
||||
ResetLcn(cmd);
|
||||
#endif
|
||||
UpdateServices(cmd);
|
||||
UpdatePhysicalChannelLists(cmd);
|
||||
UpdateUserFavoriteLists(cmd);
|
||||
UpdateServices(cmd);
|
||||
UpdatePhysicalChannelLists(cmd);
|
||||
UpdateUserFavoriteLists(cmd);
|
||||
|
||||
trans.Commit();
|
||||
FileName = tvOutputFile;
|
||||
}
|
||||
catch
|
||||
{
|
||||
trans.Rollback();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
trans.Commit();
|
||||
FileName = tvOutputFile;
|
||||
}
|
||||
catch
|
||||
{
|
||||
trans.Rollback();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user