Decorum for the Forum:
  • Be nice. If you want to be mean, try Reddit.
  • No Piracy. If you want to be a thief, there are dark places on the internet dedicated to that.
  • No Cracking. Discussions on AnyDVD, DeUHD, DVDFab, UHDKeys and similar tools are not permitted here.
  • No Spamming. If you want to make a buck, work smarter... somewhere else.
  • No Adult Content. Half the internet is dedicated to adult content. This half isn't.

Privacy Policy: Click Here to Review (updated September 30, 2020)

[Feedback Wanted] Issue with ISOs in "Online (Folder)"

General support forum for Chameleon MediaCenter (formerly MM Browser)
Post Reply
User avatar
Pauven
Posts: 2781
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

[Feedback Wanted] Issue with ISOs in "Online (Folder)"

Post by Pauven » Sun Jun 28, 2020 10:11 am

It's amazing to me that after 3 years of developing CMC, I'm still coming across little My Movies integration issues and challenges that need a solution. I blame MM, which has just waaaaaay too many ways to input data based upon user whim.

So I writing this post looking for user feedback. I know this post is long, but the act of writing this all out actually helps me think through the issue and come up with solutions. I think towards the end here I have posted a viable solution, though I welcome all user feedback on the issue and your own use cases, plus any alternative solutions you can dream up.


My Current Challenge
Yesterday I was watching Dexter Season 2 which I have on ISO. Earlier in the day I had watched episode 1, and the ISO mounted fine. Afterwards I had performed a SmartSync, and then later tried to watch episode 2, and the ISO would not mount with Virtual CloneDrive. Troubleshooting the issue, I finally discovered that the Disc Location in CMC was pointing to an Online (Folder) (\\Tower\TV_Series\Dexter\Dexter Season 2\), which happens to have all 3 of the Season 2 disc ISO's in the same folder, and CMC was trying to mount the folder itself as an ISO, instead of mounting a specific ISO file. Obviously, VCD can't mount folders, only ISO files.

image.png
image.png (12.92 KiB) Viewed 3386 times

I did a Full Sync and the problem was resolved... temporarily. CMC now had the full path to the ISO (\\Tower\TV_Series\Dexter\Dexter Season 2\DEXTER SEASON 2 D1.iso). But any xml metadata updates that cause the SmartSync to process this title again brings the problem back. This is because I have Disc 1 Location configured as an Online (Folder) in MMCM, and Discs 2 & 3 as Online (File) pointing at their respective ISO disc files. When CMC's SmartSync processes the update, it is overwriting the previous Disc 1 ISO file path (that CMC discovered during the Full Sync) with the current Online (Folder) path in the XML metadata.

I consider this a bug in CMC's SmartSync, and a solvable one at that, so I'm not looking for feedback on this aspect of the issue. But taking a step back and looking at the big picture, I realized the problem is actually much bigger.


The Real Issue
This simple SmartSync bug has brought a new issue to light for me. As many of you know, I am working on an enhanced version of CME that skips exporting metadata files, and instead directly writes data to the CMC database. While this sounds simple and easy, there is a huge problem with ISO's configured in My Movies as an "Online (Folder)", as the metadata does not include the ISO filename needed to mount the ISO.

The problem does not exist with CMC today because CMC's Sync routine scans every media folder looking for playable media. When the Sync finds the ISO file, it then finds a mymovies.xml/mmTitle.xml file to go with it. And for an ISO configured as an Online (Folder) in MMCM, CMC overrides the folder path in the XML metadata, replacing it with the actual ISO file path that it discovered during the Sync. This is one of the many benefits of the current Sync process - CMC finds your playable media even if it is missing in MMCM.

But without the current Sync process, the only data that CMC would have about the filepath is the MMCM data, which indicates that a title is an "Online (Folder)" and doesn't actually point to any particular ISO file. So in the future, when CME grabs the metadata from the My Movies API and directly writes the CMC database, all ISO based titles configured as Online (Folder) will only point to a folder, and not a particular ISO file in the folder, which in turn breaks in CMC because you can't mount a folder using Virtual CloneDrive.


Why not use "Online (File)" in MMCM?
Now, you might be thinking that the simple answer is to configure all ISO's as "Online (Files)", and a year ago I would have agreed with you. But not anymore.

Last year I started reconfiguring my ISO's as Online (File) in My Movies Collection Management. At first, this solution seemed to work perfectly. But after a while I started noticing a title duplication issue in My Movies. The duplication issue was random, often taking months before it would happen. And when it happened, the duplicate title was always an "Online (Folder)" pointing to the same directory as the "Online (File)" ISO, and the duplicate title would have a different barcode.

I finally realized that My Movies Folder Monitoring was the problem. My best guess is that Folder Monitoring is always trying to add an Online (Folder) for every media folder it discovers an ISO inside, but as long as the newly identified title had the same barcode as an existing title in my collection (the Online File based title), then it wouldn't re-add or change the title.

