Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TagFormat is not working properly
29-01-2023, 19:40
Post: #41
RE: TagFormat is not working properly
Thanks for the explanation.
I learnt more things.

Is it really necessary to create a line of code for every year existing in the library?
Something like this is not possible?

Code:
@ALBUM=0
+NONALBUMDATE=DATE

@ALBUM=1
+ALBUMDATE=DATE

I fear the answer is yes (resp. no), otherwise you would have proceeded like this. Smile
Find all posts by this user
Quote this message in a reply
29-01-2023, 21:34
Post: #42
RE: TagFormat is not working properly
(29-01-2023 19:40)ischowam Wrote:  Is it really necessary to create a line of code for every year existing in the library?

I fear the answer is yes (resp. no), otherwise you would have proceeded like this. Smile
Unfortunately you need to supply a value, not a tag. Similarly, you have to always match on a value, meaning you can't match on a missing value, which is why it's a little bit more difficult if you only have a tag to identify the non-album tracks. There are other restrictions too, like you can only update (=) or delete (-) the tags referenced in the @ instruction, so you need to get a little creative.

I've just had a quick look and the following export code should work in mp3tag:
Code:
£filename(D:\tagUpdate.txt,utf-8)
@#AUDIOCHANNELS=1
@#AUDIOCHANNELS=2
@#AUDIOCHANNELS=5.1
£loop(%year%,1)&DATE=%year%
+ALBUM_DATE=%year%
£loopend()

£loop(%year%,1)@ALBUM_DATE=%year%
&NONALBUM=1
-ALBUM_DATE
£loopend()

@NONALBUM=1
£loop(%year%,1)&DATE=%year%
+NON_ALBUM_DATE=%year%
£loopend()
NOTE: Replace the £ in the above with $ as the forum software doesn't like the $.
This assumes you're loading all your files into mp3tag when you do the export. If you can't do that, and if you know the earliest year in your collection we could probably knock up a batch script to do it.

Change the filename() path to whatever you want. This file will need to be uploaded to the Synology before you can make the MinimServer changes.
I've assumed a tag of NONALBUM=1 as the tag to identify your non-album tracks but change it to whatever you want (in both places).
The above code is different to what I set out before as I'm assuming you only have a tag to identify non-album tracks, but if there's a tag to identify album tracks then we can simplify it.

mp3tag logic
The loop command in the script is a way to loop through all the unique (the 1 in the function) values of a tag, the end of the loop being the loopend(). The text in the loop is output to the $filename.

MinimServer logic
The AudioChannels match is there to create a new tag called Album_Date for every track (it basically copies the date tag). This tag will ultimately be used in album.displayFormat. I'm assuming here that all your music have either 1, 2 or 5.1 channels.
The next step removes the Album_Date tag from non-album tracks.
The final step is to create a new tag called Non_Album_Date for non-album tracks that will be used in the title.displayFormat.
NOTE: When referencing tags in a MinimServer tagUpdate script the tag names must be in uppercase.

To create the tagUpdate script in mp3tag:
File > Export > New config (document with star image)
Give it a name then click OK
In the resulting window paste the code above (remembering to change the £), then close notepad
Click OK and it should create the file for you.

Then back in MinimSever you'd need to change:
itemTags: #AudioChannels, NonAlbum, Album_Date, Non_Album_Date
tagFormat: album.displayFormat={$album^^ $Album_Date^[^]^}, title.displayFormat={$title^^$#AudioDuration^ ^^$#AudioFormat^ | ^^ $Non_Album_Date^[^]^}
NOTE: I've used NonAlbum, correct this to whatever tag you've used above.
tagUpdate: <path and filename on synology where you've uploaded the tagUpdate file to>

Change the title.displayFormat to whatever you want, I've just appended it for now.

Then do a MinimServer restart and that should be it, but it's likely that I've forgotten something, or I have missed a step so just shout back if you have a problem.
Find all posts by this user
Quote this message in a reply
29-01-2023, 21:43
Post: #43
RE: TagFormat is not working properly
Well, what shall I say?

Your support is a all-round carefree package!!

I will give it a try sometime.
Currently I am a bit busy with other things.

Maaaaayyybeeee I will revert to your suggestion to always add the year to the title Big Grin

But in general I received a lot more knowledge about Minimserver.

Thank you again for your patience and always detailed descriptions.

Regards
Find all posts by this user
Quote this message in a reply
30-01-2023, 09:54
Post: #44
RE: TagFormat is not working properly
(29-01-2023 21:43)ischowam Wrote:  Maaaaayyybeeee I will revert to your suggestion to always add the year to the title Big Grin

I know you provided some samples, but I don't think you ever actually explained why you have multiple albums with the same name in a single folder, or was it that the album tag was empty, but another, better option might be to use a different tag for track release dates (if they're just random tracks that were never part of a release), then you could use the different tags in the relevant displayFormat options.

