MP3 Collection reading ID3 Tags

Managed by | Updated .

Funnelback's supports indexing MP3 files see an example configuration files for enabling this functionality.

collection.cfg
# Example crawling 'Best of Bootie' - their robots.txt file allows it.
service_name=Best of Bootie - MP3 Testing
collection_type=web
include_patterns=http://bootiemashup.com/bestofbootie2013/
 
 
# Most MP3 files are larger than the default 3MB
crawler.accept_files=mp3
crawler.max_download_size=20
 
# Ensure 'mp3' is removed from the default list of files to reject
crawler.reject_files=Z,asc,asf,asx,avi,bat,bib,bmp,bz2,c,class,cpp,css,deb,dll,dmg,doc,docx,dvi,exe,fits,fts,gif,gz,h,ico,jar,java,jpeg,jpg,lzh,man,mid,mov,mpeg,mpg,o,old,pdf,pgp,png,ppm,ppt,pptx,qt,ra,ram,rpm,rtf,svg,swf,tar,tcl,tex,tgz,tif,tiff,wav,wmv,wrl,xls,xlsx,xpm,zip 
 
# Enalbed tika to extract metadata from MP3
filter.classes=TikaFilterProvider
filter.tika.types=mp3

# If MP3's are not being indexed consider adding this setting
crawler.store_all_types=true
metamap.cfg
# ID3 tags
a,1,xmpDM:artist
c,1,xmpDM:album
d,0,xmpDM:releaseDate
f,0,Content-Type
r,3,xmpDM:duration
s,1,xmpDM:genre
t,1,dc:title
simple.ftl
<#-- DISPLAY ID3 METADATA -->
<#if s.result.metaData["a"]?? || s.result.metaData["s"]?? || s.result.metaData["p"]??>

  <dl class="dl-horizontal text-muted">
    <#if s.result.metaData["d"]??>

      <dt>Year</dt>
      <dd>${s.result.metaData["d"]!?replace("|", ", ")}</dd></#if>
    <#if s.result.metaData["r"]??>

    <#-- CONVERT DURATION TO MINUTES:SECONDS -->
      <#assign minutes = (s.result.metaData["r"]?number/1000/60)?int />
      <#assign seconds = (s.result.metaData["r"]?number/1000 - (60 * minutes)) />
      <dt>Duration</dt>
      <dd>${minutes}:${seconds?string("00")}</dd>
    </#if>
    <#if s.result.metaData["a"]??>

      <dt>Artist</dt>
      <dd>${s.result.metaData["a"]!?replace("|", ", ")}</dd>
    </#if>
    <#if s.result.metaData["s"]??>

      <dt>Genre:</dt>
      <dd>${s.result.metaData["s"]!?replace("|", ", ")}</dd>
    </#if>
  </dl>
</#if> 
Was this artcle helpful?

Comments