mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-06 14:57:13 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user