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 165810 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

m-TAGS component (foo_tags)

Reply #200
1.11 is out. It fixes some issues about media with unknown durations

m-TAGS component (foo_tags)

Reply #201
Two consistent crashes with the .dll posted here in the thread: http://j.fsbn.eu/crash%20reports.7z
Don't know if the version in foobar2000 components page is more recent but I had a crash with it too: http://j.fsbn.eu/crash%20reports-1.11.7z

I would really like to listen to my music. Is there some place where I could get 0.1 again? Nevermind, used File History to get 0.1 again. Pity about not having embedded art, but at least it plays even with newer tags.

m-TAGS component (foo_tags)

Reply #202
Two consistent crashes with the .dll posted here in the thread: http://j.fsbn.eu/crash%20reports.7z
Don't know if the version in foobar2000 components page is more recent but I had a crash with it too: http://j.fsbn.eu/crash%20reports-1.11.7z

I would really like to listen to my music. Is there some place where I could get 0.1 again? Nevermind, used File History to get 0.1 again. Pity about not having embedded art, but at least it plays even with newer tags.

Thanks for the report.

Can you please let me know what's the action (i.e. YOUR action) which caused the crashes?

Also, only one of the crash reports has the traces enabled. Can you reproduce the first two with traces enabled as well?

Finally (but maybe the first thing to try): can you please check the behaviour of this version:  http://m-tags.org/foo_tags.dll?


Thanks again!

m-TAGS component (foo_tags)

Reply #203
First time crashing I remember it crashing right after starting one song (that used m-tags). The others I think I was playing a song (not using m-tags) after restarting foobar2000 and then on changing to another one that used m-tags crashed it. The third time it took a few seconds after starting a m-tags song before crashing.

I'll try that dll with a clean version of fb2k.

Btw, my m-tags environment is:

"Music" library
|- m-tags (just m-tags with relative paths that point to m-tags files in "m-tagged")
|- m-tagged (media files as they were downloaded/ripped with !.tags in each folder with relative paths that point to media files)
|- rest (just media files that i don't mind modifying)

Seems to have stopped crashing but now you need to remake every m-tags file if you're thinking of changing tags, since it'll add
Code: [Select]
"DURATION" : [],

to every first file in an old m-tags file without that tag and error in that track:
Code: [Select]
Decoding failure at 0:00.000 (Unsupported format or corrupted file)


Using "Write m-TAGS to media files" on a m-tag pointing to another m-tag also seems to delete every @ reference in the latter.

m-TAGS component (foo_tags)

Reply #204
First time crashing I remember it crashing right after starting one song (that used m-tags). The others I think I was playing a song (not using m-tags) after restarting foobar2000 and then on changing to another one that used m-tags crashed it. The third time it took a few seconds after starting a m-tags song before crashing.

I'll try that dll with a clean version of fb2k.

Btw, my m-tags environment is:

"Music" library
|- m-tags (just m-tags with relative paths that point to m-tags files in "m-tagged")
|- m-tagged (media files as they were downloaded/ripped with !.tags in each folder with relative paths that point to media files)
|- rest (just media files that i don't mind modifying)

Seems to have stopped crashing but now you need to remake every m-tags file if you're thinking of changing tags, since it'll add
Code: [Select]
"DURATION" : [],

to every first file in an old m-tags file without that tag and error in that track:
Code: [Select]
Decoding failure at 0:00.000 (Unsupported format or corrupted file)


Using "Write m-TAGS to media files" on a m-tag pointing to another m-tag also seems to delete every @ reference in the latter.


OK. Great (so to speak). The crashing is the sensitive thing. I can fix the rest. Thanks for the input!

m-TAGS component (foo_tags)

Reply #205
RiCON:

Do you mind downloading the dll again (http://m-tags.org/foo_tags.dll) and let me know if

1) you still see crashes;
2) you still have the duration issue;
3) you still see the rewrite of m-TAGS files (they should not be rewritten at all).

What puzzles me the most is the duration issue, because I cannot replicate the "Unsupported format or corrupted file" error. Even if the duration is set to [], the file should play (and it does, for me), as such duration should be simply ignored!


Thanks a lot!

m-TAGS component (foo_tags)

Reply #206
No crashes;

There's still some kind of issue with the first (media) file. Unless I restart fb2k it can't be accessed if I did some operation with m-Tags. It's not tampering with the file, I think, but it's keeping it locked for some reason, unable to be read until you close the program. Sort of like, with v0.1 you had to close foobar after creating m-Tags because fb2k kept the file handles open even when not reading/writing the media files, so you couldn't move the files until you closed the program, but they could still be read.

The duration issue is probably related to mixing old m-tags with new. I'll check if it happens again later.

m-TAGS component (foo_tags)

Reply #207
No crashes;

There's still some kind of issue with the first (media) file. Unless I restart fb2k it can't be accessed if I did some operation with m-Tags. It's not tampering with the file, I think, but it's keeping it locked for some reason, unable to be read until you close the program. Sort of like, with v0.1 you had to close foobar after creating m-Tags because fb2k kept the file handles open even when not reading/writing the media files, so you couldn't move the files until you closed the program, but they could still be read.

The duration issue is probably related to mixing old m-tags with new. I'll check if it happens again later.


The lock issue is interesting. I ported m-TAGS to the latest SDK. I wonder if there is an issue with that. m-TAGS only accesses the files via the SDK, and trusts fb2k to close the handles (there is no "close()" method, neither for the input components, nor for the file instances). Input methods and files are closed via destructor, and I wonder if there is a glitch there. I will make a point to explicitly destroy my encapsulated inputs, just to make sure. But on a "write" (if that's the "operation you refer to") the encapsulated file is not even opened!!!

And why just the FIRST file, I wonder??? First or last is totally transparent to m-TAGS. It opens the input methods the same way, and it does NOT pre-open the first encapsulated file, either.

When you say "I did some operation with m-TAGS", what do you mean? A "write" operation (updating tags)? Or playing? And what file is locked? The encapsulated file or the m-TAGS file itself?

m-TAGS component (foo_tags)

Reply #208
I'm grabbing a fresh CD with a foobar2000 with only foo_tags.dll to run experiments.

Media library is set like my regular foobar2000 install, i.e.:
Code: [Select]
Library
|- "m-tagged"
   |- media that should remain untouched
      |- !.tags with relative paths to media in each album
|- "m-tags"
   |- contains folders for each artist\album in "m-tagged"
       |- .tags that point to the respective .tags file in "m-tagged"
|- "rest"
   |- media that I don't care remains pristine (don't contain .tags)
|- "temp"
   |- temporary place where I create the original .tags files after downloading/ripping a fresh album

So basically, I can't restrict my Media Library to just *.tags, since I need to also scan for *.flac, *.mp3, etc.

1 - Ripped a fresh album, placed it in a folder in "temp", enqueue the .flac files in fb2k
2 - "Create m-TAGS file" in the same folder as the media (in "temp")
3 - Remove media from fb2k to avoid changing the files by mistake and enqueue the created !.tags file
4 - Add/change tags as needed
At this point, in every track the codec changed from FLAC to TAGS. This didn't happen with v0.1, but it's not critical.
5 - Tested every track to see if it plays, it does with no problem.
6 - Remove tracks from the playlist in fb2k, move folder with media and !.tags to "m-tagged" where it will remain
7 - On moving the folder, Windows complains that the files are open in foobar2000, so I close it and try to move them again. They get moved.
Logfile until now: http://j.fsbn.eu/fb2k-tags-run1.log
8 - Reopen fb2k and enqueue the "!.tags" in "m-tagged" and check if tracks work. They do and the codec shows "FLAC".
9 - "Create m-TAGS file" from the tracks, this time in an organized manner in "m-tags\<artist>\(<year>) <album>\!.tags")
10 - Album shows up in Media Library, so I remove the tracks from "m-tagged" and add the ones from Media Library to the playlist. Tracks work.
11 - I forget to add/change a tag, so I change it (tracks change to codec "TAGS" again) and try to "Write m-TAGS to media files". Tracks still play fine.
Log shows it skipped because the source is a m-TAGS file.
Logfile from step 8 until now: http://j.fsbn.eu/fb2k-tags-run2.log

