Skip to content

Commit

Permalink
Doubled the number of Virtual Tags.
Browse files Browse the repository at this point in the history
Removed the capacity of adding virtual tags to another in the UI.
  • Loading branch information
maforget committed Aug 6, 2024
1 parent 51f56e9 commit 47f6adb
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 20 deletions.
29 changes: 10 additions & 19 deletions ComicRack.Engine/ComicBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1651,35 +1651,26 @@ private void ClearVirtualTagsCache()
CachedVirtualTags.Clear();
}

[Browsable(true)]
public string VirtualTag01 => GetVirtualTagValue(1);

[Browsable(true)]
public string VirtualTag02 => GetVirtualTagValue(2);

[Browsable(true)]
public string VirtualTag03 => GetVirtualTagValue(3);

[Browsable(true)]
public string VirtualTag04 => GetVirtualTagValue(4);

[Browsable(true)]
public string VirtualTag05 => GetVirtualTagValue(5);

[Browsable(true)]
public string VirtualTag06 => GetVirtualTagValue(6);

[Browsable(true)]
public string VirtualTag07 => GetVirtualTagValue(7);

[Browsable(true)]
public string VirtualTag08 => GetVirtualTagValue(8);

[Browsable(true)]
public string VirtualTag09 => GetVirtualTagValue(9);

[Browsable(true)]
public string VirtualTag10 => GetVirtualTagValue(10);
public string VirtualTag11 => GetVirtualTagValue(11);
public string VirtualTag12 => GetVirtualTagValue(12);
public string VirtualTag13 => GetVirtualTagValue(13);
public string VirtualTag14 => GetVirtualTagValue(14);
public string VirtualTag15 => GetVirtualTagValue(15);
public string VirtualTag16 => GetVirtualTagValue(16);
public string VirtualTag17 => GetVirtualTagValue(17);
public string VirtualTag18 => GetVirtualTagValue(18);
public string VirtualTag19 => GetVirtualTagValue(19);
public string VirtualTag20 => GetVirtualTagValue(20);

static ComicBook()
{
Expand Down
110 changes: 110 additions & 0 deletions ComicRack.Engine/Metadata/VirtualTags/ComicBookVirtualTagMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,114 @@ protected override string GetValue(ComicBook comicBook)
return comicBook.VirtualTag10;
}
}

[Serializable]
[Description("Virtual Tags #11")]
[ComicBookMatcherHint("VirtualTag11")]
public class ComicBookVirtualTag11Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag11;
}
}

[Serializable]
[Description("Virtual Tags #12")]
[ComicBookMatcherHint("VirtualTag12")]
public class ComicBookVirtualTag12Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag12;
}
}

[Serializable]
[Description("Virtual Tags #13")]
[ComicBookMatcherHint("VirtualTag13")]
public class ComicBookVirtualTag13Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag13;
}
}

[Serializable]
[Description("Virtual Tags #14")]
[ComicBookMatcherHint("VirtualTag14")]
public class ComicBookVirtualTag14Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag14;
}
}

[Serializable]
[Description("Virtual Tags #15")]
[ComicBookMatcherHint("VirtualTag15")]
public class ComicBookVirtualTag15Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag15;
}
}

[Serializable]
[Description("Virtual Tags #16")]
[ComicBookMatcherHint("VirtualTag16")]
public class ComicBookVirtualTag16Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag16;
}
}

[Serializable]
[Description("Virtual Tags #17")]
[ComicBookMatcherHint("VirtualTag17")]
public class ComicBookVirtualTag17Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag17;
}
}

[Serializable]
[Description("Virtual Tags #18")]
[ComicBookMatcherHint("VirtualTag18")]
public class ComicBookVirtualTag18Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag18;
}
}

[Serializable]
[Description("Virtual Tags #19")]
[ComicBookMatcherHint("VirtualTag19")]
public class ComicBookVirtualTag19Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag19;
}
}

[Serializable]
[Description("Virtual Tags #20")]
[ComicBookMatcherHint("VirtualTag20")]
public class ComicBookVirtualTag20Matcher : ComicBookVirtualTagMatcher
{
protected override string GetValue(ComicBook comicBook)
{
return comicBook.VirtualTag20;
}
}
}
2 changes: 1 addition & 1 deletion ComicRack/Dialogs/PreferencesDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ private void AddVirtualTags()
{
var VirtualTags = new List<VirtualTag>();

for (int id = 1; id <= 10; id++)
for (int id = 1; id <= 20; id++)
{
VirtualTag vtag = Program.Settings.VirtualTags.FirstOrDefault(x => x.ID == id);

Expand Down

0 comments on commit 47f6adb

Please sign in to comment.