diff -Nru mopidy-podcast-2.0.1/AUTHORS mopidy-podcast-2.0.2/AUTHORS --- mopidy-podcast-2.0.1/AUTHORS 2016-08-08 20:35:37.000000000 +0000 +++ mopidy-podcast-2.0.2/AUTHORS 2018-01-10 19:07:22.000000000 +0000 @@ -1,2 +1,3 @@ - Thomas Kemmer - Chris Lamb +- Tyler Cipriani diff -Nru mopidy-podcast-2.0.1/CHANGES.rst mopidy-podcast-2.0.2/CHANGES.rst --- mopidy-podcast-2.0.1/CHANGES.rst 2016-08-10 19:14:36.000000000 +0000 +++ mopidy-podcast-2.0.2/CHANGES.rst 2018-01-10 19:07:22.000000000 +0000 @@ -1,3 +1,11 @@ +v2.0.2 (2018-01-10) +------------------- + +- Skip cache for local feeds. + +- Accept uppercase ``URL`` attributes in OPML feeds. + + v2.0.1 (2016-08-10) ------------------- diff -Nru mopidy-podcast-2.0.1/debian/changelog mopidy-podcast-2.0.2/debian/changelog --- mopidy-podcast-2.0.1/debian/changelog 2016-08-11 19:42:17.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/changelog 2018-04-15 00:11:46.000000000 +0000 @@ -1,3 +1,17 @@ +mopidy-podcast (2.0.2-1) unstable; urgency=medium + + * New upstream release + * debian/control + - Bump Standards-Version to 4.1.4, no changes required + - Set Vcs-* to salsa.debian.org + - Require debhelper 10 + - Remove version range on python, not needed since oldoldstable + - Use python3-sphinx instead of python-sphinx to build docs + * debian/copyright + - Update copyright years + + -- Stein Magnus Jodal Sun, 15 Apr 2018 02:11:46 +0200 + mopidy-podcast (2.0.1-1) unstable; urgency=medium * New upstream release (Closes: #833774) diff -Nru mopidy-podcast-2.0.1/debian/compat mopidy-podcast-2.0.2/debian/compat --- mopidy-podcast-2.0.1/debian/compat 2016-08-11 19:40:04.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/compat 2018-04-15 00:11:46.000000000 +0000 @@ -1 +1 @@ -9 +10 diff -Nru mopidy-podcast-2.0.1/debian/control mopidy-podcast-2.0.2/debian/control --- mopidy-podcast-2.0.1/debian/control 2016-08-11 19:40:04.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/control 2018-04-15 00:11:46.000000000 +0000 @@ -2,20 +2,20 @@ Section: sound Priority: optional Maintainer: Stein Magnus Jodal -Build-Depends: debhelper (>= 9), +Build-Depends: debhelper (>= 10), dh-python, mopidy (>= 1.0.8-2), - python-all (>= 2.7), + python, python-cachetools, python-mock, python-pytest, python-setuptools, - python-sphinx, python-uritools, -Standards-Version: 3.9.8 + python3-sphinx, +Standards-Version: 4.1.4 Homepage: https://github.com/tkem/mopidy-podcast -Vcs-Git: https://anonscm.debian.org/git/pkg-mopidy/mopidy-podcast.git -Vcs-Browser: https://anonscm.debian.org/git/pkg-mopidy/mopidy-podcast.git +Vcs-Git: https://salsa.debian.org/mopidy-team/mopidy-podcast.git +Vcs-Browser: https://salsa.debian.org/mopidy-team/mopidy-podcast X-Python-Version: >= 2.7 Package: mopidy-podcast @@ -23,7 +23,7 @@ Depends: ${misc:Depends}, ${python:Depends}, ${sphinxdoc:Depends}, -Breaks: mopidy-podcast-gpodder (<< 2.0) +Breaks: mopidy-podcast-gpodder (<< 2.0), Description: Mopidy extension for searching and browsing podcasts Mopidy is a music server which can play music from multiple sources, like your local hard drive, radio streams, and from Spotify and SoundCloud. diff -Nru mopidy-podcast-2.0.1/debian/copyright mopidy-podcast-2.0.2/debian/copyright --- mopidy-podcast-2.0.1/debian/copyright 2016-08-11 19:40:04.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/copyright 2018-04-15 00:11:46.000000000 +0000 @@ -4,11 +4,11 @@ Source: https://github.com/tkem/mopidy-podcast Files: * -Copyright: 2014-2016 Thomas Kemmer +Copyright: 2014-2018 Thomas Kemmer License: Apache-2.0 Files: debian/* -Copyright: 2015-2016 Stein Magnus Jodal +Copyright: 2015-2018 Stein Magnus Jodal License: Apache-2.0 License: Apache-2.0 diff -Nru mopidy-podcast-2.0.1/debian/doc-base mopidy-podcast-2.0.2/debian/doc-base --- mopidy-podcast-2.0.1/debian/doc-base 2016-08-11 19:40:04.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/doc-base 2018-04-15 00:11:46.000000000 +0000 @@ -8,5 +8,5 @@ Files: /usr/share/doc/mopidy-podcast/html/*.html Format: Text -Index: /usr/share/doc/mopidy-podcast/rst/index.txt +Index: /usr/share/doc/mopidy-podcast/rst/index.rst.txt Files: /usr/share/doc/mopidy-podcast/rst/*.txt diff -Nru mopidy-podcast-2.0.1/debian/.git-dpm mopidy-podcast-2.0.2/debian/.git-dpm --- mopidy-podcast-2.0.1/debian/.git-dpm 2016-08-11 19:40:04.000000000 +0000 +++ mopidy-podcast-2.0.2/debian/.git-dpm 2018-04-15 00:11:27.000000000 +0000 @@ -1,11 +1,11 @@ # see git-dpm(1) from git-dpm package -97843236ceb77faa348676febc32d2b4cd84e4b8 -97843236ceb77faa348676febc32d2b4cd84e4b8 -97843236ceb77faa348676febc32d2b4cd84e4b8 -97843236ceb77faa348676febc32d2b4cd84e4b8 -mopidy-podcast_2.0.1.orig.tar.gz -a990c9451448a0a00bc31e3feec2212f617ecc69 -20605 +e3a5c6729deb3fa9a7a6cce389a5eb5f6341d23e +e3a5c6729deb3fa9a7a6cce389a5eb5f6341d23e +e3a5c6729deb3fa9a7a6cce389a5eb5f6341d23e +e3a5c6729deb3fa9a7a6cce389a5eb5f6341d23e +mopidy-podcast_2.0.2.orig.tar.gz +aa7c5c23bbed5f49dcc5e0b15a85caabbfe97eb3 +21280 debianTag="debian/%e%v" patchedTag="patched/%e%v" upstreamTag="upstream/%e%u" diff -Nru mopidy-podcast-2.0.1/docs/conf.py mopidy-podcast-2.0.2/docs/conf.py --- mopidy-podcast-2.0.1/docs/conf.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/docs/conf.py 2018-01-10 19:07:22.000000000 +0000 @@ -12,8 +12,9 @@ metadata = dict(findall(r"__([a-z]+)__ = '([^']+)'", f.read())) return metadata['version'] + project = 'Mopidy-Podcast' -copyright = '2014-2016 Thomas Kemmer' +copyright = '2014-2018 Thomas Kemmer' version = get_version(b'../mopidy_podcast/__init__.py') release = version diff -Nru mopidy-podcast-2.0.1/docs/license.rst mopidy-podcast-2.0.2/docs/license.rst --- mopidy-podcast-2.0.1/docs/license.rst 2016-08-08 20:51:29.000000000 +0000 +++ mopidy-podcast-2.0.2/docs/license.rst 2018-01-10 19:07:22.000000000 +0000 @@ -1,7 +1,7 @@ License ======================================================================== -Mopidy-Podcast is Copyright (c) 2014-2016 Thomas Kemmer and +Mopidy-Podcast is Copyright (c) 2014-2018 Thomas Kemmer and contributors. Licensed under the Apache License, Version 2.0 (the "License"); you diff -Nru mopidy-podcast-2.0.1/mopidy_podcast/backend.py mopidy-podcast-2.0.2/mopidy_podcast/backend.py --- mopidy-podcast-2.0.1/mopidy_podcast/backend.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/mopidy_podcast/backend.py 2018-01-10 19:07:22.000000000 +0000 @@ -21,21 +21,22 @@ pykka_traversable = True def __init__(self, config): - # FIXME: "missing" parameter will be deprecated in cachetools v1.2 super(PodcastFeedCache, self).__init__( maxsize=config[Extension.ext_name]['cache_size'], - ttl=config[Extension.ext_name]['cache_ttl'], - missing=self.__missing + ttl=config[Extension.ext_name]['cache_ttl'] ) self.__opener = Extension.get_url_opener(config) self.__timeout = config[Extension.ext_name]['timeout'] - def __missing(self, uri): + def __missing__(self, uri): ext_name, _, feedurl = uri.partition('+') assert ext_name == Extension.ext_name f = self.__opener.open(feedurl, timeout=self.__timeout) with contextlib.closing(f) as source: feed = feeds.parse(source) + # do not cache local URIs so updates are available immediately + if not feedurl.startswith('file:'): + self[uri] = feed return feed diff -Nru mopidy-podcast-2.0.1/mopidy_podcast/feeds.py mopidy-podcast-2.0.2/mopidy_podcast/feeds.py --- mopidy-podcast-2.0.1/mopidy_podcast/feeds.py 2016-08-08 20:35:37.000000000 +0000 +++ mopidy-podcast-2.0.2/mopidy_podcast/feeds.py 2018-01-10 19:07:22.000000000 +0000 @@ -30,6 +30,15 @@ raise TypeError('Not a recognized podcast feed: %s', url) +def get_url(source, default=None): + """ + Get URL from xml.etree.ElementTree.Element. + + URL is often capitalized in OPML feeds. + """ + return source.get('url', source.get('URL', default)) + + class PodcastFeed(object): def __init__(self, url): @@ -76,7 +85,7 @@ def getstreamuri(self, guid): for item in self.__items: if self.__guid(item) == guid: - return item.find('enclosure').get('url') + return get_url(item.find('enclosure')) return None def items(self, newest_first=False): @@ -154,7 +163,7 @@ @classmethod def __guid(cls, etree): - return etree.findtext('guid') or etree.find('enclosure').get('url') + return etree.findtext('guid') or get_url(etree.find('enclosure')) @classmethod def __image(cls, etree): @@ -195,16 +204,16 @@ TYPES = { 'include': lambda e: models.Ref.directory( name=e.get('text'), - uri=PodcastFeed.getfeeduri(e.get('url')) + uri=PodcastFeed.getfeeduri(get_url(e)) ), 'link': lambda e: models.Ref( type=( models.Ref.DIRECTORY - if e.get('url').endswith('.opml') + if get_url(e).endswith('.opml') else models.Ref.ALBUM ), name=e.get('text'), - uri=PodcastFeed.getfeeduri(e.get('url')) + uri=PodcastFeed.getfeeduri(get_url(e)) ), 'rss': lambda e: models.Ref.album( name=e.get('title', e.get('text')), diff -Nru mopidy-podcast-2.0.1/mopidy_podcast/__init__.py mopidy-podcast-2.0.2/mopidy_podcast/__init__.py --- mopidy-podcast-2.0.1/mopidy_podcast/__init__.py 2016-08-10 19:14:46.000000000 +0000 +++ mopidy-podcast-2.0.2/mopidy_podcast/__init__.py 2018-01-10 19:07:22.000000000 +0000 @@ -4,7 +4,7 @@ from mopidy import config, ext, httpclient -__version__ = '2.0.1' +__version__ = '2.0.2' class Extension(ext.Extension): diff -Nru mopidy-podcast-2.0.1/mopidy_podcast/library.py mopidy-podcast-2.0.2/mopidy_podcast/library.py --- mopidy-podcast-2.0.1/mopidy_podcast/library.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/mopidy_podcast/library.py 2018-01-10 19:07:22.000000000 +0000 @@ -50,14 +50,17 @@ return None elif root.startswith(('file:', 'http:', 'https:')): uri = uritools.uridefrag('podcast+' + root).uri + return models.Ref.directory(name='Podcasts', uri=uri) elif os.path.isabs(root): uri = uritools.uricompose('podcast+file', '', root) + return models.Ref.directory(name='Podcasts', uri=uri) elif self.__config_dir: - uri = uritools.uricompose('podcast+file', '', - os.path.join(self.__config_dir, root)) + path = os.path.join(self.__config_dir, root) + uri = uritools.uricompose('podcast+file', '', path) + return models.Ref.directory(name='Podcasts', uri=uri) else: + logger.error('Cannot retrieve Podcast root directory') return None - return models.Ref.directory(name='Podcasts', uri=uri) def browse(self, uri): try: diff -Nru mopidy-podcast-2.0.1/Mopidy_Podcast.egg-info/PKG-INFO mopidy-podcast-2.0.2/Mopidy_Podcast.egg-info/PKG-INFO --- mopidy-podcast-2.0.1/Mopidy_Podcast.egg-info/PKG-INFO 2016-08-10 19:44:31.000000000 +0000 +++ mopidy-podcast-2.0.2/Mopidy_Podcast.egg-info/PKG-INFO 2018-01-10 19:09:27.000000000 +0000 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: Mopidy-Podcast -Version: 2.0.1 +Version: 2.0.2 Summary: Mopidy extension for browsing and playing podcasts Home-page: https://github.com/tkem/mopidy-podcast Author: Thomas Kemmer Author-email: tkemmer@computer.org License: Apache License, Version 2.0 +Description-Content-Type: UNKNOWN Description: Mopidy-Podcast ======================================================================== @@ -50,7 +51,7 @@ License ------------------------------------------------------------------------ - Copyright (c) 2014-2016 Thomas Kemmer and contributors_. + Copyright (c) 2014-2018 Thomas Kemmer and contributors_. Licensed under the `Apache License, Version 2.0`_. diff -Nru mopidy-podcast-2.0.1/Mopidy_Podcast.egg-info/requires.txt mopidy-podcast-2.0.2/Mopidy_Podcast.egg-info/requires.txt --- mopidy-podcast-2.0.1/Mopidy_Podcast.egg-info/requires.txt 2016-08-10 19:44:31.000000000 +0000 +++ mopidy-podcast-2.0.2/Mopidy_Podcast.egg-info/requires.txt 2018-01-10 19:09:27.000000000 +0000 @@ -1,5 +1,5 @@ setuptools -Mopidy >= 1.1.1 -Pykka >= 1.1 -cachetools >= 1.0 -uritools >= 1.0 +Mopidy>=1.1.1 +Pykka>=1.1 +cachetools>=2.0 +uritools>=1.0 diff -Nru mopidy-podcast-2.0.1/PKG-INFO mopidy-podcast-2.0.2/PKG-INFO --- mopidy-podcast-2.0.1/PKG-INFO 2016-08-10 19:44:32.000000000 +0000 +++ mopidy-podcast-2.0.2/PKG-INFO 2018-01-10 19:09:27.000000000 +0000 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: Mopidy-Podcast -Version: 2.0.1 +Version: 2.0.2 Summary: Mopidy extension for browsing and playing podcasts Home-page: https://github.com/tkem/mopidy-podcast Author: Thomas Kemmer Author-email: tkemmer@computer.org License: Apache License, Version 2.0 +Description-Content-Type: UNKNOWN Description: Mopidy-Podcast ======================================================================== @@ -50,7 +51,7 @@ License ------------------------------------------------------------------------ - Copyright (c) 2014-2016 Thomas Kemmer and contributors_. + Copyright (c) 2014-2018 Thomas Kemmer and contributors_. Licensed under the `Apache License, Version 2.0`_. diff -Nru mopidy-podcast-2.0.1/README.rst mopidy-podcast-2.0.2/README.rst --- mopidy-podcast-2.0.1/README.rst 2016-08-10 19:18:19.000000000 +0000 +++ mopidy-podcast-2.0.2/README.rst 2018-01-10 19:07:22.000000000 +0000 @@ -42,7 +42,7 @@ License ------------------------------------------------------------------------ -Copyright (c) 2014-2016 Thomas Kemmer and contributors_. +Copyright (c) 2014-2018 Thomas Kemmer and contributors_. Licensed under the `Apache License, Version 2.0`_. diff -Nru mopidy-podcast-2.0.1/setup.cfg mopidy-podcast-2.0.2/setup.cfg --- mopidy-podcast-2.0.1/setup.cfg 2016-08-10 19:44:32.000000000 +0000 +++ mopidy-podcast-2.0.2/setup.cfg 2018-01-10 19:09:27.000000000 +0000 @@ -13,5 +13,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0 diff -Nru mopidy-podcast-2.0.1/setup.py mopidy-podcast-2.0.2/setup.py --- mopidy-podcast-2.0.1/setup.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/setup.py 2018-01-10 19:07:22.000000000 +0000 @@ -26,7 +26,7 @@ 'setuptools', 'Mopidy >= 1.1.1', 'Pykka >= 1.1', - 'cachetools >= 1.0', + 'cachetools >= 2.0', 'uritools >= 1.0' ], entry_points={ diff -Nru mopidy-podcast-2.0.1/tests/test_library.py mopidy-podcast-2.0.2/tests/test_library.py --- mopidy-podcast-2.0.1/tests/test_library.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/tests/test_library.py 2018-01-10 19:07:22.000000000 +0000 @@ -16,7 +16,6 @@ feed = feeds.parse(abspath(filename)) newest_first = config['podcast']['browse_order'] == 'desc' assert library.browse(feed.uri) == list(feed.items(newest_first)) - assert feed.uri in library.backend.feeds @pytest.mark.parametrize('uri,expected', [ @@ -38,7 +37,6 @@ assert library.get_images([uri]) == {uri: images} images = {uri: images for uri, images in feed.images()} assert library.get_images(list(images)) == images - assert feed.uri in library.backend.feeds @pytest.mark.parametrize('uris,expected', [ @@ -60,7 +58,6 @@ assert library.lookup(track.uri) == [track] newest_first = config['podcast']['lookup_order'] == 'desc' assert library.lookup(feed.uri) == list(feed.tracks(newest_first)) - assert feed.uri in library.backend.feeds @pytest.mark.parametrize('uri,expected', [ @@ -79,10 +76,12 @@ def test_refresh(library, filename, abspath): feed = feeds.parse(abspath(filename)) tracks = library.lookup(feed.uri) + assert feed.uri not in library.backend.feeds # local feeds not cached! + library.backend.feeds[feed.uri] = feed assert feed.uri in library.backend.feeds library.refresh(tracks[0].uri) assert feed.uri not in library.backend.feeds - library.lookup(tracks[0].uri) - assert feed.uri in library.backend.feeds + library.backend.feeds[feed.uri] = feed + assert library.backend.feeds library.refresh() assert not library.backend.feeds diff -Nru mopidy-podcast-2.0.1/tests/test_opml.py mopidy-podcast-2.0.2/tests/test_opml.py --- mopidy-podcast-2.0.1/tests/test_opml.py 2016-04-23 14:33:39.000000000 +0000 +++ mopidy-podcast-2.0.2/tests/test_opml.py 2018-01-10 19:07:22.000000000 +0000 @@ -27,6 +27,9 @@ url="http://example.com/directory2.opml"/> + + @@ -64,6 +67,9 @@ ), models.Ref.album( uri='podcast+http://example.com/podcast4.xml', name='Podcast' + ), + models.Ref.album( + uri='podcast+http://example.com/podcast5.xml', name='PODCAST' ) ]