From: yomguy Date: Tue, 24 May 2011 13:06:05 +0000 (+0200) Subject: fix utf-8 pb during metadata parsing, remove WARNING X-Git-Tag: 1.1~164 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=310770b75a3678b640b1750a25550cfc0f65e335;p=telemeta.git fix utf-8 pb during metadata parsing, remove WARNING --- diff --git a/INSTALL b/INSTALL index 0a01a965..fe3f402e 100644 --- a/INSTALL +++ b/INSTALL @@ -44,7 +44,7 @@ Install the dependencies Install TimeSide ----------------- -Telemeta needs the audio processing library named TimeSide. +Telemeta needs the audio processing library named TimeSide (>= 0.3) You have to download and install it from source. So, download the last archive at : @@ -57,7 +57,7 @@ and then the module. Install JSON-RPC server ------------------------ -In order to use markers on the player, you will need a JSONN-RPC server for django:: +In order to use markers on the player, you will need a JSON-RPC server for django:: git clone git://github.com/samuraisam/django-json-rpc.git cd django-json-rpc diff --git a/WARNING b/WARNING deleted file mode 100644 index af9c5c30..00000000 --- a/WARNING +++ /dev/null @@ -1,15 +0,0 @@ -================================== -Telemeta 1.0 - Refactoring Warning -================================== - -In the perspective of Telemeta 1.0, most parts of the code are currently -being refactored. - -In this context, you should expect the SVN trunk to be **very unstable**. - -You may not be able to use it at all until we're done actually... So please -be patient. - -This warning will be removed once things get better, and that we get closer -to the beta stage. - diff --git a/telemeta/models/media.py b/telemeta/models/media.py index f2e493b0..92ff4d84 100644 --- a/telemeta/models/media.py +++ b/telemeta/models/media.py @@ -478,7 +478,7 @@ class DublinCoreToFormatMetadata(object): keys_done = [] for data in dc_metadata: key = data[0] - value = data[1] + value = data[1].encode('utf-8') if value: if key == 'date': value = value.split(';')[0].split('=') @@ -488,8 +488,9 @@ class DublinCoreToFormatMetadata(object): else: value = value[0].split('-')[0] if key in mapp: - metadata[mapp[key]] = str(value) + print value + metadata[mapp[key]] = value.decode('utf-8') elif 'all' in mapp.keys(): - metadata[key] = str(value) + metadata[key] = value.decode('utf-8') keys_done.append(key) return metadata