INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: MrHaugen on March 07, 2012, 02:45:01 pm

Title: Some help needed for music video import rule expression
Post by: MrHaugen on March 07, 2012, 02:45:01 pm
I'm planning to set up a music video import rule on my server. A MC client will download from Youtube, or I will add manually videos to a folder on the server. The MC will import from a common mapped share that is available as a mapped drive on all machines.

The Music videos are usually named "Artist - Name.extention" I think. If an expression could pick up letters before " -" for Artist and after "- " for Name, this would work perfectly. Anyone know if this is possible? I could not find anything really matching my requirements on the Wiki. Only the Left and right functions, but I have no clue as how I should combine those. Among other things.
Title: Re: Some help needed for music video import rule expression
Post by: MrC on March 07, 2012, 04:57:59 pm
Use these for your import rules:

Artist:
   Regex([Filename (name)], /#^(.+) - (.+)\..*$#/, 1)

Name:
   Regex([Filename (name)], /#^(.+) - (.+)\..*$#/, 2)
Title: Re: Some help needed for music video import rule expression
Post by: MrHaugen on March 08, 2012, 06:43:46 am
Amazing... I do not understand how you remember this stuff. Thanks!