INTERACT FORUM

Please login or register.

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

Author Topic: I need help with a auto import rule  (Read 2982 times)

bytestar

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1286
  • Alpha/Betatester
I need help with a auto import rule
« on: May 27, 2016, 08:44:58 pm »

I need a auto import rule that populates the folder "jazz", "rock", "pop", to the grouping field.

\Music\Jazz
\Music\Rock
\Music\Pop

I have this but the field is not filled out, please help me.

IfElse(IsEqual([Filename (path)], \Classical\,8), Classical, IsEqual([Filename (path)], \Jazz\,8), Jazz, IsEqual([Filename (path)], \Pop\,8), Pop, IsEqual([Filename (path)], \Rock\,8), Rock,1, Must be filled out)
Logged
Official Microsoft © product tester.
Download the latest language file https://1drv.ms/u/s!AnQ3L_bTnnzv4otXL9-G4rUj9wX6Tw?e=TLGgjb (is constantly updated)

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need help with a auto import rule
« Reply #1 on: May 27, 2016, 09:30:54 pm »

You can't use the slashes \jazz\ unless you escape them \\jazz\\

But you should do with just jazz, as isequal(...,8) is a substring search
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: I need help with a auto import rule
« Reply #2 on: May 27, 2016, 11:50:37 pm »

back slashes do not need to be escaped, only forward ones need that, and the 'escape' character is also a forward slash, not a back slash.

bytestar,
There doesn't appear to be anything wrong with your expression construction. I copied it 'as-is' and created an expression based column in a file list, and the values were output as expected.

Can you give more detail about what you want, with perhaps, a screenshot of your auto import configuration? (select the folder in the auto import list, press 'Edit' and screenshot that)

-marko

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need help with a auto import rule
« Reply #3 on: May 28, 2016, 12:19:28 am »

Thanks marko, that's what I get without testing

I concur, my quick test works ok, although in the end of the expression I used
,1,Rock instead of , rock,1
Logged

syndromeofadown

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 812
Re: I need help with a auto import rule
« Reply #4 on: May 28, 2016, 12:32:09 am »

Bytestar your expression works for me.

If you are trying to apply the rules to music already in your library make sure you completely remove the files before re-importing:
1 - Remove the file from the library.
2 - Remove them from the deleted items database (search ~d=r in a view filter or smartlist).

Keep in mind any when doing this that any of the music's tags that are in the library only (not embedded) will be lost.


You can test/use expressions by pasting them in the tag window with an "=" before it.
Logged

bytestar

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1286
  • Alpha/Betatester
Re: I need help with a auto import rule
« Reply #5 on: May 28, 2016, 05:28:17 am »

Thank you to everyone for your help
I had to remove the files from the library, and re-import it then works.

But I have another problem when I for example, have the following path.
\Music\Rock (80s)
\Music\Rock (70s)

But the Rule expected "Rock" what must i do that it works?

Logged
Official Microsoft © product tester.
Download the latest language file https://1drv.ms/u/s!AnQ3L_bTnnzv4otXL9-G4rUj9wX6Tw?e=TLGgjb (is constantly updated)

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need help with a auto import rule
« Reply #6 on: May 28, 2016, 07:52:18 am »

I don't know why you are searching with the slashes.  Just use

Isequal([filename (path)],Rock,8)

it will work fine with the rock (80's) etc.
Logged

bytestar

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1286
  • Alpha/Betatester
Re: I need help with a auto import rule
« Reply #7 on: May 28, 2016, 08:27:10 am »

Thank you
sometimes i do not see the forest for the trees  ;D

With the \Rock, I can prevent that evaluates to the file name, but the back slash behind Rock\ is unnecessary, you're right
Logged
Official Microsoft © product tester.
Download the latest language file https://1drv.ms/u/s!AnQ3L_bTnnzv4otXL9-G4rUj9wX6Tw?e=TLGgjb (is constantly updated)

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: I need help with a auto import rule
« Reply #8 on: May 28, 2016, 09:24:15 am »

...and here I was getting the Regex() engine all warmed up.

But I see it's unnecessary.  :)

Brian.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: I need help with a auto import rule
« Reply #9 on: May 28, 2016, 10:12:35 am »

You can also specify the folder level, but no need to get so complex here :)

Certainly no need for regex but it's always fun watching blgentry work!
Logged
Pages: [1]   Go Up