Work with video
This commit is contained in:
@ -84,7 +84,7 @@ internal abstract class RelationLogic
|
||||
return new(results);
|
||||
}
|
||||
|
||||
private static ReadOnlyDictionary<string, string> MoveFiles(Configuration configuration, string key, bool isCounterPersonYear, string? displayDirectoryName, ReadOnlyCollection<RelationContainer> relationContainers, List<string> linked1, List<string> linked2, List<string> linked3, List<string> linked4, List<string> linked5, List<string> linked6, List<string> linked7, List<string> linked8, List<string> linked9)
|
||||
private static ReadOnlyDictionary<string, string> MoveFiles(Configuration configuration, string key, bool isCounterPersonYear, string? displayDirectoryName, ReadOnlyCollection<RelationContainer> relationContainers, List<List<string>> linked)
|
||||
{
|
||||
Dictionary<string, string> results = [];
|
||||
string value;
|
||||
@ -105,23 +105,55 @@ internal abstract class RelationLogic
|
||||
maybeTicksDirectoryName = Path.GetFileName(personKeyFormattedDirectory);
|
||||
if (string.IsNullOrEmpty(personNameDirectory) || string.IsNullOrEmpty(yearDirectory) || string.IsNullOrEmpty(personKeyFormattedDirectory) || string.IsNullOrEmpty(personNameDirectoryName))
|
||||
continue;
|
||||
if (linked9.Contains(fileHolder.FullName))
|
||||
if (linked[24].Contains(fileHolder.FullName))
|
||||
value = "ZZZ";
|
||||
else if (linked[23].Contains(fileHolder.FullName))
|
||||
value = "YYY";
|
||||
else if (linked[22].Contains(fileHolder.FullName))
|
||||
value = "XXX";
|
||||
else if (linked[21].Contains(fileHolder.FullName))
|
||||
value = "WWW";
|
||||
else if (linked[20].Contains(fileHolder.FullName))
|
||||
value = "VVV";
|
||||
else if (linked[19].Contains(fileHolder.FullName))
|
||||
value = "UUU";
|
||||
else if (linked[18].Contains(fileHolder.FullName))
|
||||
value = "TTT";
|
||||
else if (linked[17].Contains(fileHolder.FullName))
|
||||
value = "SSS";
|
||||
else if (linked[16].Contains(fileHolder.FullName))
|
||||
value = "RRR";
|
||||
else if (linked[15].Contains(fileHolder.FullName))
|
||||
value = "QQQ";
|
||||
else if (linked[14].Contains(fileHolder.FullName))
|
||||
value = "PPP";
|
||||
else if (linked[13].Contains(fileHolder.FullName))
|
||||
value = "OOO";
|
||||
else if (linked[12].Contains(fileHolder.FullName))
|
||||
value = "NNN";
|
||||
else if (linked[11].Contains(fileHolder.FullName))
|
||||
value = "MMM";
|
||||
else if (linked[10].Contains(fileHolder.FullName))
|
||||
value = "LLL";
|
||||
else if (linked[9].Contains(fileHolder.FullName))
|
||||
value = "KKK";
|
||||
else if (linked[8].Contains(fileHolder.FullName))
|
||||
value = "JJJ";
|
||||
else if (linked8.Contains(fileHolder.FullName))
|
||||
else if (linked[7].Contains(fileHolder.FullName))
|
||||
value = "III";
|
||||
else if (linked7.Contains(fileHolder.FullName))
|
||||
else if (linked[6].Contains(fileHolder.FullName))
|
||||
value = "HHH";
|
||||
else if (linked6.Contains(fileHolder.FullName))
|
||||
else if (linked[5].Contains(fileHolder.FullName))
|
||||
value = "GGG";
|
||||
else if (linked5.Contains(fileHolder.FullName))
|
||||
else if (linked[4].Contains(fileHolder.FullName))
|
||||
value = "FFF";
|
||||
else if (linked4.Contains(fileHolder.FullName))
|
||||
else if (linked[3].Contains(fileHolder.FullName))
|
||||
value = "EEE";
|
||||
else if (linked3.Contains(fileHolder.FullName))
|
||||
else if (linked[2].Contains(fileHolder.FullName))
|
||||
value = "DDD";
|
||||
else if (linked2.Contains(fileHolder.FullName))
|
||||
else if (linked[1].Contains(fileHolder.FullName))
|
||||
value = "CCC";
|
||||
else if (linked1.Contains(fileHolder.FullName))
|
||||
else if (linked[0].Contains(fileHolder.FullName))
|
||||
value = "BBB";
|
||||
else
|
||||
value = "AAA";
|
||||
@ -231,67 +263,24 @@ internal abstract class RelationLogic
|
||||
private static ReadOnlyDictionary<string, string> GetMoveFiles(Configuration configuration, string key, int take, bool isCounterPersonYear, string? displayDirectoryName, ReadOnlyCollection<RelationContainer> relationContainers)
|
||||
{
|
||||
ReadOnlyDictionary<string, string> results;
|
||||
List<string> linked1 = [];
|
||||
List<string> linked2 = [];
|
||||
List<string> linked3 = [];
|
||||
List<string> linked4 = [];
|
||||
List<string> linked5 = [];
|
||||
List<string> linked6 = [];
|
||||
List<string> linked7 = [];
|
||||
List<string> linked8 = [];
|
||||
List<string> linked9 = [];
|
||||
List<List<string>> linked = [];
|
||||
for (int i = 0; i < 25; i++)
|
||||
linked.Add([]);
|
||||
foreach ((FileHolder fileHolder, ReadOnlyCollection<Relation> relations) in relationContainers)
|
||||
{
|
||||
foreach (Relation relation in relations.Take(take))
|
||||
{
|
||||
if (!linked1.Contains(relation.File))
|
||||
for (int i = 0; i < 25; i++)
|
||||
{
|
||||
linked1.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked2.Contains(relation.File))
|
||||
{
|
||||
linked2.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked3.Contains(relation.File))
|
||||
{
|
||||
linked3.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked4.Contains(relation.File))
|
||||
{
|
||||
linked4.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked5.Contains(relation.File))
|
||||
{
|
||||
linked5.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked6.Contains(relation.File))
|
||||
{
|
||||
linked6.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked7.Contains(relation.File))
|
||||
{
|
||||
linked7.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked8.Contains(relation.File))
|
||||
{
|
||||
linked8.Add(relation.File);
|
||||
continue;
|
||||
}
|
||||
if (!linked9.Contains(relation.File))
|
||||
{
|
||||
linked9.Add(relation.File);
|
||||
continue;
|
||||
if (!linked[i].Contains(relation.File))
|
||||
{
|
||||
linked[i].Add(relation.File);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
results = MoveFiles(configuration, key, isCounterPersonYear, displayDirectoryName, relationContainers, linked1, linked2, linked3, linked4, linked5, linked6, linked7, linked8, linked9);
|
||||
results = MoveFiles(configuration, key, isCounterPersonYear, displayDirectoryName, relationContainers, linked);
|
||||
return results;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user