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

« back to all changes in this revision

Viewing changes to src/gpodder/coverart.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
46
46
    EXTENSIONS = SUPPORTED_EXTENSIONS.keys()
47
47
    ALL_EPISODES_ID = ':gpodder:all-episodes:'
48
48
 
 
49
    # Low timeout to avoid unnecessary hangs of GUIs
 
50
    TIMEOUT = 5
 
51
 
49
52
    def __init__(self):
50
53
        pass
51
54
 
81
84
 
82
85
            try:
83
86
                logger.info('Downloading cover art: %s', cover_url)
84
 
                data = util.urlopen(cover_url).read()
 
87
                data = util.urlopen(cover_url, timeout=self.TIMEOUT).read()
85
88
            except Exception, e:
86
89
                logger.warn('Cover art download failed: %s', e)
87
90
                return self._fallback_filename(title)