INTERACT FORUM

Please login or register.

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

Author Topic: Help with expression for organising albums  (Read 1393 times)

Mr James Dunn

  • Recent member
  • *
  • Posts: 20
Help with expression for organising albums
« on: August 26, 2013, 05:35:39 am »

Hi,

Some of my albums are multiple discs and the discs have titles rather than disc numbers. I have set up a custom [Disc Title] field and I'm trying to write an expression so that i can rename my files to create a folder (after [Artist]\[Album]..) using the [disc title] if there is one, the [disc #] if there isn't a title, or if there isn't either (for single disc albums) just the [track #] and [name] without creating a separate folder.

e.g.

Biffy Clyro\Opposites\The Land at the end of our toes\01- Different People.flac

or,

Led Zepplin\Physical Graffiti\Disc 2\01- In the Light.flac

or,

Audioslave\Out of Exile\01 - Your time has come.flac

I'm currently working with the If(IsEmpty()) expression but can seem to get it to works, can anyone work this out for me?

Cheers

James

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Help with expression for organising albums
« Reply #1 on: August 26, 2013, 11:56:35 am »

Use this:

  FirstNotEmpty([Disc Title], [Disc #])

So your complete path under your media base path might be:

   [Album Artist (auto)\[Album]\delimit(FirstNotEmpty([Disc Title], [Disc #]),\)\[Track #] - [Name]

See:

   http://wiki.jriver.com/index.php/Media_Center_expression_language#FirstNotEmpty
Logged
The opinions I express represent my own folly.

Mr James Dunn

  • Recent member
  • *
  • Posts: 20
Re: Help with expression for organising albums
« Reply #2 on: August 26, 2013, 02:05:24 pm »

Mr C,

Thanks for that.

Much appreciated.

Regards

James

Mr James Dunn

  • Recent member
  • *
  • Posts: 20
Re: Help with expression for organising albums
« Reply #3 on: August 26, 2013, 02:53:39 pm »

Mr C,

I've just tried it on some files and where there is a [Disc Title] it works fine, but where there isn't it shows the name as [Album Artist (Auto)]\[album]\Unknown Disc Title\[Track #] - [Name].flac, it doesn't reference the [disc #] when there is one and still shows the same when there is neither a [disc title] or ]disc #].

Ive checked the spellings etc and they all seem OK. Could be something in my custom field set up that causes the problem?

Cheers

James

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Help with expression for organising albums
« Reply #4 on: August 26, 2013, 03:08:44 pm »

In some places, such as the Rename tool, you'll need to use a field's raw format:

  FirstNotEmpty([Disc Title,0], [Disc #,0])

You can probably just use that in all situations for your needs.

Search both Rename and raw here for more explanation:

    http://wiki.jriver.com/index.php/Media_Center_expression_language
Logged
The opinions I express represent my own folly.

Mr James Dunn

  • Recent member
  • *
  • Posts: 20
Re: Help with expression for organising albums
« Reply #5 on: August 26, 2013, 03:49:35 pm »

Perfect!!

Thanks.

I do try to follow work out the expressions myself, but the 'logic' ends up making my head hurt!!

J
Pages: [1]   Go Up