But as soon as someone contributed a new version of that title to the online service, with a different barcode, then Folder Monitoring would change its mind and decide that the Online (Folder) was for this other barcoded version of the same movie title, and then I would have a duplicate copy of the movie, only with a different barcode and configured as an Online (Folder).

It was quite obvious when this had happened. For example, I added the movie Hanna to my collection a decade ago, yet last week while working in MMCM and sorting by Collection Number, my newest title was Hanna. That immediately struck me as odd, and sorting alphabetically I found I now had two copies of Hanna, with different barcodes, the original an "Online (File)" I added all those years ago, and the second an "Online (Folder)" that had just been added by Folder Monitoring.

Apparently MMCM Folder Monitoring is not smart enough to realize that movie already exists in my collection as an Online (File) configured title. The only way to prevent this fiasco is to configure all ISO's as Online Folders. Last week, I updated all of my Online (File) movies to be Online (Folder) instead. Online (Folder) also seems to be a "best practice" according to Binnerup's guidance on the My Movies forums, so I feel doubly justified in using Online (Folder) for my ISO's.

I also have to consider that since My Movies allows users to configure an ISO as an Online (Folder), other users will do this, and for that reason I have to support this configuration in CMC, even though it poses a challenge to mounting the unidentified ISO file.


How to Mount an Online Folder
Which brings us full circle back to the issue at hand. When you configure an ISO as an Online (Folder) in My Movies, the My Movies metadata only has the folder path without the ISO's filename.

A potential solution is for me to enhance CMC's playback routine, so that when it is starting playback of an Online Folder, that it actually scans the target directory to determine if it is a DVD folder rip, or alternatively an ISO file that needs to be mounted. Hopefully this won't add too much time to the mounting process - that's always a concern for me - but this is a necessary step to account for the lack of clarity in the My Movies metadata.

The problem, then, is what do I do in a directory such as the Dexter Season 2 screenshot above, where I have 3 ISO's residing in the same folder? I could grab the first ISO filename alphabetically, and that might work most of the time, but there is still a potential issue with this approach.

I recently added all 9 seasons of The Office (US) to my collection. One of the things I noticed is that the disc names are not consistent. Sometimes the disc name is something like "THE_OFFICE_S9_D1", and sometimes it is missing the "THE_" prefix, i.e. "OFFICE_S9_D2". When sorting alphabetically, "OFFICE_S9_D2" comes before "THE_OFFICE_S9_D1". So I think I need a more robust solution.

I suppose I could make the disc mounting routine even smarter, that instead of just grabbing the first ISO filename alphabetically, it would instead grab the first ISO filename alphabetically that was not also configured as an Online (File) for another disc (which is exactly what I have done for Dexter). That would mean additional processing in CMC to double-check the list of configured discs looking to make sure it was grabbing an unlisted ISO, though I have come to learn that this type of computational processing is surprisingly quick so I don't think it would take much time to perform this analysis.


Your Thoughts and Ideas
All of this has my head spinning a little - maybe yours too. I keep thinking back to Windows Media Center with the My Movies plugin. Though it has been years since I have used WMC, I seem to recall that you could play ISO's that had been configured as Online (Folder). In fact, I'm almost sure of it, because before I wrote CMC I believe 99.9% of all my titles were ISO's configured as Online Folders. I had never done anything different until CMC users reported issues with CMC on their collection and they explained they didn't use ISO's or Online Folders, which got me to try these other methods as well.

Which has me wondering, how did My Movies handle this mounting issue? Obviously, My Movies discovered the ISO files in my media folders during the Folder Monitoring, but even though it knew the ISO filenames, it seems like it throws this data away for Online Folders, as the exported metadata only includes the folder name, and not the ISO filename. It seems a bit silly to throw that data away, and to have to rescan the directory to see if there is an ISO to be mounted for playback, so I'm not sure if My Movies secretly kept the ISO filename internally to use for mounting, or if it really did have to rescan each time looking for what to play and how to play it. Probably the answer on how WMC did this is irrelevant, since the My Movies API doesn't export the filename regardless, so I don't think I have other options at my disposal.

What are your experiences and recollections with how My Movies on WMC handled this?

Do you think the approach I suggested above will work?

Do you have other use cases that I need to consider?

Along the lines of that last question, I have this concern: There is another Location option in MMCM for discs, "Online (Folder Content)". I've never actually used this option, but it's been in the back of my mind ever since I read a post by Binnerup regarding "Online (Folder Content)" being the solution for an Online Folder that has multiple media files in it:

image.png
image.png (105.81 KiB) Viewed 3386 times

Perhaps that is how I should have configured my Dexter Season 2. Does anyone here ever use "Online (Folder Content)"? I'm guessing no, because I think CMC would break in this scenario, but since I haven't tried it myself I really don't know.