With FLAC files you can call your tags anything and MinimServer will be able to address them, I'm not so sure about other formats though. Looking at the tag mapping documentation it would appear that the only other date tag that MinimServer supports for non-FLAC tracks is RELEASEDATE in MP3 files (using ID3v2.4), so unless you only have FLAC and MP3 that might not work for you.

Anyway, you have options :-)
Find all posts by this user
Quote this message in a reply
30-01-2023, 11:25
Post: #45
RE: TagFormat is not working properly
Other formats also support encoding arbitrary tag names (TXXX for ID3v2/mp3 and '----' for iTunes/mp4/m4a). This is fully supported by MinimServer (see this section).
Find all posts by this user
Quote this message in a reply
30-01-2023, 16:43
Post: #46
RE: TagFormat is not working properly
(30-01-2023 11:25)simoncn Wrote:  Other formats also support encoding arbitrary tag names (TXXX for ID3v2/mp3 and '----' for iTunes/mp4/m4a). This is fully supported by MinimServer (see this section).
I can't have made it to the notes section, and I missed ORIGINALDATE as an option completely!

Need more sleep tonight clearly :-(

By the way, if I move a tag from itemTags to indexTags and then hit Apply, I get an error message stating
Quote:Item tag name 'xyz' is listed in indexTags; correct highlighted value and retry
If I then remove the tag from indexTags, click Apply, and paste it back it works. Moving tags the other way around is fine.
Find all posts by this user
Quote this message in a reply
30-01-2023, 17:18
Post: #47
RE: TagFormat is not working properly
(30-01-2023 16:43)simbun Wrote:  By the way, if I move a tag from itemTags to indexTags and then hit Apply, I get an error message stating
Quote:Item tag name 'xyz' is listed in indexTags; correct highlighted value and retry
If I then remove the tag from indexTags, click Apply, and paste it back it works. Moving tags the other way around is fine.

This happens because property updates are applied in the the order they appear on the page. When the addition to indexTags is processed, the removal from itemTags has not yet been applied. You need to remove the tag from itemTags and apply this change, then add the tag to indexTags.
Find all posts by this user
Quote this message in a reply
03-02-2023, 21:25
Post: #48
RE: TagFormat is not working properly
Hello

I am trying around with the ORIGINALDATE for quite a while now, but it is very confusing.
First of all I do not see the tag named ORIGINALDATE anywhere.
I see several tag-fields in my main apps (mp3Tag / MusicBee), which sound the same or at least similar, so that you could think, they are the same, but the are not.

mp3 Tag:
Here I need to create a custom-field only for displaying a value. In the list where I can select the value to be displayed I only find a field %original year%
Looking at the metadata after maintaining a file it is listed as "ORIGINAL YEAR"

MusicBee:
Here there is a field called "Originalyear" and it ends up in a tag "ORIGYEAR"

And both are different fields, as only one is displayed, depending on my displayFormat string

Code:
title.displayFormat={$title^^$#AudioDuration^       ^^$Origyear^[ ^ ]$#AudioFormat^  |  ^^}

Is ORIGINALDATE not such a common/standard tag as TITLE, ARTIST, ALBUM etc.? And isn't it handled more or less in the same way in all apps like TITLE, ARTIST, ....?
Find all posts by this user
Quote this message in a reply
03-02-2023, 22:04 (This post was last modified: 03-02-2023 22:30 by simbun.)
Post: #49
RE: TagFormat is not working properly
(03-02-2023 21:25)ischowam Wrote:  I am trying around with the ORIGINALDATE for quite a while now, but it is very confusing.
First of all I do not see the tag named ORIGINALDATE anywhere.
I see several tag-fields in my main apps (mp3Tag / MusicBee), which sound the same or at least similar, so that you could think, they are the same, but the are not.
What format are you tagging, MP3 I assume? If so, do you know what ID3 standard your tags are written in e.g. ID3v2.3 or ID3v2.4 or a mixture (shown in the mp3tag column 'Tag' or by right clicking and viewing the Properties window).


(03-02-2023 21:25)ischowam Wrote:  mp3 Tag:
Here I need to create a custom-field only for displaying a value. In the list where I can select the value to be displayed I only find a field %original year%
Looking at the metadata after maintaining a file it is listed as "ORIGINAL YEAR"
What metadata are you looking at exactly. The names given in all the UI's (especially for MP3's) are not necessarily how the tags are stored. I'll have a play with Mp3tag later. The easiest way to really tell how your tags are stored is by opening the file in a hex editor.

(03-02-2023 21:25)ischowam Wrote:  Is ORIGINALDATE not such a common/standard tag as TITLE, ARTIST, ALBUM etc.? And isn't it handled more or less in the same way in all apps like TITLE, ARTIST, ....?
There are really very few tags that every application deals with consistently, this is why I like FLAC and OGG Vorbis.

I've found the following links useful:
https://wiki.hydrogenaud.io/index.php?ti...ping#Dates
https://picard-docs.musicbrainz.org/en/a...ase-date-1


EDIT: It looks like Mp3tag should have %ORIGYEAR% which aligns with the other docs I attached (stored in TORY and TDOR): https://docs.mp3tag.de/mapping/

One way to look at the raw data in hex is to use the command: certutil -encodehex 01.08.mp3 output.txt, where you'll see something like:

Code:
0000    49 44 33 04 00 80 00 00  13 3c 54 49 54 32 00 00   ID3......<TIT2..
0010    00 0d 00 00 03 46 69 6e  69 73 68 20 4c 69 6e 65   .....Finish Line
0020    00 54 41 4c 42 00 00 00  17 00 00 03 54 68 65 20   .TALB.......The
0030    4c 6f 63 6b 64 6f 77 6e  20 53 65 73 73 69 6f 6e   Lockdown Session
0040    73 00 54 53 4f 50 00 00  00 1b 00 00 03 4a 6f 68   s.TSOP.......Joh
0050    6e 2c 20 45 6c 74 6f 6e  00 53 74 65 76 69 65 20   n, Elton.Stevie
0060    57 6f 6e 64 65 72 00 54  53 4f 32 00 00 00 0d 00   Wonder.TSO2.....
0070    00 03 4a 6f 68 6e 2c 20  45 6c 74 6f 6e 00 54 43   ..John, Elton.TC
0080    4f 4e 00 00 00 05 00 00  03 50 6f 70 00 54 44 52   ON.......Pop.TDR
0090    43 00 00 00 06 00 00 00  32 30 32 31 00 54 52 43   C.......2021.TRC
00a0    4b 00 00 00 04 00 00 00  31 34 00 54 50 4f 53 00   K.......14.TPOS.
00b0    00 00 07 00 00 00 30 31  2f 30 31 00 54 50 45 31   ......01/01.TPE1
00c0    00 00 00 1a 00 00 03 45  6c 74 6f 6e 20 4a 6f 68   .......Elton Joh
00d0    6e 00 53 74 65 76 69 65  20 57 6f 6e 64 65 72 00   n.Stevie Wonder.
00e0    54 50 45 32 00 00 00 0c  00 00 03 45 6c 74 6f 6e   TPE2.......Elton
00f0    20 4a 6f 68 6e 00 54 58  58 58 00 00 00 0d 00 00    John

Where you'll notice the files names like TIT2, TALB, TSOP, TPOS e.t.c.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)