Win TagScanner 5.1.x Music NFO Templates
#1
Hope I'm posting this in the correct forum area; if not, advanced apologies.

Understanding that ideally, XBMC enthusiasts will want to allow the scrapers to handle the artist/album metadata, some purists may prefer a more controlled approach.

In my case, I use TagScanner 5.1.x to manage the tags in my audio files and I'm quite happy with the results I get from it. That said, I started exploring the XBMC .NFO files this past week and got to wondering if I could generate an export template using TagScanner ... results posted below.

I figured I'd share the templates here in case other TagScanner enthusiasts would like to output metadata from audio files in an .NFO-ready format. Simply copy/paste the contents in the code block below to notepad and save the files in the TagScanner script directory ... I called mine nfo - album.tse and nfo - artist.tse.

REF URL: http://forum.xbmc.org/showthread.php?tid=164592

Cheers,


nfo - album.tse
Code:
# Tagscanner export script

$file_name %filepath%album.nfo
$file_notes nfo - create album.nfo for files on SMB share (XML UTF-8)
$file_encoding utf-8
$file_writebom 0
$file_ishtml 1

$document_open
$select %album%,0
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <title>%album%</title>
    <artist>%artist%</artist>
    <genre>%genre%</genre>
    <style></style>
    <mood></mood>
    <theme></theme>
    <musicBrainzAlbumID></musicBrainzAlbumID>
    <compilation>false</compilation>
    <review>%comment%</review>
    <type></type>
    <releasedate></releasedate>
    <label>%publisher%</label>
    <type></type>
    <thumb>smb:%filepath%folder.jpg</thumb>
    <path>smb:%filepath%</path>
    <rating>1</rating>
    <year>%year%</year>
    <albumArtistCredits>
        <artist>%artist%</artist>
        <musicBrainzArtistID></musicBrainzArtistID>
        <joinphrase></joinphrase>
        <featuring>%artist%</featuring>
    </albumArtistCredits>
$select %track%,0
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>%title%</title>
        <position>%track%</position>
        <duration>%_length%</duration>
    </track>
$endselect
</album>
$endselect
$document_close

nfo - album soundtrack or compilation.tse
Code:
# Tagscanner export script

$file_name %filepath%album.nfo
$file_notes nfo - create album.nfo for files on SMB share (XML UTF-8)
$file_encoding utf-8
$file_writebom 0
$file_ishtml 1

$document_open
$select %album%,0
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<album>
    <title>%album%</title>
    <artist>%albumartist%</artist>
    <genre>%genre%</genre>
    <style></style>
    <mood></mood>
    <theme></theme>
    <musicBrainzAlbumID></musicBrainzAlbumID>
    <compilation>true</compilation>
    <review>%comment%</review>
    <type></type>
    <releasedate></releasedate>
    <label>%publisher%</label>
    <type></type>
    <thumb>smb:%filepath%folder.jpg</thumb>
    <path>smb:%filepath%</path>
    <rating>1</rating>
    <year>%year%</year>
    <albumArtistCredits>
        <artist>%albumartist%</artist>
        <musicBrainzArtistID></musicBrainzArtistID>
        <joinphrase></joinphrase>
        <featuring>%albumartist%</featuring>
    </albumArtistCredits>
$select %track%,0
    <track>
        <musicBrainzTrackID></musicBrainzTrackID>
        <title>%title%</title>
        <position>%track%</position>
        <duration>%_length%</duration>
    </track>
$endselect
</album>
$endselect
$document_close

nfo - artist.tse
Code:
# Tagscanner export script

$file_name %workpath%artist.nfo
$file_notes nfo - create artist.nfo for files on SMB share (XML UTF-8)
$file_encoding utf-8
$file_writebom 0
$file_ishtml 1

$document_open
$select %artist%,0
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<artist>
    <name>%artist%</name>
    <musicBrainzArtistID></musicBrainzArtistID>
    <genre>%genre%</genre>
    <style></style>
    <mood></mood>
    <theme></theme>
    <yearsactive></yearsactive>
    <instruments></instruments>
    <born></born>
    <formed></formed>
    <biography></biography>
    <died></died>
    <disbanded></disbanded>
    <thumb>smb:%workpath%folder.jpg</thumb>
    <path>smb:%workpath%</path>
    <fanart>
        <thumb></thumb>
    </fanart>
$select %year%-%album%,0
    <album>
        <title>%album%</title>
        <year>%year%</year>
    </album>
$endselect
</artist>
$endselect
$document_close
Reply
#2
Thanks very much for this. I use Discogs and sometimes Amazon not Musicbrainz for lots of my lookups though, what should I do. I'm also noticing in the album nfo there's no tag for artist on each file just the albumartist for the whole folder.
Image
Reply
#3
(2014-06-28, 13:13)PogMoThoin Wrote: Thanks very much for this. I use Discogs and sometimes Amazon not M[/u]usicbrainz for lots of my lookups though, what should I do

Hi PogMoThoin,

There's a few discussion threads on XBMC and DISCOGS that discuss direct scraper support ... and from what I've understood, we're unlikely to see direct scraper support in the near future as Discogs blocks XBMC-related scraper queries. A search through these sub-forums will provide some extra information:

http://forum.xbmc.org/forumdisplay.php?fid=147
http://www.discogs.com/forum


The template files I posted were intended to create a default set of .NFO files with information obtained from the metadata (aka IDTags) in your audio files. AFAIK, these are all of the XML tags that XBMC supports. I don't use all of these myself; but unless I run into an issue, I typically prefer to leave all the XML tags present so as to serve as a reminder of what's supported/useable - I simply do not place any data in the XML tags I don't use.

You can create a custom template that injects specific IDTag information into specific XML tags of the .NFO files. XML tags you don't need can simply be left empty or likely omitted altogether from the .NFO file. Below are some additional notes to keep in mind:

TagScanner 5.1.649 (and older)
  • TagScanner currently supports FreeDB, TrackType, Amazon, Discogs, and MusicBrainz.
  • There's a bug whereby the List Maker feature fails to add file content when it encounters an apostrophe (') in the folder name (ex: .\Hits Of The 70's) when the HTML Compatible option is selected. In such cases, it may be necessary to temporarily rename the folder and manually edit the .NFO file afterwards.
  • Folder tree handling in the List Maker feature doesn't provide support to place the ARTIST.NFO file in the appropriate place for multiple artists. As such, the .NFO file has to be generated by setting the working path to the artist folder prior to triggering the Export option - i.e. artists .NFO's must be done one-at-a-time.

XBMC 13.1 (and older)
  • XBMC music scrapers support MusicBrainz, AllMusic, AudioDB.
  • XBMC's code has been optimized to support MusicBrainz.
  • XBMC will "prefer" .NFO files when "Local Information Only (.NFO)" is selected as the default scraper via Settings.

There's a few issues with the Local Information Only (.NFO) scraper which I posted about here:

http://forum.xbmc.org/showthread.php?tid=197930
http://forum.xbmc.org/showthread.php?tid=197752



Hope that helps,
Reply
#4
(2014-06-28, 13:13)PogMoThoin Wrote: I'm also noticing in the album nfo there's no tag for artist on each file just the albumartist for the whole folder.

Assume you're referring to the XML tags supported in <TRACK></TRACK>. If so, you are correct. I posted about this shortcoming in one of the threads I linked to in my previous reply.

Also, here are relevant XBMC Wiki links to handling .NFO's. The information is somewhat dated from what I've discovered and the content could use some refreshing ... which I posted about as well in one of the other threads.

http://wiki.xbmc.org/index.php?title=Add...he_library
http://wiki.xbmc.org/index.php?title=NFO_files
http://wiki.xbmc.org/index.php?title=NFO_files/music


Cheers,
Reply
#5
Thanks for that, I haven't gotten round to reading your links but I'll dig in later, you've given me some very good templates to work with. I wonder if I added the ISRC info to the .nfo instead of Musicbrainz ID
Image
Reply
#6
(2014-06-28, 14:52)PogMoThoin Wrote: ... I wonder if I added the ISRC info to the .nfo instead of Musicbrainz ID

Assuming you meant, adding the ISRC info to <musicBrainzAlbumID></musicBrainzAlbumID> NFO tags. XBMC could attempt a query to MusicBrainz using the value and return a "not found" or incorrect artist information.

Assuming you meant, create a custom <ISRC></ISRC> XML tag. XBMC could fail to parse the NFO as a result of an invalid/unsupported XML tag in the file or the XML tag could be ignored altogether.


In either assumption, a trip through the XBMC code - which I haven't done - would reveal the answer. Wink

Cheers,
Reply
#7
After reading your links it seems it's hardly worth the time creating nfos, XBMC doesn't handle them well, needs work
Image
Reply
#8
(2014-06-29, 00:26)PogMoThoin Wrote: After reading your links it seems it's hardly worth the time creating nfos, XBMC doesn't handle them well, needs work

I'm not sure how many XBMC enthusiasts fully tag their audio libraries and/or use the Local Information Only (NFO) scraper.

From my experience using XBMC since its first incarnations for the XBOX Gen 1, the team is usually great implementing fixes/updates as time permits. Feel free to add your voice to those threads ... the more feedback the better. Up-to-now, I figured I was the only one using TagScanner and NFO's.

Cheers,
Reply

Logout Mark Read Team Forum Stats Members Help
TagScanner 5.1.x Music NFO Templates0