So basically: no crashes; no issues with seek/duration (probably because I used v1.1 .tags throughout the process instead of mixing); but still the file handles remaining open after creating m-TAGS, even if not playing them; codec change after changing tags (comes back to proper codec after restarting).

It would be cool to be able to use old format m-TAGS though, in case I need to change a tag in an old album.

Sorry for the lengthy report.

EDIT: the opened file handle is actually on the folder itself, not on any of the files.

m-TAGS component (foo_tags)

Reply #209
I'm grabbing a fresh CD with a foobar2000 with only foo_tags.dll to run experiments.

Media library is set like my regular foobar2000 install, i.e.:
Code: [Select]
Library
|- "m-tagged"
   |- media that should remain untouched
      |- !.tags with relative paths to media in each album
|- "m-tags"
   |- contains folders for each artist\album in "m-tagged"
       |- .tags that point to the respective .tags file in "m-tagged"
|- "rest"
   |- media that I don't care remains pristine (don't contain .tags)
|- "temp"
   |- temporary place where I create the original .tags files after downloading/ripping a fresh album

So basically, I can't restrict my Media Library to just *.tags, since I need to also scan for *.flac, *.mp3, etc.

1 - Ripped a fresh album, placed it in a folder in "temp", enqueue the .flac files in fb2k
2 - "Create m-TAGS file" in the same folder as the media (in "temp")
3 - Remove media from fb2k to avoid changing the files by mistake and enqueue the created !.tags file
4 - Add/change tags as needed
At this point, in every track the codec changed from FLAC to TAGS. This didn't happen with v0.1, but it's not critical.
5 - Tested every track to see if it plays, it does with no problem.
6 - Remove tracks from the playlist in fb2k, move folder with media and !.tags to "m-tagged" where it will remain
7 - On moving the folder, Windows complains that the files are open in foobar2000, so I close it and try to move them again. They get moved.
Logfile until now: http://j.fsbn.eu/fb2k-tags-run1.log
8 - Reopen fb2k and enqueue the "!.tags" in "m-tagged" and check if tracks work. They do and the codec shows "FLAC".
9 - "Create m-TAGS file" from the tracks, this time in an organized manner in "m-tags\<artist>\(<year>) <album>\!.tags")
10 - Album shows up in Media Library, so I remove the tracks from "m-tagged" and add the ones from Media Library to the playlist. Tracks work.
11 - I forget to add/change a tag, so I change it (tracks change to codec "TAGS" again) and try to "Write m-TAGS to media files". Tracks still play fine.
Log shows it skipped because the source is a m-TAGS file.
Logfile from step 8 until now: http://j.fsbn.eu/fb2k-tags-run2.log

So basically: no crashes; no issues with seek/duration (probably because I used v1.1 .tags throughout the process instead of mixing); but still the file handles remaining open after creating m-TAGS, even if not playing them; codec change after changing tags (comes back to proper codec after restarting).

It would be cool to be able to use old format m-TAGS though, in case I need to change a tag in an old album.

Sorry for the lengthy report.

EDIT: the opened file handle is actually on the folder itself, not on any of the files.


Thanks a lot for the extensive report. No need to apologize!!!

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

This shoud fix what you noticed in point 4/11 (flac-2-tags) and in point 11 (skipped file).

I really do not know what to say about the file lock issues. I solely use the SDK functions to open and operate on files (that may actually be the problem!). I did notice this behaviour in the past: basically moving files works from within fb2k, using the "File operations/Move to" menu, but not in windows. And of course, it is way easier to move files with windows explorer! Although, admittedly, that leaves fb2k with orphan playlist entries. So I cannot blame Peter too much for being "jealous" about the files....

I really do not know what you mean with "It would be cool to be able to use old format m-TAGS though, in case I need to change a tag in an old album."

What's the "old format"???

P.S. This has nothing to do with the technical issues: I am glad to see that you are a classical music collector! :-)

m-TAGS component (foo_tags)

Reply #210
Can't really remember how to reproduce the issue. I think it was that one time I changed something and it removed the @file references from the .tags file. Tried changing tags in an old m-TAGS made with v0.1 now and it worked (even added DURATION). Tried creating an m-TAGS pointing to an old m-TAGS and it worked too. Seems to be not be an issue anymore, if it even was.

