INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Reduce and combine number of Genre categories for Movies  (Read 3632 times)

CountryBumkin

  • Citizen of the Universe
  • *****
  • Posts: 3352
Reduce and combine number of Genre categories for Movies
« on: August 07, 2011, 02:03:42 pm »

Currently there are 212 categories or Genre in my movie collection. Genre such as "Action", and "Action, comedy", and Action, drama", and " Action, Science Fiction, Comedy", and so on. If I set up Movie view by Genre (which I want to do), I have almost as many Genre as I have movies.

I would like to combine all 212 categories into a few genre categories, such as Action, Science Fiction, Comedy, Drama, Chiller, Family, etc.

How can I do this the easiest way?  And where is MC getting the genere classifications from for each movie? I use MyMovies4 as my movie import and categorizing program (perhaps that is where the info is stored - comes from).
Logged

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Reduce and combine number of Genre categories for Movies
« Reply #1 on: August 07, 2011, 02:32:52 pm »

Yes genres are tough. I do not think MC is scrapping the Genre, so it is MYMovies setting the Genre. Genres are pretty user specific and I do not know of a way to automate this. If a movie has more than one genre assigned to it you will have to pick the one you want. The easiest way I can think to do this is pane tagging the movies. Set up a panes view for the movies with the Genre displayed, figure out the Genres you want and start the tagging. You might have to tag a few moview with the Genres you want to have those show, but once they are all there you can select multiple movies and then tag them with the Genre you want.

Like I said, not a real automted way... But it would be hard for a script to know what you want...
Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Reduce and combine number of Genre categories for Movies
« Reply #2 on: August 07, 2011, 04:54:42 pm »

Movies typically have multiple genres. From your description, it appears the genres are properly comma-delimited, so the problem is more likely your handling of the data. Such data cannot be put in the default [Genre] field—it's a single-value string field not intended for multiple values. I don't use MyMovies so I can't tell you how, but the first solution to consider is configuring it to put the data in a custom list-type field.

If that's not possible, use a custom expression field to convert [Genre] into a list-type [Genres]. Create  [Genres], set it's Data Type to List (semicolon delimited), then select Calculated data and enter the expression:

Code: [Select]
ListBuild(1, ;, Replace([Genre], /,, ;))&datatype=[list]
Logged

CountryBumkin

  • Citizen of the Universe
  • *****
  • Posts: 3352
Re: Reduce and combine number of Genre categories for Movies
« Reply #3 on: August 08, 2011, 03:21:41 pm »

Thanks for the quick reply. it turns out that it is MyMovies that adds the Genre(s). I guess MM gets its info from the IMBD database - so it is probably correct (just not what i want).
Anyways, I am going through the MM catalog and removing the genres I don't want one movie at a time (keeping two at most genres/classes per movie). Then I will reimport the data and all should be good. Now that I know where the data is coming from I can address the problem on a case-by-case basis whenever I add a new movie.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Reduce and combine number of Genre categories for Movies
« Reply #4 on: August 08, 2011, 04:04:02 pm »

Quote
Anyways, I am going through the MM catalog and removing the genres I don't want one movie at a time (keeping two at most genres/classes per movie).

I'm not sure why you would want to do that. The Genres are what they are, and in most cases are set by the producers of the film. So it's not like you're correcting something that's "wrong." But if you really want to change "IMDb Genres" into "CB Genres," there's a better way to do it...

I don't know how MyMovies works, but I imagine if you change Genres and then update the record again, your change will be overwritten. If possible, it would be better to maintain your changes in a separate field. But I don't know if you would have the ability to import that separate field to MC. If you don't care about the Genres in MyMovies, a better solution would be...

Import the MyMovies Genres unchanged, and modify them in MC. You could use an expression field to remove or change values. The original IMDb data is ordered, so if you're happy with just the two most significant values, the expression could do that. An expression could also do both—remove values you don't want, then take the two most significant of those remaining.
Logged

CountryBumkin

  • Citizen of the Universe
  • *****
  • Posts: 3352
Re: Reduce and combine number of Genre categories for Movies
« Reply #5 on: August 09, 2011, 04:44:18 am »

I'm not sure how expressions work in MC. I don't know anything about SQL or programming, But you're right I should leave correct information alone. I'll see if I can setup an expression.

My goal is to display my Movie collection (in Theater View) by Genres. So if I want a Comedy I have all the comdey movies grouped together, and soon.

