protected function addMediaAttributes( \Aimeos\MShop\Media\Item\Iface $mediaItem, array $attrListItems )
	{
		$listManager = \Aimeos\MShop::create( $this->getContext(), 'media/lists' );
		$listItems = $mediaItem->getListItems( 'attribute', 'variant', null, false );

		foreach( $attrListItems as $listItem )
		{
			if( ( $litem = $mediaItem->getListItem( 'attribute', 'variant', $listItem->getRefId(), false ) ) !== null )
			{
				unset( $listItems[$litem->getId()] );
				continue;
			}

			$litem = $listManager->createItem()->setType( 'variant' )->setRefId( $listItem->getRefId() );
			$mediaItem->addListItem( 'attribute', $litem );
		}

		return $mediaItem->deleteListItems( $listItems );
	}