Also tried moving from "temp" to "m-tagged" through fb2k move dialog and it also complained there:
Code: [Select]
Removing "D:\library\temp\Saburo Moroi - (2002) Symphony No. 3" failed: File is already in use

1 out of 15 operations failed.


It's not that much of a problem, I usually create m-tags in batches anyway so it's not like I have to restart fb2k that much. And I could just close it and remove the empty dirs afterwards, but there are some cases where media files are in a subfolder and I don't think fb2k can copy upper levels too.

The codec changing to TAGS on changing values appears to be fixed, thanks for fixing it, even though it looked like just a cosmetic issue!

m-TAGS component (foo_tags)

Reply #211
I would like to thank you for this component.

I am using it to create m-tags for streams urls (internet radio).
Using the component I can finally bypass all of foobar2000 limitations with streams  ( no writable tagging support)  which have troubled me in the past.
I can now create tags for streams which can be distributed and used by anyone.

Update 1.1 with album data support makes it possible to add the stream logo file , which is recognized by the native art viewer.

example files @ https://www.dropbox.com/s/g43mumkpej60xbh/m...xample.rar?dl=0

If the m-tag contains %artist% or %title% tags , the dynamic track titles and not displayed.

Thanks again and keep up the great work.!!



m-TAGS component (foo_tags)

Reply #212
If I add a folder with m-Tags files to the Media Library, foobar crashes using 1.12. No problems with previous versions. The example file from the previous post runs fine with version 1.03 installed, but crashes with 1.12. Windows XP sp3, foobar 1.3.8. Any ideas? Thanks.

m-TAGS component (foo_tags)

Reply #213
I would like to thank you for this component.

I am using it to create m-tags for streams urls (internet radio).
Using the component I can finally bypass all of foobar2000 limitations with streams  ( no writable tagging support)  which have troubled me in the past.
I can now create tags for streams which can be distributed and used by anyone.

Update 1.1 with album data support makes it possible to add the stream logo file , which is recognized by the native art viewer.

example files @ https://www.dropbox.com/s/g43mumkpej60xbh/m...xample.rar?dl=0

If the m-tag contains %artist% or %title% tags , the dynamic track titles and not displayed.

Thanks again and keep up the great work.!!


I am not sure about the example files you sent. They do NOT contain %artist% nor %title%.

Anyway, the dynamic tracks are not displayed because m-TAGS takes precedence over them. m-TAGS is typically used to retag or fix wrong tags, so it assumes that you want to overwrite the underlying stream tags.

If you need to use, for example, dynamic artist only when present, you should have another name for the tag, say "%default artist%, instead of artist. Then, in your playlist column settings, just set the display to $if2(%artist%,%default artist%), and set the "Linked meta field" to "DEFAULT ARTIST". This way, fb2k displays the dynamic artist if present, or defaults to the m-TAGS "default artist" otherwise. You may also want to set the column "Linked meta field" to "DEFAULT ARTIST" instead of ARTIST, so you do not add an "ARTIST" tag in m-TAGS by mistake.

The previous instructions assume that you use Columns UI.

m-TAGS component (foo_tags)

Reply #214
If I add a folder with m-Tags files to the Media Library, foobar crashes using 1.12. No problems with previous versions. The example file from the previous post runs fine with version 1.03 installed, but crashes with 1.12. Windows XP sp3, foobar 1.3.8. Any ideas? Thanks.


It may be due to the fact that 1.12 uses a different fb2k SDK. Or, more likely, there is a bug....

I do not see a previous post from you. Can you please send me a log file? In Preferences/Advanced/Tagging/m-TAGS check "Enable verbose logging", then open the Console (View/Console) and check "Write Log". Having a snippet from one of your m-TAGS files would be great too!

m-TAGS component (foo_tags)

Reply #215
Hi all,

Is there a way to use original file paths for album art?
I've tried to add $info to the search patterns:
$info(@)\..\cover.jpg
$info(@)\..\folder.jpg

This doesn't work because foobar2000 replaces slashes, backslashes and colons with dashes and after that looks for an artwork.

