~unity-lens-videos/unity-lens-video/remote-videos

« back to all changes in this revision

Viewing changes to src/unity-scope-video-remote

  • Committer: David Callé
  • Date: 2012-02-29 17:55:33 UTC
  • Revision ID: davidc@framli.eu-20120229175533-c5vrn3ud7rly0ukn
One does not simply stringify non-ascii characters

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
        This is useful when coming out of a network issue."""
192
192
        for i in results:
193
193
            try:
194
 
                uri = str(i['url'])
195
 
                title = str(i['title'])
196
 
                icon = str(i['img'])
197
 
                comment = str(i['source'])
 
194
                uri = i['url'].encode('utf-8')
 
195
                title = i['title'].encode('utf-8')
 
196
                icon = i['img'].encode('utf-8')
 
197
                comment = i['source'].encode('utf-8')
198
198
                if uri.startswith('http'):
199
199
                    # Instead of an uri, we pass a string of uri + metadata
200
200
                    model.append(uri+'lens-meta://'+title+'lens-meta://'+icon,