Currently when I sort/show movies listed by Genres, I have (in many cases) only one movie per Genre because there are so many multiple Genres (multiple meaning three or four Genres per movie like "Action, Comdey, Science Fiction, Fanatsy", so One movies is shown under that listing and another movie is listed under the Genre of "Action, Comedy, Science Fiction". I just want to use the first two Genres and ignore the rest. Perhaps the Expression can be written to just use first two and ignore any others.

I think you understand my problem/goals. But is a screen shot of the issue (you can see how many Genres are currently assigned).
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Reduce and combine number of Genre categories for Movies
« Reply #6 on: August 09, 2011, 07:47:33 am »

when you go to options, go to thv. pick the genre view. click on genre. at the left choose expression. at the top you can give it a name, as an expression copy and past the expression rick posted:

Code: [Select]
ListBuild(1, ;, Replace([Genre], /,, ;))&datatype=[list]
this will show all genres seperate. you could also use the first 2, but i think that the result wont make you happier..  :)
Logged

tls62dk

  • Galactic Citizen
  • ****
  • Posts: 406
Re: Reduce and combine number of Genre categories for Movies
« Reply #7 on: August 09, 2011, 12:29:39 pm »

That works like a dream!

I had removed all genres but one in My Movies, this is much better. I am restoring all the original genres.

Thanks Gappie and Rick!

TLS
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Reduce and combine number of Genre categories for Movies
« Reply #8 on: August 09, 2011, 12:45:55 pm »

That works like a dream!

Off topic:

Passed by this thread, and the oft-repeated phrase above got me thinking.  Does anything ever work in a dream?  Mine are chaotic jumbles of nonsense, with no rhyme or reason.  How did this phrase come to take on the meaning "works without flaw".

And then there's "Works like a charm".  Have any of us ever actually used a charm, talisman, or other voodoo idol and actually had any success?

These phrases are sooooo 1200's.  :-)
Logged
The opinions I express represent my own folly.

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Reduce and combine number of Genre categories for Movies
« Reply #9 on: August 09, 2011, 02:50:36 pm »

That works like a dream!

I had removed all genres but one in My Movies, this is much better. I am restoring all the original genres.

Thanks Gappie and Rick!

TLS
great it works.. maybe i could explain a bit about the expression.. to make it less 'impressive'.

in the old days this would have done great

Code: [Select]
[genre]&datatype=[list]
it makes any list where the values are separated by ';' behave as a list.. the result would be as what you see. but there where cases where this was not sufficient. especially when combining fields, with empty values and lonesome ';', and where the separation was using other characters . so listbuild was introduced, a nice and powerful tool which turned into basic hygiene when making a list.

now the extra thing in there is the replace rick introduced.. this is very nice as you can see in your list, it splits the 'Suspence/Thriller' in two seperate items in the list by replacing the '/'with a ';', which makes sence imo.

 :)
gab

ps to mrc  :)
Does anything ever work in a dream?  Mine are chaotic jumbles of nonsense, with no rhyme or reason.  How did this phrase come to take on the meaning "works without flaw".
as somebody who still has dreams, i know dream has more meanings then the one you use. but as english is not my native language. :)
Quote
dream    (drm) KEY

NOUN:
A series of images, ideas, emotions, and sensations occurring involuntarily in the mind during certain stages of sleep.
A daydream; a reverie.
A state of abstraction; a trance.
A wild fancy or hope.
A condition or achievement that is longed for; an aspiration: a dream of owning their own business.
One that is exceptionally gratifying, excellent, or beautiful: Our new car runs like a dream.
VERB:
dreamed or dreamt  (drmt) KEY , dream·ing, dreams
VERB:
intr.
To experience a dream in sleep: dreamed of meeting an old friend.
To daydream.
To have a deep aspiration: dreaming of a world at peace.
To regard something as feasible or practical: I wouldn't dream of trick skiing on icy slopes.
VERB:
tr.
To experience a dream of while asleep: Did it storm last night, or did I dream it?
To conceive of; imagine.
To pass (time) idly or in reverie.

PHRASAL VERBS:
dream on Informal
Used in the imperative to indicate that a statement or suggestion is improbable or unrealistic.
dream up
To invent; concoct: dreamed up a plan to corner the market.
ETYMOLOGY:
Middle English drem, from Old English dram, joy, music; akin to Old Saxon drm, mirth, dream
;)
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Reduce and combine number of Genre categories for Movies
« Reply #10 on: August 09, 2011, 05:01:47 pm »

