Welcome, Guest
Submit ComicRack bugs to get them squashed

TOPIC: Double Database Entry for the same comic

Double Database Entry for the same comic 6 years 7 months ago #13072

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
I have two (identical) vesions of comic rack running. One on my desktop computer on the attic where all the comics are stored (accessable trhough vnc) and one on my laptop. Both comicrack's are set to the exact same filepaths (al be it the desktop computer uses the paths directly en the laptop uses network paths). After a couple of modifications (deletes, renames, additions, etc) my desktop computer told me there were 28706 comics, while my laptop told me 28704.

After some research, I found 2 entries that were double in the database on my desktop computer. The only thing I did was manually modify some comics and do a couple of rescans using the preferences/libraries scan option. I have "automatically remove missing files from Library during scan" ticked and "Files manually removed from the Library will not be added" unticked.

Problem is that the comic that both entries are refering to still exist, so neither of the entries will be deleted. I tried manually removing one entry from the database and do a rescan, but they ended up double again. Only removing both entries and do a rescan worked ok.

Now, preferably, I'd like to know how such a double entry could appear, but in any case, could the scan be adjusted so it detects doule entries? Speaking as a programmer, I would put all the filepaths in a map or dictionary (depends on the language ofcourse), so that it would give an exception on a double entry. I think it's best to log the problem and let the user take care of it after the scan because the entered notes could be different.
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13177

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
Hmm, not a single reply? That's a bit disappointing. I did some more searching (only searched on the word "double" at first, because I couldn't think of more synonyms :blush: ) and read that the problem has been there for some time. Now, I understsnd that it's difficult (If not impossible) to fix bugs that aren't reproducable, but I think a work around to get those double entries out should be a piece of cake. That's why I suggested placing the filepath of all database entries in a Dictionary<> object so that doubles would easily pop up.

Btw, as described above, I didn't use any scripts. In fact I never have used any scripts at all. Everything in the database is pure manual labour.
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13406

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
Today I got the same thing again. Just by manually added some books (on the harddisk) and then doing a directory scan (using version 138).

The result:

2 different book id's pointing to the same file. The 2 entries are displayed below. I know not all lines are relevant, but I wanted to provide as much info as possible. I hope this gets fixed soon, because it takes quite a lot of searhing and comparing to find the double entry.
<Book Id="2503e0e1-fcbc-4fe1-9118-db4fdcf6fedb" File="E:\Comics\Magazines\Robbedoes\Robbedoes Weekblad 1938-2005 (ic)\Robbedoes Weekblad 1965 1395-1446 (ic)\Robbedoes Weekblad - 1965 - 1412.cbz">
      <Series>Robbedoes Weekblad</Series>
      <Number>1412</Number>
      <Year>1965</Year>
      <PageCount>52</PageCount>
      <Pages>
        <Page Image="0" ImageWidth="1186" ImageHeight="1584" Type="FrontCover" />
        <Page Image="1" ImageWidth="1154" ImageHeight="1576" />
      </Pages>
      <Added>2011-04-08T10:00:43.148375+02:00</Added>
      <ComicInfoIsDirty>true</ComicInfoIsDirty>
      <FileSize>48009352</FileSize>
      <FileModifiedTime>2011-04-17T09:50:54.9375Z</FileModifiedTime>
      <FileCreationTime>2011-04-15T15:39:30.015625Z</FileCreationTime>
    </Book>
<Book Id="dd32a628-a190-495e-8d08-c09133ed64c0" File="E:\Comics\Magazines\Robbedoes\Robbedoes Weekblad 1938-2005 (ic)\Robbedoes Weekblad 1965 1395-1446 (ic)\Robbedoes Weekblad - 1965 - 1412.cbz">
      <Series>Robbedoes Weekblad</Series>
      <Number>1412</Number>
      <Year>1965</Year>
      <PageCount>52</PageCount>
      <Pages>
        <Page Image="0" ImageWidth="1186" ImageHeight="1584" Type="FrontCover" />
        <Page Image="1" ImageWidth="1154" ImageHeight="1576" />
        <Page Image="2" />
        <Page Image="3" />
        <Page Image="4" />
        <Page Image="5" />
        <Page Image="6" />
        <Page Image="7" />
        <Page Image="8" />
        <Page Image="9" />
        <Page Image="10" />
        <Page Image="11" />
        <Page Image="12" />
        <Page Image="13" />
        <Page Image="14" />
        <Page Image="15" />
        <Page Image="16" />
        <Page Image="17" />
        <Page Image="18" />
        <Page Image="19" />
        <Page Image="20" />
        <Page Image="21" />
        <Page Image="22" />
        <Page Image="23" />
        <Page Image="24" />
        <Page Image="25" />
        <Page Image="26" />
        <Page Image="27" />
        <Page Image="28" />
        <Page Image="29" />
        <Page Image="30" />
        <Page Image="31" />
        <Page Image="32" />
        <Page Image="33" />
        <Page Image="34" />
        <Page Image="35" />
        <Page Image="36" />
        <Page Image="37" />
        <Page Image="38" />
        <Page Image="39" />
        <Page Image="40" />
        <Page Image="41" />
        <Page Image="42" />
        <Page Image="43" />
        <Page Image="44" />
        <Page Image="45" />
        <Page Image="46" />
        <Page Image="47" />
        <Page Image="48" />
        <Page Image="49" />
        <Page Image="50" />
        <Page Image="51" />
      </Pages>
      <Added>2011-04-17T11:47:13.796875+02:00</Added>
      <ComicInfoIsDirty>true</ComicInfoIsDirty>
      <FileSize>48009352</FileSize>
      <FileModifiedTime>2011-04-17T09:50:54.9375Z</FileModifiedTime>
      <FileCreationTime>2011-04-15T15:39:30.015625Z</FileCreationTime>
    </Book>
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13409

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
As you noted, the problem is know for quite a while now, and duplicate items appear during normal comicrack usage and hasn't been solved yet. Things that can trigger this are scanning your folders while some files are locked by other programs, some scripts, and looking evil at the screen while comicrack is starting.

Seriously, it hasn't been pinpointed yet. When it happens to you, just select the comics, press delete (but uncheck also move files to recycle bin, so that they dont get deleted) and then re-scan your folders - only one should be present now. You may have to repeat this.

fK
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13410

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
Yeah, that's exactly what I did. Delete both and then rescan. Weird enough, if I delete EITHER of them, they just come back as a double entry again.

However, getting rid of the double entry is not really my problem. The biggest problem (I think) is actually finding which one doubled up. I haven't started putting all the comic info in, so even in duplicates view I'm "treated" with quite a lot of hits.

As I stated in my first post, I think it's quite easy to get rid of the problem by using a dictionary with the complete comic path as the key. That way the program would instantly spot that the entry it's about to add is already in the database (ArgumentException)and skips the addition.

I would be highly surprised if that would take more than an hour to implement.
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13415

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
tcm1998 wrote:
Yeah, that's exactly what I did. Delete both and then rescan. Weird enough, if I delete EITHER of them, they just come back as a double entry again.

However, getting rid of the double entry is not really my problem. The biggest problem (I think) is actually finding which one doubled up. I haven't started putting all the comic info in, so even in duplicates view I'm "treated" with quite a lot of hits.

This is easier than that. On the toolbar, click on the down arrow next to View, and select "View Duplicates" while you have your Library selected. All duplicates will show. Simply select all, delete, rescan, presto. Dont forget to uncheck View duplicates after, or you'll think your library is gone.

This will work even if your library isnt fully completed with info because the files will still be there, only the duplicate (ie, not real) files will be gone on the rescan.


tcm1998 wrote:
As I stated in my first post, I think it's quite easy to get rid of the problem by using a dictionary with the complete comic path as the key. That way the program would instantly spot that the entry it's about to add is already in the database (ArgumentException)and skips the addition.

I would be highly surprised if that would take more than an hour to implement.

I think i can answer this one for cYo, but its still my opinion - that would just mask the symptoms of the underlying problem. Not fixing the root cause could have further undesirable effects down the line, and probably would go unnoticed because its no longer obvious. Again, cYo's view may differ.



fK
Last Edit: 6 years 7 months ago by forkicks.
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13417

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
forkicks wrote:
I think i can answer this one for cYo, but its still my opinion - that would just mask the symptoms of the underlying problem. Not fixing the root cause could have further undesirable effects down the line, and probably would go unnoticed because its no longer obvious. Again, cYo's view may differ.

I suppose you have a point, although I think the dictionary technique might actually help finding the actual problem as well.
forkicks wrote:
This is easier than that. On the toolbar, click on the down arrow next to View, and select "View Duplicates" while you have your Library selected. All duplicates will show. Simply select all, delete, rescan, presto. Dont forget to uncheck View duplicates after, or you'll think your library is gone.

This will work even if your library isnt fully completed with info because the files will still be there, only the duplicate (ie, not real) files will be gone on the rescan.

I didn't say my library isn't completed. I hardly have any descriptions, since I have to do everything by hand. There are no dutch comics in comic vine, so I can't use a nice fancy script like that. Using the duplicate view shows over 2000 hits and there's no way I'm going to delete those from the database and rescan. If cYo indeed shares that oppinion and not gonna put a work around in place I guess I'll just have to write something to fix double entries myself.
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 6 years 7 months ago #13418

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
forkicks wrote:
This is easier than that. On the toolbar, click on the down arrow next to View, and select "View Duplicates" while you have your Library selected. All duplicates will show. Simply select all, delete, rescan, presto. Dont forget to uncheck View duplicates after, or you'll think your library is gone.

This will work even if your library isnt fully completed with info because the files will still be there, only the duplicate (ie, not real) files will be gone on the rescan.


I didn't say my library isn't completed. I hardly have any descriptions, since I have to do everything by hand. There are no dutch comics in comic vine, so I can't use a nice fancy script like that. Using the duplicate view shows over 2000 hits and there's no way I'm going to delete those from the database and rescan. If cYo indeed shares that oppinion and not gonna put a work around in place I guess I'll just have to write something to fix double entries myself.

If your files are .cbz, if you remove and rescan you wont lose anything you have already entered, since the information is also kept in the files, so removing thsoe 2000 duplicates and rescanning should be safe. I chose the wrong word. by "complete" i meant "with all the information filled in", nothing else.

Try it on a comic or two to see what i mean.

fK
Last Edit: 6 years 7 months ago by forkicks.
The administrator has disabled public write access.

Re: Double Database Entry for the same comic 2 years 1 month ago #43224

  • lahonda_99
  • lahonda_99's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 1
  • Karma: 0
I'm confirming that this problem still exists in 0.9.176. I'll do some testing with the new 0.9.177 build today.
The administrator has disabled public write access.
Time to create page: 0.210 seconds

Who's Online

We have 265 guests and 5 members online