fixed handling of program numbers for deleted channels:

- after loading a list it is now ensures that if IsDeleted => OldProgramNr =-1 and for fixing bad files: if OldProgramNr == -1 => IsDeleted = true
- while saving a list, if NewProgramNr == -1, the channel will be set to IsDeleted=true and temporarily gets a sequential NewProgramNr assigned, so that no "-1" or duplicate numbers end up in the file. Afterwards for deleted channels the NewProgramNr will be set back to -1.
- GlobalClone files now set IsDeleted and IsDisabled if a channel was removed
This commit is contained in:
hbeham
2017-11-30 14:50:22 +01:00
parent eb8d8a9fb7
commit 6379920331
7 changed files with 80 additions and 32 deletions

View File

@@ -65,6 +65,7 @@ namespace ChanSort.Api
int deleted = 0;
int hidden = 0;
int skipped = 0;
int locked = 0;
foreach (var channel in list.Channels)
{
if (channel.IsDeleted)
@@ -73,10 +74,13 @@ namespace ChanSort.Api
++hidden;
if (channel.Skip)
++skipped;
if (channel.Lock)
++locked;
}
sb.Append("number of deleted channels: ").AppendLine(deleted.ToString());
sb.Append("number of hidden channels: ").AppendLine(hidden.ToString());
sb.Append("number of skipped channels: ").AppendLine(skipped.ToString());
sb.Append("number of locked channels: ").AppendLine(locked.ToString());
sb.AppendLine();
}
return sb.ToString();