public function addRating($videoId, $rating)
    {
        $this->validateRating($rating);
        $customMetaData = $this->getVideo($videoId)->getCustomMetadata();

        $average = $this->getRatingAverage($videoId);
        $count = $this->getRatingCount($videoId);
        $newCount = $count + 1;

        $customMetaData[$this->metadataFieldCount] = $newCount;
        $customMetaData[$this->metadataFieldAverage] = (($average * $count) + $rating) / $newCount;

        $this->storeCustomMetaData($customMetaData, $videoId);
    }