Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: m-TAGS component (foo_tags) (Read 160716 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

m-TAGS component (foo_tags)

Reply #25
A few notes now that I've experimented a little more with this component:

- It would be really nice to have a preferences setting to control the naming of the !.tags file, especially with title formatting. If I have a .tags file for an album, I'd want to name it something like %album artist% - %date% - %album%.

- There should also be a preferences setting to control if creating m-tags in a seperate directory mimics the original directory structure or just creates a flat list - obviously, that could only be done and would only make sense if the !.tags files were instead named according to a title formatting pattern. Probably, it'd make sense to set up at least 2 title formatting patterns - one for creating m-tags in the same directory, one for separate directory.

- I don't use embedded artwork, but instead have folder.jpg in the same directory as the songs. If I create the .tags files in the same directory, the artwork displays correctly in foobar. But if I create the .tags files in a seperate folder, no artwork displays - obviously because foobar is loading the .tags file, not the audio files, and there may be no way around this, but it is inconvenient.

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.

m-TAGS component (foo_tags)

Reply #26
The UTF-8 version is the currently downloadable one: http://m-tags.org/foo_tags.dll

You may very well have downloaded it already without knowing.


Ah, I thought you just reverted to previous version, but after downloading it it seems that it's not the same as initial utf-8 version.
I installed it now, and hope for no crash

And even if it would crash I won't go back to version with user locale


Quote
As for your python scripting demo, I find it very interesting. You point out that if the tags are in a single file, as opposed to "one-per-media-file", then things need to be approached differently. This is VERY MUCH the case, and it is because, by way of optimization, m-TAGS does not store all tag values for all entries, but "cascades" the values through the entries. This means that you would have to write a special algorithm to read the m-TAGS file.

I have the algorithm, of course. Let me know if you need it. But I wonder if I should add an option to create m-TAGS files WITHOUT cascading the values, for people who would like to take advantage of their JSON format for scripting. The inpact in space and loading time would probably be minimal anyway.

Thanks,

that should be simple in Python (assuming cascaded json file loaded in `dat` object):

Code: [Select]
for d in dat:                                   # for each json object
    for k in dat[0].keys():                     # for each key in json's top object
        if k not in d.keys():                   # if key doesn't exist in any of json's (cascaded) objects
            d.update({k : dat[0].get(k)})       # update the object


Result is updated uncascaded dictionary object `dat` (consider it json object)

I guess this can be further simplified in oneliner iterator/comprehension or so, but this way it's easier to see the logic


To repeat it again, I find your idea excellent.
You expose all metadata in portable format, writing new metadata should be faster then writing it in media file. Various benefits to keeping media readonly.
I wonder why no one else explored such possibility. Only drawback, if I can say it like that, could be that this concept may be confusing to regulars
I myself also will spend some time experimenting until I get familiar with this workflow

Cheers

m-TAGS component (foo_tags)

Reply #27
Noticed 2 issues with latest version:

1. Although it declares as UTF-8, it seems that does not read UTF-8, but in local codepage. It understands UTF-8 just fine if I retag m-tags afterwards, but while reading tags from files, metadata is normalized in user locale

2. Option to create tags in separate folder is dangerous if folder for storing m-tags is chosen inside location of source files. Explanation:

root
+ artist1
+ artist2

If I make m-tags folder as root subfolder and select root as source, then recursion makes additional ghost folders as it reads also this m-tags folder (I guess traversing is alphabetic so perhaps all artist with names starting in anything "lower" then M in this example are ghosted)

m-TAGS component (foo_tags)

Reply #28
3. It changes foobar' working/default path, which is the folder where foobar executable is located. I'm not sure which command does this, perhaps menu command - create m-tags in same folder.

m-TAGS component (foo_tags)

Reply #29
Noticed 2 issues with latest version:

1. Although it declares as UTF-8, it seems that does not read UTF-8, but in local codepage. It understands UTF-8 just fine if I retag m-tags afterwards, but while reading tags from files, metadata is normalized in user locale

2. Option to create tags in separate folder is dangerous if folder for storing m-tags is chosen inside location of source files. Explanation:

root
+ artist1
+ artist2

If I make m-tags folder as root subfolder and select root as source, then recursion makes additional ghost folders as it reads also this m-tags folder (I guess traversing is alphabetic so perhaps all artist with names starting in anything "lower" then M in this example are ghosted)


romor:

1. That should be fixed now: http://m-tags.org/foo_tags.dll. Please let me know....

2. You are really pushing it...... Yes it is traversed in alphabetical order, so you are right. I MAY decide to put in a check for such an irresponsible user behaviour :-)

m-TAGS component (foo_tags)

Reply #30
3. It changes foobar' working/default path, which is the folder where foobar executable is located. I'm not sure which command does this, perhaps menu command - create m-tags in same folder.


Can you be a little more specific? I do not notice this behaviour.

m-TAGS component (foo_tags)

Reply #31
A few notes now that I've experimented a little more with this component:

- It would be really nice to have a preferences setting to control the naming of the !.tags file, especially with title formatting. If I have a .tags file for an album, I'd want to name it something like %album artist% - %date% - %album%.

