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: External Tags (Read 97979 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: External Tags

Reply #425
I've spent hours going through this entire thread and still can't get artwork to display on internet streams. I'm not getting any errors either, so I have no way of knowing why. Using Foobar v2.1 x64 and External Tags 1.5.14, SQL db only.


Wolverine--  I haven't read through all of the above, but want to share what's worked for me, for some years now.  It's the below script in the "Album art" "Search patterns" box.  The fourth line begins the script that is specific to radio streams.  Perhaps you can parse it: It specifies a folder where my "RadioImages" are stored, and so long as the individual images are named with exactly 11 characters (maximum) that correspond exactly to the name of the stream that you give with External Tags, the art will be loaded when you play the stream.  The fifth line specifies a default image, if you have not designated one specific to a stream.

Works well for me.  N.

front.jpg
%filename%.jpg
%album%.jpg
$if($strstr(%path%,'://'),C:\ProgramData\Foobar\RadioImages\$trim($cut(%title%,11)).jpg)
$ifequal($strcmp($left(%path%,5),http:),1,C:\ProgramData\Foobar\RadioImages\radio.jpg,)
folder.jpg


Mod edit: fix quote tags

Re: External Tags

Reply #426
A little update after running a commit with fb2k 2.1.1. It is hard to pinpoint which issue is due to the component and which is due to fb2k.
External tags version 1.5.14+.

* There are still leftovers where the external tags are not committed. Maybe not that many?
* Resolved: There used to be "leftovers" where the tags were committed, but fb2k didn't notice it: that is, run a reload from tags, and the number of leftovers would be reduced. I found nothing such by now.

* But: fb2k doesn't detect the tag type at all. If I want that information I have to reload info from tags on the entire selection afterwards.
(I could of course exclude FLAC, where that info is never shown.)

Re: External Tags

Reply #427
For the leftovers, is there anything written to the console? I added more error logging for that version.

Apart from external tag commit losing tag type field, it has bugged me that the component loses creation date in both external tag creation and commit without info reload. When I have more time to dig into this I want to get these shortcomings fixed.

Re: External Tags

Reply #428
Doesn't look like anything was written - apart from the two files that were read-only, which is a completely different issue, but which shows that at least the logging was in place.

I also tried to reproduce it now, with some 7500 mp3 files. That should be more than enough to trigger it, but it didn't - so here is a conjecture: issue shows up when it is taking too long on a file due to full rewrite.

But the leftovers aren't a big thing to someone who either uses external tags "on all or on none". I could easily search for %__tagtype% HAS xt or not, and force re-read or another commit.
Bigger is to have to do a re-read on the entire collection. (Which in my situation happens upon yearly maintenance ... and upon testing.)

Re: External Tags

Reply #429
foo_external_tags saved me days' work again (scenario like below) - thank you!

Vague "request" for a recovery feature, let me explain it in terms of a folder.tags file:
* File includes a list of filenames and their respective tags.
* If I have to recover tags, then filenames may have changed.
So: function "try to match files (in the same folder) by track number" and maybe even easier: "try to match files (in the same folder) by file names in ascending order" - the latter would save it if files are untagged but named Artist Year Album 01 blah blah.flac etc.

This also is relevant when a renaming goes wrong, cf. other comments in this thread.

Of course, since you are also developing foo_audiomd5, then one could match by that tag too. At least in the same folder, then in most cases there should be no dupes. Although there are exceptions where an artist has put the same track as intro and outro, for example.


Need help which right now hopefully can save a couple of days' labour, if the following works - but I'm asking before firing up fb2k again.

* Hard drive crash [well maybe, I have not yet taken the chance of firing it up again] at the end of a major tag clean-up. Might have found some bad sector, or might have shut down as a safety precaution over running too hot.

foo_external_tags is installed.

Can I get these tags transferred to a backup drive (well the now-in-the-works copy of the backup drive) as follows
* Without connecting any drive, ask foo_external_tags to create (SQL) tags for everything, and then
* Connect a backup drive which has - with a couple of renamed exceptions that I will find - the same files (after making sure it identifies at the same drive letter), and
* Then have these updated tags from current database in foo_external_tags' SQL database, ready to commit
?

I probably need to disable fb2k's library rescanning at startup, and I probably need to do that before I fire it up?

Re: External Tags

Reply #430
A little update after running a commit with fb2k 2.1.1. It is hard to pinpoint which issue is due to the component and which is due to fb2k.
External tags version 1.5.14+

Tried with a library that does not monitor for changes, and nearly everything is fine. (New fb2k version 2.1.2, fresh portable install, same external tags version).
* All commits are actually committed
* Only that appear as leftovers and need to be refreshed: Matroska with chapters, track numbers 2 ff.

No urgent need for bugfixes, just thought I'd test and report.

Re: External Tags

Reply #431
Hello, I seem to have something about web streams as well... is it possible for foobar2k to display images from a URL hosted on the internet without downloading? if it does how do you go about attaching image urls to a web stream? If you did notice foobar supports album art from web streams which send them through the stream and it doesn't download the radio station's album art and displays it on the cover art panel just fine.

Re: External Tags

Reply #432
is it possible for foobar2k to display images from a URL hosted on the internet without downloading?

Erm....

Quote
If you did notice foobar supports album art from web streams which send them through the stream and it doesn't download the radio station's album art and displays it on the cover art panel just fine.

I have no idea what you're asking with regards to external tags/attaching but I will say images displayed in album art panels do come from a url. The SDK provides an API to grab the image in memory and the url as a string. I use it in JSP3 and http/https image urls are displayed as tooltips when listening to stream like this one...

http://stream-uk1.radioparadise.com/aac-320

See attachment...

Re: External Tags

Reply #433

I have no idea what you're asking with regards to external tags/attaching but I will say images displayed in album art panels do come from a url. The SDK provides an API to grab the image in memory and the url as a string. I use it in JSP3 and http/https image urls are displayed as tooltips when listening to stream like this one...

http://stream-uk1.radioparadise.com/aac-320

See attachment...

My bad, I got it confused it with following tutorials for tagging web streams with images so I assumed it's something which you need m-TAGS or External Tags to deal with... Thanks for linking however.

Re: External Tags

Reply #434
I've got a question about where the external tags are stored cause they're not behaving as I expected: when I use only the SQLite mode (settings I used shown in picture 1), add external tags to some files, and then delete the external-tags.db file that is created in AppData\Roaming\foobar2000-v2, the external tags are still on the files. Same thing with the folder tags mode (picture 2): when I delete the folder.tag file the external tags remain. Shift right-clicking and selecting Remove external tags also doesn't revert the files to their pre-external tags state. I have confirmed that the audio files are not altered so I didn't accidentally change their internal tags, so why aren't the external tags removed when I delete the SQLite database file or the .tag files? Where is foobar getting them from? Does External Tags have a cache somewhere I should delete?

Re: External Tags

Reply #435
The external tags were stored in the files you deleted. foobar2000 caches metadata and it will only automatically read the tags from files again if it sees the file has changed. If you want to handle things manually you'll need to manually force foobar to reload info from files. You can for example do that by holding down shift when you right click a file, then choose 'Tagging' -> 'Reload info from file(s)'.

If you had removed the external tags with the component, it would have done the metadata refresh for you. But if there is nothing for it to remove, it will not do anything.

Re: External Tags

Reply #436
The external tags were stored in the files you deleted. foobar2000 caches metadata and it will only automatically read the tags from files again if it sees the file has changed. If you want to handle things manually you'll need to manually force foobar to reload info from files. You can for example do that by holding down shift when you right click a file, then choose 'Tagging' -> 'Reload info from file(s)'.

If you had removed the external tags with the component, it would have done the metadata refresh for you. But if there is nothing for it to remove, it will not do anything.
That makes sense, changing the external tags doesn't change the files like it happens with internal tags so foobar sees no reason to reload the files. I tried what you said and it worked, thanks.

Re: External Tags

Reply #437
I did this thing "Commit external tags to file" Because I wanted to inscribe for good the tags that I changed in Properties. Because last time I reinstalled foobar, many good tags were lost go figure why. I thought the tags were glued to the files when we close the property window, but apparently no.
So I did a "commit external tag blah blah to file" which took 2 days, just for a fraction of my library... And now the "last modified"  statistic, is all messed up, many files, are displaying "2024" but they are 3 years old


Re: External Tags

Reply #438
Writing tags to files means that files will be modified, which means the operating system updates modification timestamps accordingly. There is an advanced preferences option in foobar2000 to preserve file creation/access/modification time when retagging, and External Tags component respects that setting.

No idea how tag writing can take two days. Are your files hosted over network behind a slow link in a format that has tags in the beginning of the files (pretty much anything not using APEv2 tags), and the files have no padding? In such situation tag write would need to rewrite the entire file to make room for tags. If the medium or the link to the medium is slow, it will take some time. If both are slow, it will take even longer.

Re: External Tags

Reply #439
If I'm using folder tags, change a file's external tags from foobar and save them, but later realize I made a mistake with the file name and rename it from Windows Explorer, can I open the .tag file with a text editor and change the file name reference in it to the new one so that the external tags are associated with the renamed file? Cause I did it and it seems to have worked, but I just want to be sure this is intended use and I'm not breaking something that I can't see.

Re: External Tags

Reply #440
The tags are binary and not meant to be edited outside the component. But of course if you know what you are doing that's fine. You should use hex-editor as regular text editor can mutilate the binary data. If the old name and new name had same length the edit is simple. If the name length changes the four bytes before the name will need to be fixed to specify the new length of the name. The strings are not null terminated, next bytes in the file specify the subsong number.

Re: External Tags

Reply #441
It seems that external tags can not be preserved when renaming files outside fb2k - except maybe in ADS? Have I understood correctly that
* Using SQL: linked to file name, lost if file is moved or renamed
* folder.tags: contains file name, lost if file is moved or renamed, but can be recovered by editing the file
* .tag file. Has same name as the media file, can be recovered by copying the filename manually
?

Implementing a "fix this for me" might take too much of your time - call it a "light-hearted wishlist item" rather than "user demand", if you get my drift. But there has been this issue that foo_renamer does not rename over the .tag file if renaming also changes directory, and there is no "undo rename" [my usual naming pattern means that if external tags are lost, then renaming based on file tags would get me old filename back, solving things] ... so ... idea:
Implement a search for external tag sets and media files (which do not have other external tags) then match by a user-defined string like %directory%%tracknumber% (or, to those who use a third of your components: %__md5%%audiomd5%?)

Re: External Tags

Reply #442
Thank you for developing and maintaining this great component!

I have a use case that is probably uncommon and unsupported, but thought I'd ask in case I'm missing something. I am trying to use external tags to work on tagging when I'm away from home. At home, I created external tags for all tracks in my library (a folder on my PC that is included in the media library) on my portable foobar installation on a USB key. When I'm on another computer without access to the library, I can still see those tracks in my autoplaylist, but I cannot change their metadata. This is obviously expected for the internal tags, but I was hoping the external tags could be edited, considering the external tag database is on the USB key.

The idea would be to commit the changes made when I'm away to the internal tags next time I'm at home, when the files are accessible again. Is this possible with external tags or not at all ? I am using the SQLite database, if that matters.
Thanks in advance !

Re: External Tags

Reply #443
It seems that external tags can not be preserved when renaming files outside fb2k - except maybe in ADS? Have I understood correctly that
* Using SQL: linked to file name, lost if file is moved or renamed
* folder.tags: contains file name, lost if file is moved or renamed, but can be recovered by editing the file
* .tag file. Has same name as the media file, can be recovered by copying the filename manually
Alternate Data Stream is kept along with the file by the OS when possible. As long as the track stays on a file system where it's supported, it will follow the file. At least when using Explorer.
SQLite format is quite simple. There are tables for art and tags. You can use any SQLite browser to open the database and correct the path in the tables.
External APE tag is easy to manually repair too. Just rename or copy the file over.
Folder tag is the only one that isn't easy to manually alter.

But there has been this issue that foo_renamer does not rename over the .tag file if renaming also changes directory
I recall I improved things with foo_renamer. Have you still had issues?

Is this possible with external tags or not at all ? I am using the SQLite database, if that matters.
Unfortunately the native Properties dialog doesn't call any of the External Tags component's code when it detects the referenced file is missing. Otherwise your idea should work in theory.

Re: External Tags

Reply #444
SQLite format is quite simple. There are tables for art and tags. You can use any SQLite browser to open the database and correct the path in the tables.
Are there any SQLite browsers you would recommend? And would I edit external-tags.db or the metadb and config .sqlite files?


Re: External Tags

Reply #446
https://sqlitebrowser.org/

edit: I hope it goes without saying that fb2k should be closed before any edits are made. Also, I'd make backups just to be safe.
Nice thanks. Normally I shouldn't have to use it, it's for cases where they might be ambiguity about what files I've made external tags for, changing file names or directories etc.

 

Re: External Tags

Reply #447
Would it be possible to tag files with multiple audio streams (like bluray m2ts) and assign/save separate tags for each stream? Ex. if m2ts file had 4 streams in it we would scan it 4 times (after changing the stream) and save 4 sets of tags (one for each stream without overwriting the previous ones).

Re: External Tags

Reply #448
Just got confirmation from Peter, stream handling is invisible for me and can't be done.

Re: External Tags

Reply #449
That sort of issue is not "exclusive to" external tags (though external tagsets could in principle have been a way to mitigate it).
Say, you got a 5.1 stream and a stereo stream in the same file. No reason that ReplayGaining the two would give the same numbers.

Surely it would be "possible" to condition it upon the audio properties, so that say a DVD rip with AC-3 and PCM may be identified from the content - but now we are approaching a remote corner usage ... or?