Quote
now the extra thing in there is the replace rick introduced.. this is very nice as you can see in your list, it splits the 'Suspence/Thriller' in two seperate items in the list by replacing the '/'with a ';', which makes sence imo.

You're dreaming, my friend. ;D

I was actually escaping a comma, to replace the commas with semicolons. I could have done what you suggest too, but who knows if "Suspense/Thriller" is the same as a film that's both a Suspense and a Thriller? ;)

Seriously though, there aren't many IMDb Genres—certainly not enough to justify limiting the number assigned. Nor are there any compound genres to be split.
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Reduce and combine number of Genre categories for Movies
« Reply #11 on: August 09, 2011, 05:11:58 pm »

ooops  :-[..   i should have looked much more carefully.. :)

hmm.. for the original poster.. to get what i said it does, with the suspence/thriller.. replace one , with a /
like
Code: [Select]
ListBuild(1, ;, Replace([Genre], //, ;))&datatype=[list]i hope..
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Reduce and combine number of Genre categories for Movies
« Reply #12 on: August 09, 2011, 06:45:59 pm »

That works like a dream!

Off topic:
How did this phrase come to take on the meaning "works without flaw".

I believe it has more to do with 'what' we dream about, as in daydream about, consciously, the really good stuff, the way we wish it were.  I think it means works like that.   I could be wrong.  :P

Back on topic :)

This is a good example of how incredibly powerful MC is, but rarely gets fully used by anyone other than a few power users.  rick.ca has always got a clever/useful expression for all kinds of "how can I see {something} this way...?" type questions.  Mine in theater view with my Formula 1 view, and in MANY other threads I've seen.

There are TONS of great solutions and tips and tricks written in this forum.

If a user thinks something might be possible (much more is possible than I think most of us know) and they can craft a clever search to find these gems, they can make MC such a fantastic, super-personalized experience.  (or if they just start a thread :))

Unfortunately, these great ideas and clever solutions and improvements remain a fringe benefit for a few people (in comparison to the amount of paid users I imagine there are).

I suggested something years ago, and something similar gets suggested from time to time, and I think it would help here also.

If there were a way for a user to save his customizations such that they could be shared.  I can only imagine the view schemes, and smartlists and theater views and tagging scripts and stuff created by some of the wonderful users here.  These tips and information get shared, but an expression typed on a screen is not the same as just selecting 'cool tweak 42' from a list, and seeing it work on your data.  Similar to a firefox add-in i guess, but different.

Skins and plug-ins are similar, but skins look pretty and plug-ins add functionality, and these kinds of things would add 'usability', I think.

If easily shared, they might allow new users to 'flash' a new look, or parts of looks that increase usability of the software.  Or flash/install a smartlist for "finding albums with small cover art", with a view scheme or 2 for finding and tagging them, for example.

If someone was willing to share their theater custom view or smartlist or anything they thought would be useful to others, with a description of it's requirements and function.  i.e. 'Takes genres from MyMovies (or any delimited list) and gives you a view showing just the individual genres' with maybe a screenshot.  I'm sure many users have custom views they use to show series videos.  I bet some are better than others.

If someone created a clever theater view, or a complex smartlist, or a great view scheme for tagging or finding missing album covers, or whatever, and was able to share just that, I'd be interested in trying that out.

I realize everyone's tags are different, and tastes too, but in general, we can't be that far apart, and even if we are, changing tags, or a couple of selections in an otherwise all setup selection criteria would probably worth it if I could get a clever way to find albums with wrong or missing cover art, and clean it up easily, for example.  Yeah, I've got a few methods, but maybe someone's got something slick that would work better for me.

Maybe a scheme designed to show a new user the missing or 'messed up' tags, or duplicate files.  I'm sure we all do similar stuff, we don't all need to reinvent (basically) the same wheel.

The ability to share this kind of customization would be fun and useful, and might make it easier for newbies to get some cool stuff working quickly.

anyway, the posts above are another clever solution to the posters question, thanks all
Logged
pretend this is something funny

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Reduce and combine number of Genre categories for Movies
« Reply #13 on: August 10, 2011, 01:15:33 am »