- There should also be a preferences setting to control if creating m-tags in a seperate directory mimics the original directory structure or just creates a flat list - obviously, that could only be done and would only make sense if the !.tags files were instead named according to a title formatting pattern. Probably, it'd make sense to set up at least 2 title formatting patterns - one for creating m-tags in the same directory, one for separate directory.

- I don't use embedded artwork, but instead have folder.jpg in the same directory as the songs. If I create the .tags files in the same directory, the artwork displays correctly in foobar. But if I create the .tags files in a seperate folder, no artwork displays - obviously because foobar is loading the .tags file, not the audio files, and there may be no way around this, but it is inconvenient.

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.


- I will add an option to change to "!" to soemething else. I will not mess around with title formats, though, because it may lead to disastrous results. If you want to rename the m-TAGS files, all you have to do is load them into fb2k and use the fb2k contextual file operations to move / copy / rename them. You can use title formatting too, in this case. However, remember to check the option "Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator / Only use absolute paths in references", otherwise the locators in the m-TAGS files will be invalid if you move or copy the files (rename is ok, of course).

- Same as above

- The artwork is an issue. Not for me as I always keep my m-TAGS files together with the media files, but I understand the struggle! One solution is of course to keep all non-audio files together with the m-TAGS files rather than with the media. After all, these files can be considered "tag-like" in nature, as they are not directly related to the audio sources, and they may also may change in time (you may get a cover with better resolution, you may rescan the booklet, etc.). Otherwise, if the relationship m-TAG file / audio files is fixed (for example, the m-TAGS folder structure replicated the audio files structure) then you can easily add a new Album Art source in "Preferences / Display".

- That is strange. It should be an always-or-never situation, independent of file colocation. I guess it depends on the way fb2k reads theembedded artwork. I may investigate this.

m-TAGS component (foo_tags)

Reply #32
UPDATE

New version here: http://m-tags.org/foo_tags.dll

New additions:

1. The component will generate UTF-8 files. It will still be able to read non-UTF-8 files.

2. Added the possibility to change the default name for multi-reference m-TAGS file from "!" to another name (Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator).

3. Added an option to always write all tags for each media source, without implementing the "cascading" optimization. It may simplify scripting on m-TAGS files (Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator).

4. I added a command line option to create m-TAGS files "in-place" given a certain folder. It behaves exactly as if the provided folder had been selected using "File / m-TAGS / Create m-TAGS (in same folder)". The syntax is:

Code: [Select]
foobar2000 /m-TAGS <folder>


If you know how to create a shell context-menu script (it is quite easy in XP, I do not know about W7), then you can use the above command to "m-TAG" on the fly a folder and all subdirs from within Windows Explorer. Obviously, fb2k will start if it is not open. However, f you use

Code: [Select]
foobar2000 /quiet /m-TAGS <folder>


then you can "m-TAG" your folders without opening fb2k's main window.

m-TAGS component (foo_tags)

Reply #33
1. That should be fixed now: http://m-tags.org/foo_tags.dll. Please let me know....

Works!

2. You are really pushing it...... Yes it is traversed in alphabetical order, so you are right. I MAY decide to put in a check for such an irresponsible user behaviour :-)

It's not the point that it's alphabetical of course, but it includes it's own folder and makes .tags files for created .tags files. It can't create m-tags for .tags! Anyhow it seems like you have corrected that

Can you be a little more specific? I do not notice this behaviour.

Command that changes foobar folder is context menu command "create m-tags files".
It's bad practice, and other components depend on it. This is last issue involving such practice: http://www.hydrogenaudio.org/forums/index....st&p=805524
Others also if you search the forums


Have a nice day

m-TAGS component (foo_tags)

Reply #34
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

Let me give you an example. If I own Frank Sinatra's "Complete Reprise Studio Recordings" box, then I may m-TAG it and load the m-TAG files into fb2k. At that point, by properly selecting the various subsets of tracks, I can recreate EVERY original album, EVERY single and even any of the gazillion Frank's compilations put out by Reprise. m-TAGS would take the tags from the original m-TAGS file(s) and copy them into my "extracted" m-TAGS files. Then, all I have to do is to change the album related tags (%album%, %track number%) in each of them and I am done. Just have to add the artwork to the folders and I have a nice Sinatra Reprise discography without physical duplication!

This feature is very important. That is why m-TAGS files should not be in a subfolder of the files to which they point. For the software there is no way (unless I add complicated checks, and the again someone may not want them) to figure out if an m-TAG file should be processed or not, because it cannot figure out what the user's intentions were when he created the m-TAG files. Even if I add a check for when the files are created the first time (i.e. do not parse what I just created) there is no way to enforce such a rule if you RESCAN the same folder (and subfolders) a second time.

-----------------

As for the foobar folder issue, I will definitely look into it.


Thanks again!

m-TAGS component (foo_tags)

Reply #35
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior  for both relative and absolute paths

m-TAGS component (foo_tags)

Reply #36
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior  for both relative and absolute paths


Would you be able to send me a log and one of the misconstructed tags files?

m-TAGS component (foo_tags)

