Author: dmeyer
Date: Sun Feb 19 20:37:39 2006
New Revision: 1208
Modified:
trunk/metadata/src/mediainfo.py
Log:
preserve UNPRINTABLE_KEYS
Modified: trunk/metadata/src/mediainfo.py
==============================================================================
--- trunk/metadata/src/mediainfo.py (original)
+++ trunk/metadata/src/mediainfo.py Sun Feb 19 20:37:39 2006
@@ -161,9 +161,13 @@
"""
# make sure all strings are unicode
for key in self.keys:
+ if key in UNPRINTABLE_KEYS:
+ continue
value = getattr(self, key)
- if isinstance(value, str) and not key in UNPRINTABLE_KEYS:
+ if isinstance(value, str):
setattr(self, key, str_to_unicode(value))
+ if isinstance(value, unicode):
+ setattr(self, key, value.strip().rstrip().replace('\0', ''))
def gettable(self, name, language='en'):
@@ -213,8 +217,6 @@
get the value of 'key'
"""
if self.__dict__.has_key(key):
- if isinstance(self.__dict__[key], str):
- return self.__dict__[key].strip().rstrip().replace('\0', '')
return self.__dict__[key]
elif hasattr(self, key):
return getattr(self, key)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog