protected function downloadCaption($captions, $language, $filename)
	{
		if ($language === null) $language = $this->defaultCaptionLanguage;
		if (!array_key_exists($language, $captions))
			$captionData = array_shift($captions);
		else
			$captionData = $captions[$language];

		$captionData = $this->parseCaption($captionData);
		if ($captionData !== null) {

			$captionData = $this->formatCaption($captionData->caption);

			$filename = substr($filename, 0, strrpos($filename, '.')) . '.' . $captionData->extension;
			$path = $this->path . DIRECTORY_SEPARATOR . $filename;

			file_put_contents($path, $captionData->caption);
		}
	}