Reply #37
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior  for both relative and absolute paths


Never mind. I see what happens and I know why. I will fix it later today.





m-TAGS component (foo_tags)

Reply #38
If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior  for both relative and absolute paths


Should be fixed. Let me know if it works for you, please!

http://m-tags.org/foo_tags.dll


m-TAGS component (foo_tags)

Reply #39

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.

- That is strange. It should be an always-or-never situation, independent of file colocation. I guess it depends on the way fb2k reads theembedded artwork. I may investigate this.


If I'm remembering correctly, whether foobar shows external/folder artwork or embedded artwork depends upon size when both are present. Foobar displays whichever is larger. So... it may be that foobar detects the folder artwork as being larger (but cannot display it) and thus fails to display the embedded artwork.

@sevenarts:
Try removing the artwork from one of your folders and see if foobar will display the embedded artwork. On the other hand, if you're a Columns UI user, you can try going to Preferences > Display > Columns UI > Artwork tab and selecting Embedded artwork under Built-in foobar2000 artwork reader mode:.

m-TAGS component (foo_tags)

Reply #40
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

Audio tags frustrated me for years because I couldn't do that. Your idea is positively brilliant! A thousand thanks!

m-TAGS component (foo_tags)

Reply #41
Love it so far.  Whenever I buy an album, I usually want to alter the tags one way or another, but I also want to keep the files as untouched as possible.  I've been generating cuesheets and editing them instead for a while, but this is way more versatile.

The only problem I see now is track-splitting.  While this thing can read embedded cuesheets and tag the tracks separately, attempting to embed a cuesheet in a .tags file just gives me a non-functioning tag with the CUESHEET name.

m-TAGS component (foo_tags)

Reply #42
Very nice tool for creating virtual albums

Many thanks!
Warning: fb2k is addictive.

m-TAGS component (foo_tags)

Reply #43
Love it so far.  Whenever I buy an album, I usually want to alter the tags one way or another, but I also want to keep the files as untouched as possible.  I've been generating cuesheets and editing them instead for a while, but this is way more versatile.

The only problem I see now is track-splitting.  While this thing can read embedded cuesheets and tag the tracks separately, attempting to embed a cuesheet in a .tags file just gives me a non-functioning tag with the CUESHEET name.


I use embedded cues all the time. I do NOT use external cue files at all, though. I am not sure that I understand what you are trying to do: embedding a cue sheet in an m-TAGS file? What do you mean for that? m-TAGS files cannot embed cue sheets. You just "m-TAG" either the cue sheet file or the audio file with the embedded cue sheet.

Please give me some more details. I do not understand if this is a bug or if you are trying to do something I did not foresee.

m-TAGS component (foo_tags)

Reply #44
Hi. Thanks for this app. It works the way I wanted it to.

Is it possible to somehow change or locate the music source? In case I move the music to a different location. Thanks.

m-TAGS component (foo_tags)

Reply #45
I use embedded cues all the time. I do NOT use external cue files at all, though. I am not sure that I understand what you are trying to do: embedding a cue sheet in an m-TAGS file? What do you mean for that? m-TAGS files cannot embed cue sheets. You just "m-TAG" either the cue sheet file or the audio file with the embedded cue sheet.

Please give me some more details. I do not understand if this is a bug or if you are trying to do something I did not foresee.

A file that already has an embedded cue in it works fine.  An external cue works fine, too, but I'm trying to reduce how many extra files I'm using.

If I understand correctly from looking at files in a hex editor, an embedded cuesheet is actually simply another tag, and when foobar2000 sees it, it knows what to do.  If it's a tag in m-TAGS, though, foobar2000 still sees it, but doesn't know what to do, and it only shows up as an extra tag in the Properties dialog.  So, as you said, m-TAGS cannot embed a cuesheet, but I don't understand just why it can't.

m-TAGS component (foo_tags)

Reply #46
I'm actually having problems playing certain tracks in my library. I'm sure the .tags! file points to the correct location of the song files.

I'm getting the following error:
Quote
Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Fujitou_Chika_-_K-ON!_character_image_song_series_-_Manabe_Nodoka_[w_scans]_(FLAC)\!.tags" / index: 1

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Various_Artists_-_K-ON!_Official_Band_Yarou_yo!!_[w_scans]_(FLAC)\DISC 1\!.tags" / index: 17

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Hyakkoku_Hajime_-_K-ON!_ORIGINAL_SOUND_TRACK_[w_scans]_(FLAC)\!.tags" / index: 18

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Various_Artists_-_K-ON!_Official_Band_Yarou_yo!!_[w_scans]_(FLAC)\DISC 1\!.tags" / index: 13

Do you know how I could fix this? I was thinking a feature that allows u to change the path of source file would fix it. I'm trying to avoid recreating the m-TAGS files, because I have created a lot of tags for these songs already.

m-TAGS component (foo_tags)

Reply #47
I'd like to try this new component but i'm not able to download it :S
My browser load the page http://m-tags.org forever, with no success.
Is it down or it's just a problem of mine?

m-TAGS component (foo_tags)

Reply #48
The site appears to be down. I haven't had the chance to download and try the latest "version".