For instance, if an original file is located in
D:\Music\Jazz\Billie Holiday\file.flac
it translates to
.TAGS PATH\D--Music-Jazz-Billie Holiday\file.flac\_\cover.jpg
.TAGS PATH\D--Music-Jazz-Billie Holiday\file.flac\_\folder.jpg
(I used Process Monitor to see it.)

Using $directory_path and replacing backslashes with slashes don't help much.

-------------------------
I'm also experimenting with my standalone batch script for .tags generation http://pastebin.com/MMm1jCn8 (requires ffprobe, jq and an empty bom.txt with the BOM signature). It needs some fixes of field mapping but overall it works.

m-TAGS component (foo_tags)

Reply #216
Hi all,

Is there a way to use original file paths for album art?
I've tried to add $info to the search patterns:
$info(@)\..\cover.jpg
$info(@)\..\folder.jpg

This doesn't work because foobar2000 replaces slashes, backslashes and colons with dashes and after that looks for an artwork.

For instance, if an original file is located in
D:\Music\Jazz\Billie Holiday\file.flac
it translates to
.TAGS PATH\D--Music-Jazz-Billie Holiday\file.flac\_\cover.jpg
.TAGS PATH\D--Music-Jazz-Billie Holiday\file.flac\_\folder.jpg
(I used Process Monitor to see it.)

Using $directory_path and replacing backslashes with slashes don't help much.

-------------------------
I'm also experimenting with my standalone batch script for .tags generation http://pastebin.com/MMm1jCn8 (requires ffprobe, jq and an empty bom.txt with the BOM signature). It needs some fixes of field mapping but overall it works.


The only way I could make it work is:
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),2,$strrchr(%__@%,'?'))cover.jpg
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),2,$strrchr(%__@%,'?'))folder.jpg

Not perfect... but it works, if locators are absolute (i.e. they start with a '/'). If your script is creating (improperly, but that's what your script seems to be doing) "scheme" locator (i.e. locators starting with a drive letter and colon), then this should work:

$substr($replace($replace(%__@%,'?','\'),'\\',':\'),1,$strrchr(%__@%,'?'))cover.jpg
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),1,$strrchr(%__@%,'?'))folder.jpg

Let me know what happens!

m-TAGS component (foo_tags)

Reply #217
I would like to thank you for this component.

I am using it to create m-tags for streams urls (internet radio).
Using the component I can finally bypass all of foobar2000 limitations with streams  ( no writable tagging support)  which have troubled me in the past.
I can now create tags for streams which can be distributed and used by anyone.

Update 1.1 with album data support makes it possible to add the stream logo file , which is recognized by the native art viewer.

example files @ https://www.dropbox.com/s/g43mumkpej60xbh/m...xample.rar?dl=0

If the m-tag contains %artist% or %title% tags , the dynamic track titles and not displayed.

Thanks again and keep up the great work.!!


I am not sure about the example files you sent. They do NOT contain %artist% nor %title%.

Anyway, the dynamic tracks are not displayed because m-TAGS takes precedence over them. m-TAGS is typically used to retag or fix wrong tags, so it assumes that you want to overwrite the underlying stream tags.

If you need to use, for example, dynamic artist only when present, you should have another name for the tag, say "%default artist%, instead of artist. Then, in your playlist column settings, just set the display to $if2(%artist%,%default artist%), and set the "Linked meta field" to "DEFAULT ARTIST". This way, fb2k displays the dynamic artist if present, or defaults to the m-TAGS "default artist" otherwise. You may also want to set the column "Linked meta field" to "DEFAULT ARTIST" instead of ARTIST, so you do not add an "ARTIST" tag in m-TAGS by mistake.

The previous instructions assume that you use Columns UI.


My comment "If the m-tag contains %artist% or %title% tags , the dynamic track titles and not displayed." was just to warn users if they add them dynamic metadata will NOT be displayed because as you replied  m-TAGS takes precedence over them.

When creating a m-tag from an url radio station ( shoutcast / icecast) , foobar adds the station name to the title tag. This must be removed or as I do move to a new tag %STREAMNAME%.

There is no need for remapping artist field, as url internet stations have no default artist.

Thanks again..

m-TAGS component (foo_tags)

Reply #218
The only way I could make it work is:
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),2,$strrchr(%__@%,'?'))cover.jpg
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),2,$strrchr(%__@%,'?'))folder.jpg