Quote
If there were a way for a user to save his customizations such that they could be shared...

This won't work. I don't have any "customizations" that do not include custom fields, unique data and/or personal preferences that wouldn't render them useless for others. Want cool Theatre View captions that adapt to the file type and circumstances? Just use my caption expression...

Code: [Select]
If(IsEqual([Media Type], Audio), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 2, 6), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Media Type], Image), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 1), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Media Type], Video), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 1), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Series.movie], Pending), RemoveRight(Right([Filename],7),4) [Series] • If(IsEqual([Season], 1), premiering, returning) [s.Returning], If(IsEqual([Series.movie], Final Episodes), [Series] /([Year] - Left([Viewed],4)/), If(IsEqual([Episode.], .series), [Series], If(IsEqual([Type.], Pilot Episode), If(IsEqual(Left([Name], 5), Pilot), [Name], Pilot: [Name]), If(IsEqual(Left([Episode.], 1), S), SPadNumber([Season],2) EPadNumber([Episode],2) [Name], If(IsEqual([Type.], Final Episode), Final: SPadNumber([Season],2) EPadNumber([Episode],2) [Name], [Name]))))))  Mid(★★★★★,0,[Rating])  If(IsInPlayingNow(),♪,)
...Good luck with that! ;D

Quote
If someone was willing to share their theater custom view or smartlist or anything they thought would be useful to others, with a description of it's requirements and function...

Now if you're suggesting we just describe what we've done with words and screenshots, sharing and explaining smartlists and expressions used, that can certainly be done. But we're doing it already. Maybe if there were a special place to put such posts they would be easier to find and might generate more interest, but I doubt it.

Quote
Unfortunately, these great ideas and clever solutions and improvements remain a fringe benefit for a few people (in comparison to the amount of paid users I imagine there are).

Things some of us are motivated to do using straightforward tools available to all are "fringe benefits"?! The greatest impediment to realizing all the benefits the program has to offer is the belief these things are too difficult. Sure, some of us enjoy solving "problems" others didn't know they had or could ever care less about. That shouldn't suggest the solution to a problem someone really needs to solve is out of reach. Anyone who is interested should have no difficulty trying ideas out as they read about them here. Hopefully that provides steady and gratifying progress, because I don't think there are any viable shortcuts.

Quote
anyway, the posts above are another clever solution to the posters question

This was unlikely your intention, but I don't think it's helpful to label this a "clever" solution. It's THE solution to the circumstance at hand. String data needed to be converted to list. This is how it's done. The fact it can be done so easily should not be construed as something contributing to making the program complex or inaccessible. On the contrary, this is a big part of what makes the program a joy to use—no barriers.
Logged

JustinChase

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3276
  • Getting older every day
Re: Reduce and combine number of Genre categories for Movies
« Reply #14 on: August 10, 2011, 01:44:26 am »

This won't work. I don't have any "customizations" that do not include custom fields, unique data and/or personal preferences that wouldn't render them useless for others. Want cool Theatre View captions that adapt to the file type and circumstances? Just use my caption expression...

Code: [Select]
If(IsEqual([Media Type], Audio), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 2, 6), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Media Type], Image), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 1), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Media Type], Video), If(IsEqual([Rating], 1), ✘, If(IsEqual([Quality], 1), ✘, If(IsEmpty([.Flag]), , ✘))),)If(IsEqual([Series.movie], Pending), RemoveRight(Right([Filename],7),4) [Series] • If(IsEqual([Season], 1), premiering, returning) [s.Returning], If(IsEqual([Series.movie], Final Episodes), [Series] /([Year] - Left([Viewed],4)/), If(IsEqual([Episode.], .series), [Series], If(IsEqual([Type.], Pilot Episode), If(IsEqual(Left([Name], 5), Pilot), [Name], Pilot: [Name]), If(IsEqual(Left([Episode.], 1), S), SPadNumber([Season],2) EPadNumber([Episode],2) [Name], If(IsEqual([Type.], Final Episode), Final: SPadNumber([Season],2) EPadNumber([Episode],2) [Name], [Name]))))))  Mid(★★★★★,0,[Rating])  If(IsInPlayingNow(),♪,)
...Good luck with that! ;D

Now if you're suggesting we just describe what we've done with words and screenshots, sharing and explaining smartlists and expressions used, that can certainly be done. But we're doing it already. Maybe if there were a special place to put such posts they would be easier to find and might generate more interest, but I doubt it.

