Closed RogueBurger closed 1 month ago
The list of value shown have the spaces trimmed, so when you select it it doesn't match since you selected "Space Ghost" and only "Space Ghost " exists. And both aren't the same. The reason you have to go to import a book, is only because the Info dialog will automatically trim spaces. But the same could be reproduced via a plugin like Data Manager for example or external programs.
What are you expecting has a resolution?
ComicInfo.xml
:
In the end it's a data error, and I can see the problem. You have 1 entry and you select it it should show it. So the solution that has the least impact would be point 2. It would add multiple times the same entry if for example only 1 entry as extra spaces.
N.B. A quick fix is to run a data manager rule to trim the spaces.
I noticed that if you go to edit the Series name in ComicRack, and you put a trailing space in there, the system automatically trims it when you save. So because CR already doesn't let you put trailing spaces in the series, I feel like option number 1 best fits that by just nipping it in the bud on import.
Ultimately, though, I think any of those three solutions would work just fine. I'm concerned way less about the data itself, and more with the confusion caused by clicking a series filter and having nothing show up.
It seems logical to be number 1, but it isn't that easy to do. There are no real built-in way for that.
This is just the code that is used to read the ComicInfo.xml
.
return XmlUtility.GetSerializer<ComicInfo>().Deserialize(inStream) as ComicInfo;
Changing that we would need to go through all the books and all the values to trim them all. This would be expensive. And it would be possible that the space was added by a plugin, then you need to do the same for exporting the file. Then maybe there are values that are already like that in someone DB, then I need to do it for the DB also.
It's one thing to prevent the data from doing that, but we can't prevent all the cases. And like I stated, it's just data. If the data is wrong we can't help it.
I just had a though of what a simple solution would be. It would not add possible duplicates and still work correctly by changing the smart list used when filtering to a regex instead of an equal. When filtering multiple values field it already does that with a list contains that will ignore spaces. So this would not change how smart list work and would prevent duplicates and still match them.
As #104 shows, the regex option doesn't exists on number fields. I will just show the options in the search browser to be exactly what they are, so if 1 entry has multiple variations of spaces they will all be shown.
Describe the bug If a comic has a ComicInfo.xml file with a trailing space in the Series field (e.g.
<Series>Foo Bar </Series>
), the comic does not filter correctly in the ComicRack UI after import.Exact Steps to Reproduce Steps to reproduce the behavior:
Screenshots
Version/Commit (check the about page, next to the version, for the string between brackets):
Additional context Editing the Series name to remove the trailing space, either in the ComicInfo file itself or via ComicRack does fix the issue.