Author Topic: can MediaMonkey do "OR" searches too?  (Read 6962 times)

0 Members and 1 Guest are viewing this topic.

pomozki

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
can MediaMonkey do "OR" searches too?
« on: April 01, 2012, 03:18:33 PM »
Hi folks, I'm new to this and MM - I'd love some advice about doing searches in MM. sorry, haven't any files to attach but I'll explain...
I'm using MM Gold.
I'm doing Ctrl-F (Search) ... then going to the advanced tab
It then asks you to add search criteria.
I can do easy searches (e.g. show me only genre = ROCK and date = 1975 ... and I get heaps of songs showing up
but how do I ask for music from, say, 1975 that's either ROCK or POP?

It's the genre filter I'm having trouble with and it's really important to me: I've tried genre "equals" - but as soon as you do that, it only allows you to pick from a dropdown list of genres you already have in your library - so for me it allows songs whose genre is rock...or whose genre is pop ... or whose songs are rock AND pop
but so far I haven't worked out how to filter songs whose genre is either rock or pop or something else
I've tried
genre contains rock or pop
and
genre contains "rock" or "pop"
and
genre contains 'rock' or 'pop'
but none of them works

hope someone can put me right, many thanks Alan

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #1 on: April 01, 2012, 04:36:54 PM »
Hi folks, I'm new to this and MM - I'd love some advice about doing searches in MM. sorry, haven't any files to attach but I'll explain...
I'm using MM Gold.
I'm doing Ctrl-F (Search) ... then going to the advanced tab
It then asks you to add search criteria.
I can do easy searches (e.g. show me only genre = ROCK and date = 1975 ... and I get heaps of songs showing up
but how do I ask for music from, say, 1975 that's either ROCK or POP?

It's the genre filter I'm having trouble with and it's really important to me: I've tried genre "equals" - but as soon as you do that, it only allows you to pick from a dropdown list of genres you already have in your library - so for me it allows songs whose genre is rock...or whose genre is pop ... or whose songs are rock AND pop
but so far I haven't worked out how to filter songs whose genre is either rock or pop or something else
I've tried
genre contains rock or pop
and
genre contains "rock" or "pop"
and
genre contains 'rock' or 'pop'
but none of them works

hope someone can put me right, many thanks Alan

Hi Alan, welcome in VoxCommando-Forum. I'm not sure If I understand you right, you will do a search in MM for "genre" from "year"?
like - "play rock from year 1990"
Important for us is: What version of VoxCommando do you use?

Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #2 on: April 01, 2012, 04:57:46 PM »
Hi Alan,

please don't take this the wrong way, but...  what does this have to do with VoxCommando?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #3 on: April 01, 2012, 04:59:26 PM »
also, I'm not sure but it might help to know if you are using MM3 or MM4

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #4 on: April 01, 2012, 05:14:14 PM »
anyway on MM4 this is how you do it.  I don't have MM3 installed any more but hopefully it works about the same.

You just have to put checkboxes in all the genres that are acceptable and it will "or" them since it usually doesn't make much sense to "and" genres.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #5 on: April 01, 2012, 05:25:13 PM »
Hi Alan,

please don't take this the wrong way, but...  what does this have to do with VoxCommando?
Hi James, I think it has nothing to do with VC  ::club
But it is a nice question, how can do it "play genre from year" with VC?   ::hmm (MM4)

Kalle
« Last Edit: April 01, 2012, 05:36:15 PM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #6 on: April 01, 2012, 06:27:38 PM »
actually I don't even know how to search by year in MediaMonkey because there seems to be confusion between Date and Year.  Most of my songs have only a year as the date but some have a bull date with date, month and year.  Mediamonkey stores this as a long number.  If the date is set to 2000 then the database will store it as 20000000.  If the date is set to February 13th 1996 is it is stored as the number 19960213.

If they used a string it would be easier since we could use LIKE in our SQL:

  Year like '1996%'

would work fine.

as it is though, because it is a number, we need to be trickier and use this:

Year>=19960000 and Year<19969999

(note that we use >= so we will get all the songs marked as 1996 with no full date, because they are stored as 19960000

Now to use payloads you can change this to
Year>={1}0000 and Year<{1}9999

or in the case of your example Kallle using genre as the first payload:

genre like '%{1}%' and Year>={2}0000 and Year<{2}9999

and that works, but if you ask for genre "rock" you will also get "folk rock" etc...  getting the exact genre is another difficulty which has already been discussed I think.
« Last Edit: April 01, 2012, 06:31:44 PM by jitterjames »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #7 on: April 01, 2012, 06:32:50 PM »
actually I don't even know how to search by year in MediaMonkey because there seems to be confusion between Date and Year.  Most of my songs have only a year as the date but some have a bull date with date, month and year.  Mediamonkey stores this as a long number.  If they date is set to 2000 then the database will store it as 20000000.  If the date February 13th 1996 is it is stored as the number 19960213.

If they used a string it would be easier since we could use like.  Year like '1996%' would work.

as it is we need to be trickier and use this:

Year>=19960000 and Year<19969999

(note that we use >= so we will get all the songs marked as 1996 with no full date.

now to use payloads you can change this to
Year>={1}0000 and Year<{1}9999

or in the case of your example Kallle using genre as the first payload:

genre like '%{1}%' and Year>={2}0000 and Year<{2}9999

and that works, but if you ask for genre "rock" you will also get "folk rock" etc...  getting the exact genre is another difficulty which has already been discussed I think.
Wow, your are real one and only "Voxinator"  ::bow
I will test a bit with this command  ;)

Big THANKS
Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #8 on: April 01, 2012, 06:35:25 PM »
Here's the killer SQL for 1996 songs that are either 'acapella' or 'acid jazz'

Code: [Select]
(Songs.Year>=19960000 and Songs.Year<=19969999) AND
Songs.ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre IN ( SELECT Genres.IDGenre FROM Genres WHERE Genres.IDGenre in (21,65)))

 :biglaugh

but you need to know the id for the genres you want. :P

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #9 on: April 01, 2012, 06:42:44 PM »
Here's the killer SQL for 1996 songs that are either 'acapella' or 'acid jazz'

Code: [Select]
(Songs.Year>=19960000 and Songs.Year<=19969999) AND
Songs.ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre IN ( SELECT Genres.IDGenre FROM Genres WHERE Genres.IDGenre in (21,65)))

 :biglaugh

but you need to know the id for the genres you want. :P
???  Haha, I think I'm too tired to understand something about that  ;)
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #10 on: April 01, 2012, 07:33:40 PM »
I don't blame you.  I finally figured out how to do it with Genre Names instead of ID, but you have to get the capitalization (of the genre name) correct:

[edit:  actually it seems like the capitalization doesn't matter :)]

this will play anything from either Rock and Jazz genres.

Code: [Select]
Songs.ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre IN ( SELECT Genres.IDGenre FROM Genres WHERE Genres.genrename in ("Rock","Jazz") )) Order by random()
and now my brain is melting...

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #11 on: April 01, 2012, 07:40:55 PM »
I don't blame you.  I finally figured out how to do it with Genre Names instead of ID, but you have to get the capitalization (of the genre name) correct:

[edit:  actually it seems like the capitalization doesn't matter :)]

this will play anything from either Rock and Jazz genres.

Code: [Select]
Songs.ID IN (SELECT IDSong FROM GenresSongs WHERE GenresSongs.IDGenre IN ( SELECT Genres.IDGenre FROM Genres WHERE Genres.genrename in ("Rock","Jazz") )) Order by random()
and now my brain is melting...
Haha, oh no, I still need your brain  :biglaugh

Kalle
***********  get excited and make things  **********

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: can MediaMonkey do "OR" searches too?
« Reply #12 on: April 01, 2012, 07:56:42 PM »
Walking Dead, Kalle... :biglaugh :biglaugh :biglaugh
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

pomozki

  • Jr. Member
  • **
  • Posts: 2
  • Karma: 0
    • View Profile
Re: can MediaMonkey do "OR" searches too?
« Reply #13 on: April 01, 2012, 11:46:11 PM »
oh I'm so sorry - I ended up in the wrong forum!! My question has nothing to do with VC - in fact, I don't even know what it is  :bonk
I just googled MediaMonkey or iTunes forums - and yours appeared so I joined and posted my question
thanks to everyone for their replies ... in particular thanks to James for solving my puzzle with this reply

anyway on MM4 this is how you do it.  I don't have MM3 installed any more but hopefully it works about the same.

You just have to put checkboxes in all the genres that are acceptable and it will "or" them since it usually doesn't make much sense to "and" genres.

now I should go off and see what your program is all about  ;D

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: can MediaMonkey do "OR" searches too?
« Reply #14 on: April 02, 2012, 12:18:01 AM »
 :biglaugh

No problem. $©√t happens