Things some of us are motivated to do using straightforward tools available to all are "fringe benefits"?! The greatest impediment to realizing all the benefits the program has to offer is the belief these things are too difficult. Sure, some of us enjoy solving "problems" others didn't know they had or could ever care less about. That shouldn't suggest the solution to a problem someone really needs to solve is out of reach. Anyone who is interested should have no difficulty trying ideas out as they read about them here. Hopefully that provides steady and gratifying progress, because I don't think there are any viable shortcuts.

This was unlikely your intention, but I don't think it's helpful to label this a "clever" solution. It's THE solution to the circumstance at hand. String data needed to be converted to list. This is how it's done. The fact it can be done so easily should not be construed as something contributing to making the program complex or inaccessible. On the contrary, this is a big part of what makes the program a joy to use—no barriers.

You really think people are smarter and more motivated than they are :(
Logged
pretend this is something funny

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Reduce and combine number of Genre categories for Movies
« Reply #15 on: August 10, 2011, 05:27:18 am »

Silly me. ::)
Logged

tls62dk

  • Galactic Citizen
  • ****
  • Posts: 406
Re: Reduce and combine number of Genre categories for Movies
« Reply #16 on: August 10, 2011, 07:28:00 am »

I am trying to use the expression
Quote
ListBuild(1, ;, Replace([Genre], /,, ; ))&datatype=
    to separate the Audio tracks imported from My Movies into a list. Just adding a custom library field will give me this format
    Quote
    English|Dolby TrueHD|5.1

    so I am trying to replace the | with a space. Changing the / in the above expression to a | will give me this result
    Quote
    EnglishDolby TrueHD5.1

    How do I add the missing space?

    TLS[/list]
    Logged

    tls62dk

    • Galactic Citizen
    • ****
    • Posts: 406
    Re: Reduce and combine number of Genre categories for Movies
    « Reply #17 on: August 10, 2011, 07:30:16 am »

    Edit:
    The Genre field in the above post is replaced with a field called "AudioTracks".

    TLS
    Logged

    rick.ca

    • Citizen of the Universe
    • *****
    • Posts: 3729
    Re: Reduce and combine number of Genre categories for Movies
    « Reply #18 on: August 10, 2011, 03:26:58 pm »

    If you want a list, it needs to be replaced with the recognized delimiter—a semicolon—not a space. The other expression is replacing commas with semicolons. Commas, spaces and parentheses cannot be used directly because they are part of (or in the case of the space, ignored by) the expression language itself. To be used in an expression, these characters have to be preceded with the "escape character," the "/".

    Now, having explained that, it occurs to me ListBuild() is completely redundant in both expressions. Once a field has been properly semicolon-delimited, &datatype=[ list] will make the result a list. :-[

    In other words, all you need is...

    Code: [Select]
    Replace([AudioTracks], |, ;)&datatype=[list]
    Logged

    tls62dk

    • Galactic Citizen
    • ****
    • Posts: 406
    Re: Reduce and combine number of Genre categories for Movies
    « Reply #19 on: August 10, 2011, 03:44:35 pm »

    Thanks Rick!

    You suggestion actually gave me the following listing when presented in the info panel of Theater View:
    Quote
    English
    Dolby Digital
    5.1

    but your excellent explanation made me realize that I could modify your expression from
    Quote
    Replace([AudioTracks], |, ; )&datatype=

      to
      Quote
      Replace([AudioTracks], |, / )&datatype=

        which gave me exactly what I needed in a single line
        Quote
        English Dolby Digital 5.1

        Thanks again. These two expressions in this thread has been a big help.

        TLS[/list][/list]
        Logged

        rick.ca

        • Citizen of the Universe
        • *****
        • Posts: 3729
        Re: Reduce and combine number of Genre categories for Movies
        « Reply #20 on: August 10, 2011, 04:37:11 pm »

        Yes, if a list would use too much space in "small view" (the info panel under the poster) or is just too tedious to display as a list, I instead use expressions like...

        Code: [Select]
        Replace([Tones], ;, / •)
        ...to display Tone1 • Tone2 • Tone3...

        BTW, your post is not displaying correctly because it includes the BBcode [ list]. Add a space (like I did here), and hope the reader will understand you did so, or use "insert code" to display code.
        Logged
        Pages: [1]   Go Up