Not really a bug or a feature request, but putting this in here by request. Hopefully can spitball some solutions.
First, the caveats:
-No editing of book files (CBR/CBZ/etc) allowed. This includes renaming, embedding meta, etc. Moving of files to different folders/paths is fine, but the file itself remains untouched (same filename and hash).
-This whole thing is related to static Lists, not SmartLists: SmartLists solve the problem, but come with their own quirks and issues, and are outside scope
-This is a deliberatly obtuse edge case example to illustrate the behaviour in question
-Personally, I don't use add-ons like Database Manager or Library Organizer, so I don't know if/how they approach problems like this. Maybe there's already a solution out there for this.
-In my case I'm using an SQL database, so there's a little bit more fragmentation involved.
Situation:
Let's say we have a series/volume: we'll call it SERIES X. It's a 6-issue run, sorted into a watched folder that matches the series name. Example filenames:
Series X [V2020]/Series X - 01 (Digital) (Scanner).cbz
Series X [V2020]/Series X - 02 (Digital) (Scanner).cbz
Etc
In CRCE, these books have been added to the library via the scanning/watched folder process (so assigned GUID's) and metadata tagged via ComicVine. For the sake of example, let's also say the GUID's are sequential, so Issue 1 is ID1, Issue 2 is ID2, etc.
The books are also added to Lists (Static/Dumb List, not SmartList).
-Issues 1-12 are in a List corresponding to the Volume: Series X [V2020]
-Issues 2-4 are also part of a crossover/event, so are on another List for that event: Event Y [2019]
-All 6 issues are also on a List for a reading order for the universe as a whole: Publisher Z Chronological
So let's break that all down: <Series #> (<lists it's included on>) <GUID>
Series X 1 (Series X [V2020], Publisher Z Chronological) <ID1>
Series X 2 (Series X [V2020], Publisher Z Chronological, Event Y [2019]) <ID2>
Series X 3 (Series X [V2020], Publisher Z Chronological, Event Y [2019]) <ID3>
Series X 4 (Series X [V2020], Publisher Z Chronological, Event Y [2019]) <ID4>
Series X 5 (Series X [V2020], Publisher Z Chronological <ID5>
Series X 6 (Series X [V2020], Publisher Z Chronological <ID6>
As these are all static lists, they're held in ComicDB.xml as just a list of GUIDs: no other reference point.
Now, say we get a new file: a fixed version of Issue 2. It has filename Series X - 02 (Digital) (Fixed) (Scanner).cbz, and we want to replace the original.
So you (or some utility like Library Organizer):
-Go into the folder: Series X [V2020]
-Delete the original file: Series X - 02 (Digital) (Scanner).cbz
-Paste in the new Fixed file: Series X - 02 (Digital) (Fixed) (Scanner).cbz
On the next scan, the new file is added to the library and assigned a GUID (let's say ID50). This step could be done before or after the actual file move, doesn't matter.
Upon loading any of the lists that contained the previous file, it'll show as FILE NOT FOUND. If you want to update the book in each of those lists, you can:
(A) Identify which lists the original file was in: right-click>Show In List, then drag-and-drop the new book from the library into those lists and do whatever sorting/organizing you need to.
(B) Hacky option: use the Change File Link script to point ID2 to the new file
Option (A) could be time-consuming (depending on the number of Lists it's contained in) and still requires fiddling with order if you have a custom sort, but would fully replace the old file with the new one.
Option (B) just replaces the file across all Lists (sorcery), but the problem is that both ID2 and ID50 both still exist in the database: they're just pointing to the same file.
You could remove ID2 from the Library, but would also remove the book from Lists, defeating the purpose.
You could remove ID50, but it would re-add to the library on the next scan unless you have the 'Files manually removed from the Library will not be added again' option enabled in the scan settings, which you might not want for whatever reason.
Now, as to possible solutions.
The most direct one I can think of is literally just a find->replace of the GUID in ComicDB.xml. This could technically even be done externally in a text editor regardless of DB state, since lists are plaintext in the XML file.
Ideally, this would use some kind of GUI to identify the files to be replaced (Original) and be replaced with (Fixed) using the GUIDs, and would copy all the existing metadata from Original to Fixed, but that feels maybe out of scope. Either way, I could envision the UI working the same way as Change File Link:
- Right-click-hook the book to be replaced (Original) and grab it's GUID
- call a file browser dialog
- choose the replacement file (Fixed)
3.1 Check to see if the Fixed file is already in the DB;
3.2 If yes, grab its GUID
3.3 If no, add to the DB and grab GUID
- DB call to copy all metadata (excluding filepath, I guess?) from Original and paste to Fixed
- Search ComicDB.xml for Original GUID
6.1 If found, replace found entries with Fixed GUID
I'm like 90% certain this could be done through an add-on, unless there's scripting limitations on what meta can be copied or what changes can be made to ComicDB.xml? I'm no expert though, and it's beyond my current abilities but I'm trying to poke around and learn what I can.
Either way, replacing files is not uncommon within the digital comic world, be it (F)ixed files or changing from an old C2C to a NoAds or Digital with better quality, so a way to seamlessly replace a book across the whole Library with a better copy would be a welcome addition (at least, for me). Thanks for reading all this, and I'm looking forward to seeing what people come up with (but pls no "Just use SmartLists" thnx). 😁
Not really a bug or a feature request, but putting this in here by request. Hopefully can spitball some solutions.
First, the caveats:
-No editing of book files (CBR/CBZ/etc) allowed. This includes renaming, embedding meta, etc. Moving of files to different folders/paths is fine, but the file itself remains untouched (same filename and hash).
-This whole thing is related to static Lists, not SmartLists: SmartLists solve the problem, but come with their own quirks and issues, and are outside scope
-This is a deliberatly obtuse edge case example to illustrate the behaviour in question
-Personally, I don't use add-ons like Database Manager or Library Organizer, so I don't know if/how they approach problems like this. Maybe there's already a solution out there for this.
-In my case I'm using an SQL database, so there's a little bit more fragmentation involved.
Situation:
Let's say we have a series/volume: we'll call it SERIES X. It's a 6-issue run, sorted into a watched folder that matches the series name. Example filenames:
Series X [V2020]/Series X - 01 (Digital) (Scanner).cbzSeries X [V2020]/Series X - 02 (Digital) (Scanner).cbzEtcIn CRCE, these books have been added to the library via the scanning/watched folder process (so assigned GUID's) and metadata tagged via ComicVine. For the sake of example, let's also say the GUID's are sequential, so Issue 1 is
ID1, Issue 2 isID2, etc.The books are also added to Lists (Static/Dumb List, not SmartList).
-Issues 1-12 are in a List corresponding to the Volume:
Series X [V2020]-Issues 2-4 are also part of a crossover/event, so are on another List for that event:
Event Y [2019]-All 6 issues are also on a List for a reading order for the universe as a whole:
Publisher Z ChronologicalSo let's break that all down: <Series #> (<lists it's included on>)
<GUID>Series X 1 (
Series X [V2020],Publisher Z Chronological)<ID1>Series X 2 (
Series X [V2020],Publisher Z Chronological,Event Y [2019])<ID2>Series X 3 (
Series X [V2020],Publisher Z Chronological,Event Y [2019])<ID3>Series X 4 (
Series X [V2020],Publisher Z Chronological,Event Y [2019])<ID4>Series X 5 (
Series X [V2020],Publisher Z Chronological<ID5>Series X 6 (
Series X [V2020],Publisher Z Chronological<ID6>As these are all static lists, they're held in ComicDB.xml as just a list of GUIDs: no other reference point.
Now, say we get a new file: a fixed version of Issue 2. It has filename
Series X - 02 (Digital) (Fixed) (Scanner).cbz, and we want to replace the original.So you (or some utility like Library Organizer):
-Go into the folder:
Series X [V2020]-Delete the original file:
Series X - 02 (Digital) (Scanner).cbz-Paste in the new Fixed file:
Series X - 02 (Digital) (Fixed) (Scanner).cbzOn the next scan, the new file is added to the library and assigned a GUID (let's say
ID50). This step could be done before or after the actual file move, doesn't matter.Upon loading any of the lists that contained the previous file, it'll show as FILE NOT FOUND. If you want to update the book in each of those lists, you can:
(A) Identify which lists the original file was in: right-click>Show In List, then drag-and-drop the new book from the library into those lists and do whatever sorting/organizing you need to.
(B) Hacky option: use the Change File Link script to point ID2 to the new file
Option (A) could be time-consuming (depending on the number of Lists it's contained in) and still requires fiddling with order if you have a custom sort, but would fully replace the old file with the new one.
Option (B) just replaces the file across all Lists (sorcery), but the problem is that both
ID2andID50both still exist in the database: they're just pointing to the same file.You could remove
ID2from the Library, but would also remove the book from Lists, defeating the purpose.You could remove
ID50, but it would re-add to the library on the next scan unless you have the 'Files manually removed from the Library will not be added again' option enabled in the scan settings, which you might not want for whatever reason.Now, as to possible solutions.
The most direct one I can think of is literally just a find->replace of the GUID in ComicDB.xml. This could technically even be done externally in a text editor regardless of DB state, since lists are plaintext in the XML file.
Ideally, this would use some kind of GUI to identify the files to be replaced (Original) and be replaced with (Fixed) using the GUIDs, and would copy all the existing metadata from Original to Fixed, but that feels maybe out of scope. Either way, I could envision the UI working the same way as Change File Link:
3.1 Check to see if the Fixed file is already in the DB;
3.2 If yes, grab its GUID
3.3 If no, add to the DB and grab GUID
6.1 If found, replace found entries with Fixed GUID
I'm like 90% certain this could be done through an add-on, unless there's scripting limitations on what meta can be copied or what changes can be made to ComicDB.xml? I'm no expert though, and it's beyond my current abilities but I'm trying to poke around and learn what I can.
Either way, replacing files is not uncommon within the digital comic world, be it (F)ixed files or changing from an old C2C to a NoAds or Digital with better quality, so a way to seamlessly replace a book across the whole Library with a better copy would be a welcome addition (at least, for me). Thanks for reading all this, and I'm looking forward to seeing what people come up with (but pls no "Just use SmartLists" thnx). 😁