Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Example Media Type Code Needed ASAP...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a media browser (CQC repo) set up to display available music from the CQC Repo and available movies from MyMovies. I have also set up buttons on the main template to switch between music and movies. What I'm attempting to do is an OnSelectCollection load a new popup. If the OnSelectCollection comes from music, I want a specific popup to appear that shows the preview info and has transpot control over the CQC audio player. If it comes from movies, I want it load a popup with preview and TheaterTek transport controls. I'm just not sure how (and probably need example code to dissect) to load different popups based on the media type. I tried associating a GVar with the buttons that switch between the two types. If you select music, it sets the CAB and the GVar to Music. If you select movies, it sets the CAB and the GVar to movies. The I tried to place a if GVar = Music, load this template else load that template but, it always loads the Music popup and the RTV is wrong for the Movie popup. ANy help available this fine morning?
You would do something like this in the OnSelCollection:

If System::Equals(%(MediaRTV:MediaFmt), CD)
    // It's music so pop up the music preview
   // It's movies so pop up the movie preview
Are you sure the media format returns a CD from the CQC repo? I've tried both "CD" and "Music" and in both cases, selecting from the music CAB invokes the Movie popup.
It needs to be selected as the media format. There's a media format drop down that you can use to select the format. The media format field was actually added at some point during the late betas, and I didn't think to automatically enter CD as the format when they rip a CD, which actually could have been done, and I can add that to the next drop.

In both cases, they'll need to probably be sure to set the media format correctly, since you'll may also need to make decisions on the movie side based on format possibly at some point.

But, you can also do the other thing I suggested, which is check the media repository moniker, which is available via an RTV. YOu are using separate repositories, so you'll see the moniker of our repository or the MyMovies repository, and that could be used to make that decision.
Ummm, I see no Media Repo Moniker option as an RTV. Also, you say there's a drop down for media type. Where's that set?
Oh, wait, I see the repo selection in teh CAB config screen but, I use two repo's and have "tied" MyMovies to the CQC repo. So, I need to leave that set up as CQC Repo. I think the media format is the better way to go.
Disregard. It's media type not format. Works a charm...
Media type is just the overall mode of the CAB. As long as you only have one one media format in each mode, or you have one player in each mode that can handle any formats involved, then you are OK. Media format is the more detailed format, such as CD, BluRay, etc..., which is specific to each collection, and can be used to specifically invoke a particular player. This field is part of the metadata and has to be set correctly as part of setting up the metadata, just like title, cover art, etc...

MyMovies should set it correctly generally, though it should be checked just in case, since data can always be off. Ours doesn't set it automatically, but in the case of a ripped CD it could do so, and I'll add that, since in that one case it knows what it is because it ripped it.
AnthonyZ Wrote:Oh, wait, I see the repo selection in teh CAB config screen but, I use two repo's and have "tied" MyMovies to the CQC repo. So, I need to leave that set up as CQC Repo. I think the media format is the better way to go.

Actually, you are using two different repos that are unconnected, ours and MyMovies. You are sending a SetRepository() command to the CAB to switch it to one or the other as the user selects movies or music to browse. So the repository you selected when you configured the CAB is just the initial one. You are changing it as they change modes.

Or you would be had I not broken the command query to the media category browser. That'll be fixed in the next drop though.