Skip to content

Commit

Permalink
ZO-4651: remove podcast block and header (everything podigee related)
Browse files Browse the repository at this point in the history
  • Loading branch information
stollero committed Feb 20, 2024
1 parent 167d8cd commit 2645c89
Show file tree
Hide file tree
Showing 20 changed files with 0 additions and 235 deletions.
6 changes: 0 additions & 6 deletions core/src/zeit/cms/content/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ def __init__(
kind=None,
video=False,
fallback_image=False,
podigee_id=None,
podigee_url=None,
zonaudioapp_id=None,
color=None,
available=None,
Expand All @@ -516,8 +514,6 @@ def __init__(
self.kind = kind
self.video = video
self.fallback_image = fallback_image
self.podigee_url = podigee_url
self.podigee_id = podigee_id
self.zonaudioapp_id = zonaudioapp_id
self.color = color

Expand Down Expand Up @@ -549,8 +545,6 @@ def _values(self):
unicode_or_none(node.get('kind')),
node.get('video') == 'yes',
node.get('fallback_image') == 'yes',
unicode_or_none(node.get('podigee-id')),
unicode_or_none(node.get('podigee-url')),
unicode_or_none(node.get('zonaudioapp-id')),
unicode_or_none(node.get('color')),
unicode_or_none(node.get('available')),
Expand Down
25 changes: 0 additions & 25 deletions core/src/zeit/content/article/edit/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -585,27 +585,6 @@
weight="10"
/>

<!-- podcast -->

<browser:page
for="zeit.content.article.edit.interfaces.IPodcast"
layer="zeit.cms.browser.interfaces.ICMSLayer"
name="edit-podcast"
class=".edit.EditPodcast"
permission="zope.View"
/>

<browser:viewlet
for="zeit.content.article.edit.interfaces.IPodcast"
layer="zeit.cms.browser.interfaces.ICMSLayer"
view="zope.interface.Interface"
manager="zeit.edit.interfaces.IContentViewletManager"
name="edit-podcast"
class="zeit.edit.browser.form.FormLoader"
permission="zope.View"
weight="10"
/>

<!-- jobticker -->

<browser:viewlet
Expand Down Expand Up @@ -872,10 +851,6 @@
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>

<class class="..podcast.Podcast">
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>

<class class="..jobticker.JobTicker">
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>
Expand Down
11 changes: 0 additions & 11 deletions core/src/zeit/content/article/edit/browser/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,17 +398,6 @@ def prefix(self):
return 'quiz.{0}'.format(self.context.__name__)


class EditPodcast(zeit.edit.browser.form.InlineForm):
legend = None
form_fields = zope.formlib.form.FormFields(zeit.content.article.edit.interfaces.IPodcast).omit(
*list(zeit.edit.interfaces.IBlock)
)

@property
def prefix(self):
return 'podcast.{0}'.format(self.context.__name__)


class EditBox(zeit.edit.browser.form.InlineForm):
legend = None
_form_fields = zope.formlib.form.FormFields(
Expand Down
14 changes: 0 additions & 14 deletions core/src/zeit/content/article/edit/browser/tests/test_podcast.py

This file was deleted.

11 changes: 0 additions & 11 deletions core/src/zeit/content/article/edit/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,6 @@
/>
</class>

<class class=".podcast.Podcast">
<require
interface=".interfaces.IPodcast"
permission="zope.View"
/>
<require
set_schema=".interfaces.IPodcast"
permission="zeit.EditContent"
/>
</class>

<class class=".adplace.Adplace">
<require
interface=".interfaces.IAdplace"
Expand Down
4 changes: 0 additions & 4 deletions core/src/zeit/content/article/edit/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,6 @@ class IQuiz(IBlock, zeit.content.modules.interfaces.IQuiz):
pass


class IPodcast(IBlock, zeit.content.modules.interfaces.PodcastBase):
pass


class IBox(IBlock):
"""
This box is a first step to generalizing other boxes
Expand Down
20 changes: 0 additions & 20 deletions core/src/zeit/content/article/edit/podcast.py

This file was deleted.

5 changes: 0 additions & 5 deletions core/src/zeit/content/audio/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class IPodcast(zope.interface.Interface):
image = zope.schema.URI(title=_('show art'))
distribution_channels = zope.interface.Attribute('distribution_channels')
feed = zope.schema.URI(title=_('feed'))
podigee_id = zope.interface.Attribute('podigee_id')


class Podcast(zeit.cms.content.sources.AllowedBase):
Expand All @@ -62,7 +61,6 @@ def __init__(
image=None,
distribution_channels=None,
feed=None,
podigee_id=None,
):
super().__init__(id, title, available=None)
self.external_id = external_id
Expand All @@ -73,7 +71,6 @@ def __init__(
self.distribution_channels = distribution_channels
# For parallel use of podcast hosts
self.feed = feed
self.podigee_id = podigee_id

def __eq__(self, other):
return (
Expand All @@ -86,7 +83,6 @@ def __eq__(self, other):
and self.image == other.image
and self.distribution_channels == other.distribution_channels
and self.feed == other.feed
and self.podigee_id == other.podigee_id
)


Expand Down Expand Up @@ -117,7 +113,6 @@ def _create_podcast(self, node):
node.get('image'),
distribution_channels,
node.get('feed'),
node.get('podigee_id'),
)
return podcast

Expand Down
1 change: 0 additions & 1 deletion core/src/zeit/content/audio/tests/test_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_podcast_source(self):
'http://xml.zeit.de/2006/DSC00109_2.JPG',
distribution_channels,
'https://feeds.example.com/aRDC72E_',
'podigee-1234',
)
assert values[0] == podcast

Expand Down
9 changes: 0 additions & 9 deletions core/src/zeit/content/cp/blocks/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@
permission="zeit.EditContent"/>
</class>

<class class=".podcast.PodcastBlock">
<require
interface="..interfaces.IPodcastBlock"
permission="zope.View" />
<require
set_schema="..interfaces.IPodcastBlock"
permission="zeit.EditContent"/>
</class>

<class class=".cpextra.CPExtraBlock">
<require
interface="..interfaces.ICPExtraBlock"
Expand Down
23 changes: 0 additions & 23 deletions core/src/zeit/content/cp/blocks/podcast.py

This file was deleted.

1 change: 0 additions & 1 deletion core/src/zeit/content/cp/browser/blocks/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<include file="xml.zcml" />
<include file="cpextra.zcml" />
<include file="playlist.zcml" />
<include file="podcast.zcml" />
<include file="quiz.zcml" />
<include file="headerimage.zcml" />
<include file="rawtext.zcml" />
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions core/src/zeit/content/cp/browser/blocks/podcast.py

This file was deleted.

26 changes: 0 additions & 26 deletions core/src/zeit/content/cp/browser/blocks/podcast.zcml

This file was deleted.

37 changes: 0 additions & 37 deletions core/src/zeit/content/cp/browser/blocks/tests/test_podcast.py

This file was deleted.

6 changes: 0 additions & 6 deletions core/src/zeit/content/cp/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,12 +734,6 @@ class IJobTickerBlock(zeit.content.modules.interfaces.IJobTicker, IBlock):
feed = zope.schema.Choice(title=_('Jobbox Ticker'), required=True, source=JOBTICKER_SOURCE)


class IPodcastBlock(IBlock, zeit.content.modules.interfaces.PodcastBase):
"""The Podcast block with a reference to a podcast."""

pass


class IMailBlock(zeit.content.modules.interfaces.IMail, IBlock):
pass

Expand Down
1 change: 0 additions & 1 deletion core/src/zeit/content/cp/tests/fixtures/blocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<module id="headerimage" title="Headerbild"/>
<module id="markup" title="HTML-Block"/>
<module id="playlist" title="Video-Riegel"/>
<module id="podcast" title="Podcast"/>
<module id="quiz" title="Quiz-Block"/>
<module id="jobbox_ticker" title="Jobbox Ticker"/>
<module id="teaser" title="Teaser"/>
Expand Down
20 changes: 0 additions & 20 deletions core/src/zeit/content/modules/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,23 +283,3 @@ class ITickarooLiveblog(zeit.edit.interfaces.IBlock):
default='chapter',
required=True,
)


class PodigeeProvidersSource(zeit.cms.content.sources.SearchableXMLSource):
"""A source for podigee providers config. API keys must be configured
in friedbert-deployment."""

attribute = 'id'
config_url = 'podigee-providers-source'
default_filename = 'podigee-providers.xml'
product_configuration = 'zeit.content.modules'


PODIGEE_PROVIDERS_SOURCE = PodigeeProvidersSource


class PodcastBase(zope.interface.Interface):
episode_id = zope.schema.TextLine(title=_('Podcast id'))
provider = zope.schema.Choice(
title=_('Provider'), source=PODIGEE_PROVIDERS_SOURCE('*//provider'), default='default'
)
1 change: 0 additions & 1 deletion core/src/zeit/content/modules/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
embed-provider-source file://{here}/tests/fixtures/embed-providers.xml
newsletter-source file://{here}/tests/fixtures/newsletter.xml
recipe-metadata-source file://{here}/tests/fixtures/recipe-metadata.xml
podigee-providers-source file://{here}/tests/fixtures/podigee-providers.xml
</product-config>
""".format(here=importlib.resources.files(__package__))

Expand Down

0 comments on commit 2645c89

Please sign in to comment.