Post
by Pauven » Wed Dec 23, 2020 10:20 am
Thanks so much for testing Jamie.
I checked my code to see why the disc duplicates. That is a bug/feature in CMC & CCC. When importing disc data from the My Movies XML data, CMC/CCC check to see if the filepath location was previously imported. If it finds it, CMC/CC updates the previous entry, but otherwise brings in the data as a new disc.
I hadn't considered how this would behave with intentional filepath changes, like renaming your folders to remove the period, or what klpaint just went through with migrating to a new server with a new server name in all his filepaths. I see now that my code identifies these are new discs, and appends them to previous disc entries, and you end up with duplicates.
I think the fix is pretty simple, to just null out the old disc data before importing new disc data. I'm a little concerned, since my code was designed to work this way due to a mymovies.xml data flaw - it would only list the discs in the XML file up to the disc number you were exporting for.
For example, if you had a 3 disc title, with each disc in a different folder, then disc 1's mymovies.xml file would only list disc 1, while disc 2 would list 1 and 2, and disc 3 would list all 3. With folder scanning, I could never be sure which folder would be read last, so if I nulled out the disc info each time I read in the mymovies.xml data, and happened to import disc 1 last, then CMC would lose discs 2 & 3.
That's not a problem with CCC, so I think I can make a code change for CCC only to null out the discs and re-import them every time, which should solve that bug you found. Thanks for bringing it to my attention.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter