title
Products            Buy            Support Forum            Professional            About            Codec Central
 
Results 1 to 14 of 14

Thread: commas in naming ... how?

  1. #1

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    commas in naming ... how?

    Using the "naming" functionality to organize where ripped files go. Typically, artists go into their own directory (and albums in subdirectories of the artists.) However, if the artist name starts with "The " (such as "The Beatles"), I'd like the artist directory name to have the "The" following.

    For example, instead of "/The Beatles/", I'd like to see "/Beatles, The/".

    Here's what I've come up with, but it doesn't work:

    [IF][SETLEN]4,,,[album artist][],=,The ,[GRAB]5,,[album artist], The[],[album artist][]

    The problem is that the "comma" (after "[album artist]" and before " The[]") is being interpreted as a parameter delimiter for one of the functions. To better illustrate which comma, I'll show the same line using a dollar ($) sign in it's place:

    [IF][SETLEN]4,,,[album artist][],=,The ,[GRAB]5,,[album artist]$ The[],[album artist][]

    This, by the way, works (The result is "Beatles$ The")

    How can I replace the "$" with a comma (and have it work?) Is there some way to escape a comma character?

    Thanks
    Gary
    Last edited by garyd9; 08-03-2014 at 07:39 PM.

  2. #2
    Administrator
    Join Date
    Apr 2002
    Posts
    40,631

    Re: commas in naming ... how?

    To change an artist such as 'The Beatles' to 'Beatles, The':

    [IFEQUALS]artist,The [DEL]1,4,[artist][],[TRIM][DEL]1,4,[artist][], The[][]

  3. #3

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    This doesn't work in the context I'm using it in. (Perhaps my fault for not explaining that this is part of a much larger string.)

    Here's my full Naming string:
    Code:
    [IFVALUE]album artist,[album artist],[IFCOMP]Various Artists[][IF!COMP][artist][][]\[album]\[IFMULTI]Disc [disc]\[][track] [IFCOMP][artist] - [][title]
    (I'm doing quite a bit here... I know..)

    For the purpose of discussion, I'll assume an album artist of "The Beatles" and an album name of "The Best Of".

    The above string will show up as:

    The Beatles\The Best Of\01 Track Name

    I'd LIKE for it to show up as:

    Beatles, The\The Best Of\01 Track Name

    Making the change you suggested, I end up with the following naming:
    Code:
    [IFVALUE]album artist,[IFEQUALS]artist,The [DEL]1,4,[artist][],[TRIM][DEL]1,4,[artist][], The[][],[IFCOMP]Various Artists[][IF!COMP][artist][][]\[album]\[IFMULTI]Disc [disc]\[][track] [IFCOMP][artist] - [][title]
    Which formats the string as:

    Beatles\The Best Of\01 Track Name

    For albums with artists that don't have "The", it somehow just completely cuts off the artist name. (So, the example shown in the naming dialog comes up as "\Immaculate\05 Holiday"

    So, I'm back to my original string (using a semi-colon):
    Code:
    [IFVALUE]album artist,[IF][SETLEN]4,,,[album artist][],=,The ,[GRAB]5,,[album artist][]; The,[album artist][],[IFCOMP]Various Artists[][IF!COMP][artist][][]\[album]\[IFMULTI]Disc [disc]\[][track] [IFCOMP][artist] - [][title]
    ... and then manually renaming the directory after everything is ripped...

    Suggestion?

    Thanks
    Gary
    Last edited by garyd9; 08-04-2014 at 04:59 PM.

  4. #4

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Another variation that fails:
    Code:
    [IFVALUE]album artist,[IFEQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][DEL]1,4,[album artist][], The[][][IF!EQUALS]album artist,The [DEL]1,4,[album artist][],[album artist][],[IFCOMP]Various Artists[][IF!COMP][artist][][]\[album]\[IFMULTI]Disc [disc]\[][track] [IFCOMP][artist] - [][title]
    Same issue:

    Beatles\The Best Of\01 Track Name.

  5. #5
    dBpoweramp Guru
    Join Date
    Sep 2011
    Posts
    754

    Re: commas in naming ... how?

    Rather than try to use a "one-size-fits-all" approach with your naming string, I'd suggest you instead use ripping profiles for the main categories of albums you use. Even just using a separate "Compilations" profile allows you to remove that contingency (and all its verbiage) from your other naming string(s). This accomplishes two things:

    (1) You avoid the problem you're dealing with right now. Long, complicated naming strings are really tedious to construct and debug, and it seems like there's always a new circumstance you have to go back and write in.

    (2) You can better "fine tune" the profile for the specific type of album (the profile is meant for). For example, I organize compilations differently than I do "regular" albums, and I prefer a different naming scheme for them as well. My Compilations ripping profile is constructed to address these specs, and my other ripping profiles aren't cluttered up with any IFCOMP/IF!COMP contingency strings.

  6. #6
    dBpoweramp Guru
    Join Date
    Dec 2008
    Location
    London, UK
    Posts
    3,726

    Re: commas in naming ... how?

    Quote Originally Posted by BrodyBoy View Post
    I'd suggest you instead use ripping profiles for the main categories of albums you use
    ... or consider populating the Sort Album Artist tag and using it in the 'Naming ' section.

  7. #7

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Quote Originally Posted by BrodyBoy View Post
    Rather than try to use a "one-size-fits-all" approach with your naming string, I'd suggest you instead use ripping profiles for the main categories of albums you use.
    For *me*, that would be more error prone than dealing with long complicated strings. I'm VERY likely to forget to change a profile, and would rather spend 3 days doing nothing but trying to find the "perfect" naming string. Once I find that perfection, I can leave it alone (for at least 4 weeks.)

    I realize that this isn't exactly sane. My only excuse is that I'm a professional software engineer.

    Take care
    Gary

  8. #8

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Quote Originally Posted by mville View Post
    ... or consider populating the Sort Album Artist tag and using it in the 'Naming ' section.
    Hmm... Could I populate it automatically so that it could be used in naming directories when I rip a CD? Perhaps something kind of script that runs after the metadata is loaded? I'm trying to avoid manual work (as I tend to forget steps when I'm in a pattern of ripping hundreds of CD's.)

    If I have to manually edit something, it's faster for me to just rename the artist directory some time later after I've ripped all the CD's for an artist. Of course, I'd RATHER have it work automatically.

    Here's my ideal work flow (for literally over 400 CD's): Insert disc; Verify the cover art; Glance quickly at the metadata to ensure the proper disc was selected and there aren't any obvious errors; Click "Rip."

  9. #9
    dBpoweramp Guru
    Join Date
    Dec 2008
    Location
    London, UK
    Posts
    3,726

    Re: commas in naming ... how?

    Quote Originally Posted by garyd9 View Post
    Hmm... Could I populate it automatically so that it could be used in naming directories when I rip a CD?
    In CDRipper, it may or may not get populated from the online metadata sources. You would have to check that it is set correctly, before ripping. If it is not set, you would have to add it manually.

  10. #10

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Quote Originally Posted by mville View Post
    In CDRipper, it may or may not get populated from the online metadata sources. You would have to check that it is set correctly, before ripping. If it is not set, you would have to add it manually.
    Hmm.. Just played with it a bit, and I'm not thrilled with how it works. For example, I happened to have an "Elton John" CD in the drive, and it was changing the album sort to "John, Elton" (I don't sort by last name.) I wonder if it would also sort "Pink Floyd" as "Floyd, Pink". (If so, I'll offer it a cigar.)

    I might try rewriting my "naming" string to make it a bit less complicated (by making longer than it already is.) Instead of using conditionals that have if/else, I'll just use "if" types. For example, instead of: "[IFVALUE]album artist, [album artist], Various[]", it might work better if I use something like: "[IFEQUALS]album artist,,Various[][IF!EQUALS]album artist,,[album artist][]"

    Not sure.. I'll have to play around some more. It should would be easier if there was just a way to escape commas so they aren't interpreted as a function delimiter. Or perhaps a new pseudo-tag: [comma] - inserts a comma.

  11. #11

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    I think I got it! By replacing the "if/else" type statements (see my post above) with just "if" statements (again - see the above post), it doesn't get confused by the comma. Now the full string is:
    Code:
    [IF!EQUALS]album artist,,[IFEQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][DEL]1,4,[album artist][], The[][][IF!EQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][album artist][][][][IFEQUALS]album artist,,[IFCOMP]Various Artists[][IF!COMP][artist][][]\[album]\[IFMULTI]Disc [disc]\[][track] [IFCOMP][artist] - [][title]
    Now, and I'm going to blame @mville for this, I wonder if I can use this type of thing to populate ID tags. (Answer: Quick check of the docs, and it looks like I can use an external script to do it...)

    Take care
    Gary

  12. #12
    dBpoweramp Guru
    Join Date
    Dec 2008
    Location
    London, UK
    Posts
    3,726

    Re: commas in naming ... how?

    Quote Originally Posted by garyd9 View Post
    Hmm.. Just played with it a bit, and I'm not thrilled with how it works. For example, I happened to have an "Elton John" CD in the drive, and it was changing the album sort to "John, Elton" (I don't sort by last name.)
    If you don't sort by last name, then you would set Album Artist Sort to Elton John

    Quote Originally Posted by garyd9 View Post
    I wonder if it would also sort "Pink Floyd" as "Floyd, Pink".
    Only if you rip the CD with Album Artist Sort set to Floyd, Pink

    To explain where I'm coming from, in my experience, getting the tags and artwork set correctly before ripping is essential and I would not recommend a slap-dash approach in CDRipper.

    I know it's a little time consuming, but getting the tags and artwork right at this point saves a lot of time further down the line, especially considering the plethora of media servers/media players/streaming devices that you may come across in the future.

    When it comes to building my music library, I go by the Benjamin Franklin quote "By failing to prepare, you are preparing to fail"
    Last edited by mville; 08-05-2014 at 08:09 AM. Reason: quote added

  13. #13

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Quote Originally Posted by mville View Post
    If you don't sort by last name, then you would set Album Artist Sort to Elton John
    I don't want to have to set it myself. Every single thing I have to do manually (for each CD) is something else I can forget to do, or something I can screw up. I realize some of the automatic stuff won't work all the time. However, it does work the majority (80+ percent) of the time, and in those cases I don't have to do anything except glance at the artwork and metadata screens.

    Anyway - now that I have the directory naming working the way I want, this thread is a moot point. I'd rather people reading the thread learn from my experience working with the naming stuff than to read a debate over automation vs manual editing.

    Take care
    Gary

  14. #14

    Join Date
    Jan 2011
    Location
    Pittsburgh, PA (USA)
    Posts
    39

    Re: commas in naming ... how?

    Quote Originally Posted by aengusafton View Post
    its not working, is there any other way to change it ???
    What, exactly, is not working? (Please be descriptive... no one can possibly know what is inside your head, so you have to tell us.)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •