I am failing to import "tracknumber" (id3=TRCK)
  • I am importing audio metadata into airtime, via my MP3 library, under "watch" directories. The flow is as such.

    • /srv/airtime/watch created on airtime server filesystem, and configured in settings.
    • scp recordings to this directory..
    • watch airtime pick up the new data. works well.

    The exception, being the MDATA_KEY_TRACKNUMBER metadata value (aka tracknumber or TRCK). The following is an example of one of the sample mp3 files and what is written into the database.

    For reference, i poked at the airtimemetadata.py module, specifically the AirtimeMetadata object. My file returns legit tags.

    In [1]: from airtimemetadata import AirtimeMetadata
    In [2]: md = AirtimeMetadata()
    In [3]: b = md.get_md_from_file('/tmp/1.mp3')

    In [4]: b
    {'MDATA_KEY_BITRATE': 238589,
     'MDATA_KEY_COMPOSER': u'Broken Bells',
     'MDATA_KEY_CREATOR': u'Broken Bells',
     'MDATA_KEY_DURATION': '0:3:45.384489',
     'MDATA_KEY_ENCODER': u'myself',
     'MDATA_KEY_FTYPE': 'audioclip',
     'MDATA_KEY_GENRE': u'Alternative Rock',
     'MDATA_KEY_LABEL': u'Columbia',
     'MDATA_KEY_MD5': '1bb921b6b97470c840183d084db633e5',
     'MDATA_KEY_MIME': 'audio/mp3',
     'MDATA_KEY_REPLAYGAIN': '-7.400000',
     'MDATA_KEY_SOURCE': u'Broken Bells',
     'MDATA_KEY_TITLE': u'The High Road',
     'MDATA_KEY_YEAR': u'2010'}

    Yet, when it is tossed into postgres, the track_number is missing for this file :s

    airtime=> SELECT id, track_title, artist_name, album_title, genre, year, track_number
      FROM cc_files
     WHERE artist_name = 'Broken Bells'
       AND track_title LIKE 'The High Road%';
    -[ RECORD 1 ]+-----------------
    id           | 276
    track_title  | The High Road
    artist_name  | Broken Bells
    album_title  | Broken Bells
    genre        | Alternative Rock
    year         | 2010
    track_number |

    for reference the file in question sits at http://jesseward.com/1.mp3

  • 2 Comments sorted by
  • Hi Jesse,

    Thanks for the detail in your post. This is a known issue with the Airtime media importer  - https://dev.sourcefabric.org/browse/CC-5680 - a quick (and very dirty) workaround would be to strip the "/10" component from the 'track' ID3 tag.

    You can add your voice to the issue by voting for it via that URL above. The Airtime dev team use this information to inform their task priorities, so it can't hurt to vote :)
  • thanks this helps. I have revised my id3 tagging script to supply the tracknumber only (leaving out track total). Forced a rescan of the watched directories and confirmed the track numbers are present.

    I am unable to view the linked bug in that ticket (http://dev.sourcefabric.org/browse/SAAS-376), so not sure what information is available.

    for reference here is the POST data sent by media-manger to the airtime API

    POST /api/reload-metadata-group/format/json/api_key/XX HTTP/1.1
    Accept-Encoding: identity
    Content-Length: 975
    Host: analogbubblebath.xx.xx:80
    Content-Type: application/x-www-form-urlencoded
    Connection: close
    User-Agent: Python-urllib/2.7