#!/bin/bash
getTags_version='unknown-4'
getTags() {
	local type
	case "$mimetype" in
		audio/mpeg)
			type=ffmpeg
			(( disableffprobe )) && unset type
		;;
		'application/ogg opus')
			type=Opus
			(( disableopusinfo )) && unset type
		;;
		'audio/ogg opus')
			type=Opus
			(( disableopusinfo )) && unset type
		;;
		application/ogg*)
			type=soxi
			(( disablesoxi )) && unset type
		;;
		audio/ogg*)
			type=soxi
			(( disablesoxi )) && unset type
		;;
		audio/x-flac)
			type=FLAC
			(( disableflac )) && unset type
		;;
		audio/flac)
			type=FLAC
			(( disableflac )) && unset type
		;;
		video/webm)
			type=WebM
			(( disablemkvextract || disableogginfo )) && unset type
		;;
		video/*)
			type=ffmpeg_video
			(( disableffprobe )) && unset type
		;;
		*)
			type=ffmpeg_other
			(( disableffprobe )) && unset type
		;;
	esac
	if [ -n "$type" ]
	then
		getInfos::$type
	else
		tagreader=$getTags_version
	fi
}
