-remove unneeded check of "if file_info is not None:"
-remove undefined variable fomr phone_home_stat.php
This commit is contained in:
parent
0fee577c67
commit
214c6e85cc
2 changed files with 17 additions and 17 deletions
|
@ -161,10 +161,10 @@ class AirtimeMetadata:
|
||||||
self.logger.error("Exception %s", e)
|
self.logger.error("Exception %s", e)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
#check if file has any metadata
|
||||||
if file_info is None:
|
if file_info is None:
|
||||||
return None
|
return None
|
||||||
#check if file has any metadata
|
|
||||||
if file_info is not None:
|
|
||||||
for key in file_info.keys() :
|
for key in file_info.keys() :
|
||||||
if key in self.mutagen2airtime and len(file_info[key]) > 0:
|
if key in self.mutagen2airtime and len(file_info[key]) > 0:
|
||||||
info = file_info[key][0]
|
info = file_info[key][0]
|
||||||
|
@ -177,6 +177,8 @@ class AirtimeMetadata:
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
md[self.mutagen2airtime[key]] = info
|
md[self.mutagen2airtime[key]] = info
|
||||||
|
|
||||||
|
|
||||||
if 'MDATA_KEY_TITLE' not in md:
|
if 'MDATA_KEY_TITLE' not in md:
|
||||||
#get rid of file extention from original name, name might have more than 1 '.' in it.
|
#get rid of file extention from original name, name might have more than 1 '.' in it.
|
||||||
#filepath = to_unicode(filepath)
|
#filepath = to_unicode(filepath)
|
||||||
|
|
|
@ -48,9 +48,7 @@ if (PEAR::isError($CC_DBC)) {
|
||||||
echo "Database connection problem.".PHP_EOL;
|
echo "Database connection problem.".PHP_EOL;
|
||||||
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
||||||
" with corresponding permissions.".PHP_EOL;*/
|
" with corresponding permissions.".PHP_EOL;*/
|
||||||
if ($p_exitOnError) {
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//echo "* Connected to database".PHP_EOL;
|
//echo "* Connected to database".PHP_EOL;
|
||||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue