Better method to prevent MediaInfo from detecting playlist files.

This commit is contained in:
LoRd_MuldeR 2012-04-20 22:39:19 +02:00
parent 5ff45cd494
commit caf835dbf9
2 changed files with 15 additions and 7 deletions

View File

@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE RC
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 985
#define VER_LAMEXP_PATCH 4
#define VER_LAMEXP_BUILD 986
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)

View File

@ -105,6 +105,7 @@ const char *FileAnalyzer::g_tags_gen[] =
const char *FileAnalyzer::g_tags_aud[] =
{
"ID",
"Source",
"Format",
"Format_Profile",
"Format_Version",
@ -383,21 +384,28 @@ void FileAnalyzer::updateInfo(AudioFileModel &audioFile, bool *skipNext, unsigne
return;
}
/*Skip?*/
/*Skip or empty?*/
if((*skipNext) || value.isEmpty())
{
return;
}
/*Playlist file?*/
if(IS_KEY("Aud_Source"))
{
*skipNext = true;
audioFile.setFormatContainerType(QString());
audioFile.setFormatAudioType(QString());
qWarning("Skipping info for playlist file!");
return;
}
/*General Section*/
if(IS_SEC("Gen"))
{
if(IS_KEY("Gen_Format"))
{
if(value.compare("HLS", Qt::CaseInsensitive)) //MediaInfo detects "HLS" for .m3u files, we'll ignore that
{
audioFile.setFormatContainerType(value);
}
audioFile.setFormatContainerType(value);
}
else if(IS_KEY("Gen_Format_Profile"))
{