On Tue, Dec 08, 2015 at 06:51:18AM -0500, drew Roberts wrote:
> One possible workaround would be to [...] put the metadata into
> the files

Thanks; yes, of course, I considered blindly auto-tagging, just to have 
something-better-than-nothing in my stream. But there are unintended 
consequences of mass tagging. Among other things, my library is not completely 
under my control, and changing tens of thousands of files causes sync issues 
with offsite/offline backups.

This wasn't an issue with Winamp & the SHOUTcast DSP, which is what I'm 
migrating from. The DSP just relies on whatever Winamp is using for a 
display/playlist title, and if nothing is given in the playlist then Winamp 
always starts with filenames and then replaces them, if possible, with info 
from metadata where possible. (Well, what exactly happens is also affected 
quirks of the input plugins, the use of advanced title formatting feature, and 
other metadata-reading settings...but the point is that filenames are the 
standard fallback in the absence of metadata. Same can be said of the display 
of my car's data CD-R player.)


Anyway, I did make some progress.

The documentation at <http://savonet.sourceforge.net/doc-svn/metadata.html> 
suggests the goal is to write a 'song' field, but this does not actually have 
any effect, perhaps because I am using SHOUTcast DNAS v2. This server 
apparently receives artist & title data separately, and if either is an empty 
string, you must strip the field in order for the metadata update to be 
accepted at all.

So, generally, this is the technique:

  pattern1 = '$(if $(artist),"$(artist)","custom artist string here")'
  pattern2 = '$(if $(title),"$(title)","custom title string here")'
  s = rewrite_metadata(strip=true,[("artist",pattern1),("title",pattern2)],s)

If you only have one string (e.g. artist & title combined), I found that it's 
best to use the technique above, putting it in the title and setting the 
artist to an empty string so it'll be stripped.

The question is where to get the string to use as the title. Since I haven't 
yet found a way to get the filename, I thought I could try the documentation's 
advice of using playlist annotations to add a custom 'song' field:

  annotate:song="file":\path\to\the\file.flac

Since the playlist-generating script is under my control, this is something I 
can probably do. It will bloat my playlist and make it unusable with other 
apps, but I can deal.

So, the technique above will work like this, using the 'song' annotation as 
title:

  pattern1 = '$(if $(artist),"$(artist)","")'
  pattern2 = '$(if $(title),"$(title)","$(song)")'
  s = rewrite_metadata(strip=true,[("artist",pattern1),("title",pattern2)],s)

This works OK for simple examples, but I am running into playlist parsing 
issues which I will report in a separate message.

In the meantime, I would still be excited to know if there is a way to get 
access to the filename or the full path from the playlist, so I don't have to 
resort to annotations.

------------------------------------------------------------------------------
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to