Not perfect... but it works, if locators are absolute (i.e. they start with a '/'). If your script is creating (improperly, but that's what your script seems to be doing) "scheme" locator (i.e. locators starting with a drive letter and colon), then this should work:

$substr($replace($replace(%__@%,'?','\'),'\\',':\'),1,$strrchr(%__@%,'?'))cover.jpg
$substr($replace($replace(%__@%,'?','\'),'\\',':\'),1,$strrchr(%__@%,'?'))folder.jpg

Let me know what happens!

Thanks for the hint, this works for me:
$directory_path($directory_path($replace($replace($replace($substr(%__@%,2,$strrchr(%__@%,'-')),'--',':\'),'-','\'),' \ ',' - ')))\folder.jpg

In my system special symbols are replaced with dashes -, not question marks ?. It makes the solution less reliable, filenames with dashes and without spaces around them still won't work. Well, better than nothing.
Indeed, my script generates improper paths atm, I'm still trying to figure out how to make string replacement work in jq, maybe I'll just go with php-cli.

Almost forgot: m-TAGS doesn't open network shares in dialog windows, even mounted as network drives (they're just hidden). Without it, I can't use the function "Create m-TAGS (in separate folder)", could you take a look at it? Thanks again.

m-TAGS component (foo_tags)

Reply #219
More universal solution:
$directory_path($replace($replace($replace($replace($substr($info(@REFERENCED_FILE),8,$len($info(@REFERENCED_FILE))),'--',':\'),'-','\'),' \',' -'),'\ ','- '))\folder.jpg

There is a case, when this won't work as expected. If a .tags file contains more than one album, ELPlaylist will use same cover, from the first album, for all albums in the file. All because of this:
$albumart($get(art.left),$get(art.top),$get(art.size),$get(art.size),0,front nokeepaspect,,)
Parameter 0 means it uses first file in the group (which is same for all entries), 1 - will try to find a cover for each entry, and it will work. But it's gonna be awfully slow: if you have 5 templates for album covers (cover, front, folder etc.), 100 songs will make 5*100 HDD queries.

m-TAGS component (foo_tags)

Reply #220
More universal solution:
$directory_path($replace($replace($replace($replace($substr($info(@REFERENCED_FILE),8,$len($info(@REFERENCED_FILE))),'--',':\'),'-','\'),' \',' -'),'\ ','- '))\folder.jpg

There is a case, when this won't work as expected. If a .tags file contains more than one album, ELPlaylist will use same cover, from the first album, for all albums in the file. All because of this:
$albumart($get(art.left),$get(art.top),$get(art.size),$get(art.size),0,front nokeepaspect,,)
Parameter 0 means it uses first file in the group (which is same for all entries), 1 - will try to find a cover for each entry, and it will work. But it's gonna be awfully slow: if you have 5 templates for album covers (cover, front, folder etc.), 100 songs will make 5*100 HDD queries.


I agree that using @referenced_file is the proper way. Locators are context-sensitive, @referenced_file is the locator's canonical path, and it is always absolute AND always contains the scheme. Also, locators contain track indexes, which are a nuisance when extracting paths.

If you are using ELPlaylist (I do too), then you have to regroup to get separate covers. I think ELPlaylist uses 0 as a group index, not a file index.

m-TAGS component (foo_tags)

Reply #221
If you are using ELPlaylist (I do too), then you have to regroup to get separate covers. I think ELPlaylist uses 0 as a group index, not a file index.

No luck, looks like 0 is rather a mode id.

BTW, I've fixed my script: the problem was backslashes in Windows, not jq, generated paths are now correct. Time for heavy scripting!

m-TAGS component (foo_tags)

Reply #222
Almost forgot: m-TAGS doesn't open network shares in dialog windows, even mounted as network drives (they're just hidden). Without it, I can't use the function "Create m-TAGS (in separate folder)", could you take a look at it? Thanks again.

Same problem here, I'd also appreciate a fix for this if possible. Thank you.

m-TAGS component (foo_tags)

Reply #223
I work on a script which indexes music files, creates .tags files and keeps the collection up to date: fixes paths, moves orphaned files and adds new releases.
Here it is: https://github.com/vensko/mtags-sync (very early beta!)

I'd like to keep this thing cross-platform, because, personally, I use it on my NAS, therefore all functions were reproduced with third-party components. Even though it's written in PHP, it should work correctly with most Unicode file names and tags. It's fully compatible with the m-TAGS plugin for foobar2000, but creates .tags a little differently: all valid .CUEs and files with CUESHEET tags are treated separately and have their own .tags.

Each directory/.cue/cuesheet tag is identified by an id, formed with combined file durations. Sometimes, calculated file durations might differ from the ones by the foobar2000 plugin. If you put your old .tags into the target folder, and durations match - everything's ok. Otherwise, the .tags will be just overwritten. That's the main reason why import of existing .tags was shelved. In other words, create .tags solely by the script and you'll be fine.

Both music and .tags files can be freely deleted/renamed/moved inside their folders, and the script will update your .tags to reflect these changes.
There are some presumptions. As you already know, each directory is identified by a combination of durations of files inside it. Hence your collection has to be release-oriented: each album/ep/single has to be located in its own directory/.cue/CUESHEET tag. Deleted or added media file changes the directory id, and it becomes a new release.

 

m-TAGS component (foo_tags)

Reply #224
@luigimercurio

One small issue.

If the m-TAGS:: REFERENCED FILE: is HTTP and points to a file (eg http://mp3stream4.abradio.cz/depeche64.mp3)
I get a popup "Attached editing picture failure: Access denied."

I am trying to add external image using .tags.front.bin

Sample tag
Code: [Select]
[
  {
    "@": "http://mp3stream4.abradio.cz/depeche64.mp3",
    "STREAM_NAME": "Radio Depeche Mode",
    "STREAM_DESCRIPTION": "Radio Depeche Mode",
    "STREAM_GENRE": "Rock",
    "STREAM_BITRATE": "64",
    "STREAM_WEBPAGE": "http://www.abradio.cz",
    "STREAM_ID": "0783218226"
  }
]

Verbose Log
Code: [Select]
[10:36:57] m-TAGS:: Creating album art extractor for file://C:\FooTunein\m-tags\0783218226\0783218226.tags
[10:36:57] m-TAGS:: CREATING TAGS
[10:36:57] m-TAGS:: CREATING ALBUM ART EDITOR INSTANCE
[10:36:57] m-TAGS:: Loading locator
[10:36:57] m-TAGS:: OPENING file://C:\FooTunein\m-tags\0783218226\0783218226.tags
[10:36:57] m-TAGS:: Resolving locator: [url=http://mp3stream4.abradio.cz/depeche64.mp3]http://mp3stream4.abradio.cz/depeche64.mp3[/url]
[10:36:57] m-TAGS:: tags_path: file://C:\FooTunein\m-tags\0783218226\0783218226.tags
[10:36:57] m-TAGS:: locator: [url=http://mp3stream4.abradio.cz/depeche64.mp3]http://mp3stream4.abradio.cz/depeche64.mp3[/url]
[10:36:57] m-TAGS:: path: [url=http://mp3stream4.abradio.cz/depeche64.mp3]http://mp3stream4.abradio.cz/depeche64.mp3[/url]
[10:36:57] m-TAGS:: Resolved path: [url=http://mp3stream4.abradio.cz/depeche64.mp3]http://mp3stream4.abradio.cz/depeche64.mp3[/url]
[10:36:57] m-TAGS:: Canonical path: [url=http://mp3stream4.abradio.cz:80/depeche64.mp3]http://mp3stream4.abradio.cz:80/depeche64.mp3[/url]
[10:36:57] m-TAGS:: REFERENCED FILE: [url=http://mp3stream4.abradio.cz:80/depeche64.mp3]http://mp3stream4.abradio.cz:80/depeche64.mp3[/url] [0]
[10:36:57] m-TAGS:: Opening internal editor
[10:36:57] m-TAGS:: DESTROYING TAGS