Alright, that's more than enough writing. Sorry for the long post...
Paul
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Jamie
Posts: 945
Joined: Wed Dec 27, 2017 11:26 pm

Re: [Feedback Wanted] Issue with ISOs in "Online (Folder)"

Post by Jamie » Sun Jun 28, 2020 12:19 pm

This issue will/has affected most of my collection. I mostly have ISO files in my collection and I use online Folder with all my ISOs. Fortunatelly only one ISO is within each folder. Why did I do it this way? Originally, I was having issues using online file and I requested help from the MM folks in the MM forum. The times was much more happier back then.

I was instructed that there were issues with online file and that I should always use online folder with one ISO inside each folder. Ihis might have been during the V4 MM days and I don't kbow whetherthe bug was fixed since then. Since then this has been my practice.. I manually rip my disks. I do not use the MM mobitor .

As for a fix, If I really need one. I could write a script to unpack the ISO

I don't know what else you can do other than the fix you mentioned. All these different ways to add new disks to MM would make my head to spin. I will look at this later to see if can add something useful.


Jamiie

User avatar
Pauven
Posts: 2781
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: [Feedback Wanted] Issue with ISOs in "Online (Folder)"

Post by Pauven » Sun Jun 28, 2020 12:52 pm

Jamie wrote: Sun Jun 28, 2020 12:19 pm This issue will/has affected most of my collection. I mostly have ISO files in my collection and I use online Folder with all my iISOs. Fortunatelly only one ISO is within each folder.
That's good to know, thanks Jamie. That pretty much is exactly what I have, except for a few special movies that came with multiple discs (or dual-sided discs), and TV Series I ripped to ISO, for which I typically throw all the ISOs in the same folder. Perhaps it is wrong for me to put multiple ISO's in the same folder, but since MMCM allows you to do this, I figure I need to support users who do this just like I have.

Obviously, to correctly have multiple ISO's in a folder you have to use Online (File) for all, or at least all but one, because Online (Folder) at most can point to one ISO, otherwise the relationship between Disc and ISO is undefined. I've actually done this for several of my TV Series, using Online (Folder) for Disc 1 (to prevent the Folder Monitoring duplicate title issue) and Online (File) to point at all the additional ISO files.

Up to this point, CMC's Sync has been "fixing" any Online (Folder) ISO's to look like an Online (File) with the full ISO path, so the underlying issue was out of sight & out of mind...

Jamie wrote: Sun Jun 28, 2020 12:19 pm Why did I do it this way? Originally, I was having issues using online file and I requested help from the MM folks in the MM forum... I was instructed that there were issues with online file and that I should always use online folder with one ISO inside each folder.
I know that at some point in the past year, I've seen Binnerup repeat this advice. It makes me wonder for what scenarios you would/should use Online (File).


This morning I've written a "Disc Location Validator", probably something that should have been there all along. I tested it on my Dexter Season 2 Disc 1 that was pointing to the parent folder instead of the ISO file, and it fixed it:

Code: Select all

PlayClick Debug Log Generated 6/28/2020 12:43:53 PM with CMC v3.5.2020.0003
---------------------------------------------------------------------------
 *** BEGIN OF PLAYCLICK DEBUG LOG ***
Season 2, Episode 3
MPLS 00002, Title Number , Chapter Number , ISO Episode=True
Validating Disc Location
  Scanning Folder:  \\Tower\TV_Series\Dexter\Dexter Season 2
    Found ISO, checking to see if assigned to another Disc:  DEXTER SEASON 2 D1.ISO
      ISO not in use, selecting for playback
Player=MPCBE
A Disc is currently mounted, checking if it is the right disc...
Red Fox Processing Complete Verified
Player Commandline= "V:\BDMV\PLAYLIST\00002.mpls" /fullscreen /play /close
Starten 'Media Player Classic'
 *** END OF PLAYCLICK DEBUG LOG ***

It was surprisingly quick, taking 0 seconds, so my performance concern was unfounded:

image.png
image.png (15.08 KiB) Viewed 3380 times

I don't think I'm done with it quite yet. The logic handles DVD/Blu-ray/HD-DVD Folders, and ISO's, but not other encoded media types yet. That should be fairly easy to fix.

Overall, while I'm happy with this new Disc Location Validator, I'm anxious to get some real-world testing results from beta users - hopefully I don't break something that has been working fine for years. I'm working hard to wrap up this next version to roll out a Release Candidate for testing, might have something later today...
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Jamie
Posts: 945
Joined: Wed Dec 27, 2017 11:26 pm

Re: [Feedback Wanted] Issue with ISOs in "Online (Folder)"

Post by Jamie » Sun Jun 28, 2020 3:32 pm

That's great Paul!! Let us know when the beta is available and I will play around with it.

Post Reply