'Update the beets item. Set attribute to value or increment the value
of attribute. If the increment argument is used the value is cast to
the corresponding type.'

def update_item(self, item, attribute, value=None, increment=None):

    if (item is None):
        return
    if (increment is not None):
        item.load()
        value = (type(increment)(item.get(attribute, 0)) + increment)
    if (value is not None):
        item[attribute] = value
        item.store()
        self._log.debug(u'updated:    {0}    =    {1}    [{2}]', attribute, item[attribute], displayable_path(item.path))
