title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Using custom tags in preformat

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thr4121
    • Aug 2020
    • 10

    Using custom tags in preformat

    Hi,

    can you use custom tags in preformat? I have added group to the database fields. Now I wanted to use it in preformat like this:

    Code:
    preformat:=album:=[album] ([group])
    But in the browse tree, all the albums have just the literal value ([group]) attached.

    Is it somehow possible to achieve what I want?


    Best regards,
    thr4121
  • Spoon
    Administrator
    • Apr 2002
    • 43930

    #2
    Re: Using custom tags in preformat

    Try:

    preformat:=album:=[album] ([tag]group[])
    Spoon
    www.dbpoweramp.com

    Comment

    • thr4121
      • Aug 2020
      • 10

      #3
      Re: Using custom tags in preformat

      Thanks! That works perfectly.

      Maybe you could "promote" it in the documentation (https://dbpoweramp.com/Help/dMC/Naming.htm). I looked again and it's mentioned there, but only in the context of [REPLACE], and I either overlooked it or didn't make the connection.

      Comment

      • thr4121
        • Aug 2020
        • 10

        #4
        Re: Using custom tags in preformat

        Thanks! Works perfectly.

        Comment

        • simbun
          dBpoweramp Guru
          • Apr 2021
          • 460

          #5
          Re: Using custom tags in preformat

          Hi,

          Can we use custom tags within programmable actions as I can't seem to get them to work.

          If I check Year the preformat works:
          Code:
          preformat:=album:=[album][IFVALUE]year, - True, - False[]
          If I instead change it to a custom tag it always evaluates to True
          Code:
          preformat:=album:=[album][IFVALUE][tag]boxtitle[], - True, - False[]
          I've tried 'boxtitle' and '[boxtitle]' with the same results, and if I replace 'True' with '[tag]boxtitle[]' in the first statement above it correctly uses the tag value.

          I've added boxtitle to the Browse Tree and I'm seeing values, so it does appear that Asset understands the tag.

          Comment

          • simbun
            dBpoweramp Guru
            • Apr 2021
            • 460

            #6
            Re: Using custom tags in preformat

            @Spoon, @PeterP,

            Is there an update/response to this?

            I have a lot of uses for this so hope it's not limited to just the basic tags.

            Code:
            * Album (sort Compilations by name everything else by original release date - name)
            
            [if][album artist],=,Various Artists,[album] - [tag]originaldate[],[tag]originaldate[] - [album][][IFVALUE][tag]boxtitle[], (from the boxset '[tag]boxtitle[]')[][IFVALUE][tag]release[], ([tag]release[])[][IFVALUE][tag]remasterdate[], [[tag]remasterdate[]][]
            
            
            * Track Title
            
            [title][IFVALUE][tag]subtitle[], ([tag]subtitle[])[][IFVALUE][tag]tracktype[], [[tag]tracktype[] Track][]
            
            
            * Release Group (Box Set/Series View)
            
            [IFVALUE][tag]boxtitle[],[tag]boxtitle[],[IFVALUE][tag]series[],[tag]series[],[album][][]
            Thanks

            Comment

            • PeterP
              Super Moderator
              • Jul 2011
              • 1365

              #7
              Re: Using custom tags in preformat

              Code:
              preformat:=album:=[album][IFVALUE][tag]boxtitle[], - True, - False[]
              Tested, works for me, true/false suffixed depending on boxtitle tag being present.
              Also tested your other lines, all seems to work as designed, assuming relevant tags are present in your music files. Only issue I found was with:
              Code:
              [IFVALUE][tag]remasterdate[], [[tag]remasterdate[]][]
              ... where intended use of brackets around [remasterdate] appears to clash with [IFVALUE].

              Note that [boxtitle] isn't going to work, only a set of predefined tags is recognized in [brackets], others need [tag]tag_name_here[].


              Please note that - by design - preformat lines operate on original tags, not tags manipulated by previous preformat lines.
              If you introduce boxtitle in another preformat line rather than have it in your tags, it will not be seen by following preformat lines.
              If your use case clashes with this logic, I'll rethink it.

              Comment

              • simbun
                dBpoweramp Guru
                • Apr 2021
                • 460

                #8
                Re: Using custom tags in preformat

                Originally posted by PeterP
                Code:
                preformat:=album:=[album][IFVALUE][tag]boxtitle[], - True, - False[]
                Tested, works for me, true/false suffixed depending on boxtitle tag being present.
                I think I've found the problem.

                I tested with the preformat:
                Code:
                album:=[album] - [tag]boxtitle[] - [IFVALUE][tag]boxtitle[], - True, - False[]
                For albums without boxtitle I was seeing '(Unknown Boxtitle)' even though I'd see the values in the boxtitle index. For some reason, I then added ',TEXT' to boxtitle in MediaDatabaseFieldsv7a.txt and everything started working.

                My reference for not needing "boxtitle,TEXT" was this link, which is admittedly old, but there are many other tags in that file without a type declared so I figured it didn't need it. Did you declare the type when testing?
                Noticing that genre didn't have a type declared I tried the same, and it too didn't work.

                I'm running as 'Service' because 'Local Account' crashes AssetConfig.exe in my sandbox with the recent versions of AssetUPnP if that makes a difference.


                Thanks for taking the time to respond.

                Comment

                • simbun
                  dBpoweramp Guru
                  • Apr 2021
                  • 460

                  #9
                  Re: Using custom tags in preformat

                  With ",TEXT" added everything seems to work, and I can create a new tag and format as I wish:
                  Code:
                  preformat:=releasegroup:=[IFVALUE][tag]boxtitle[],[tag]boxtitle[] &*128230;,[IFVALUE][tag]series[],[tag]series[] &*9851;&*65039;,[album][][]
                  One problem though is that I don't get any artwork, nor do I if I just index boxtitle as is, is that expected? I was expecting/hoping that the underlying album artwork would be surfaced just like it is for Genre.
                  I have UpStream Artwork enabled.

                  Click image for larger version

Name:	AssetReleaseGroup.jpg
Views:	1
Size:	34.4 KB
ID:	294698

                  Comment

                  • simbun
                    dBpoweramp Guru
                    • Apr 2021
                    • 460

                    #10
                    Re: Using custom tags in preformat

                    I've just seen the definition of UpStream artwork here which is:
                    enables artwork from the first discovered track to appear next to an Artist, or Genre
                    Is there any way to make it available to other indexes as it really limits the potential use of preformat?

                    Comment

                    • simbun
                      dBpoweramp Guru
                      • Apr 2021
                      • 460

                      #11
                      Re: Using custom tags in preformat

                      Originally posted by simbun
                      I've just seen the definition of UpStream artwork here which is:

                      Is there any way to make it available to other indexes as it really limits the potential use of preformat?
                      Just to follow up on this.
                      A reply to another post on this forum directed me to the answer, and that's to add the new tag to the UpStreamArtFor.txt in the configuration folder.

                      When coupled with custom artwork (for the box-sets) added to AssetUserUpstreamImages it now looks like:

                      Click image for larger version

Name:	AssetReleaseGroup.jpg
Views:	1
Size:	35.3 KB
ID:	294701

                      It's just a shame there's no way to specify the index that the custom artwork is for, as 'The Beatles.jpg' now applies to the box-set and the artist.

                      Comment

                      Working...

                      ]]>