'Set the item\'s value for a standard field or a flexattr.'

def __setitem__(self, key, value):

    if (key == 'path'):
        if isinstance(value, six.text_type):
            value = bytestring_path(value)
        elif isinstance(value, BLOB_TYPE):
            value = bytes(value)
    if (key in MediaFile.fields()):
        self.mtime = 0
    super(Item, self).__setitem__(key, value)
