~ubuntu-branches/ubuntu/vivid/gpodder/vivid

« back to all changes in this revision

Viewing changes to src/gpodder/youtube.py

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-04-12 22:07:02 UTC
  • mfrom: (5.2.27 sid)
  • Revision ID: package-import@ubuntu.com-20130412220702-mux8v9r8zt2jin0x
Tags: 3.5.1-1
* New upstream release.
* d/control: declare versioned dependency on python-gtk2 (>= 2.16)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- coding: utf-8 -*-
2
2
#
3
3
# gPodder - A media aggregator and podcast client
4
 
# Copyright (c) 2005-2012 Thomas Perl and the gPodder Team
 
4
# Copyright (c) 2005-2013 Thomas Perl and the gPodder Team
5
5
#
6
6
# gPodder is free software; you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
25
25
 
26
26
from gpodder import util
27
27
 
 
28
import os.path
 
29
 
28
30
import logging
29
31
logger = logging.getLogger(__name__)
30
32
 
133
135
 
134
136
        # This provides good quality video, seems to be always available
135
137
        # and is playable fluently in Media Player
136
 
        if gpodder.ui.harmattan:
 
138
        if gpodder.ui.harmattan or gpodder.ui.sailfish:
137
139
            preferred_fmt_ids = [18]
138
140
 
139
141
        for id in preferred_fmt_ids:
220
222
 
221
223
    seen_users = set()
222
224
    for entry in data['feed']['entry']:
223
 
        user = entry['author'][0]['name']['$t']
 
225
        user = os.path.basename(entry['author'][0]['uri']['$t'])
224
226
        title = entry['title']['$t']
225
227
        url = 'http://www.youtube.com/rss/user/%s/videos.rss' % user
226
228
        if user not in seen_users: