max_episodes_per_feed -> limit.episodes

This commit is contained in:
auouymous 2022-12-08 15:37:36 -07:00
parent dd269d7b88
commit b39edcfe83
5 changed files with 5 additions and 6 deletions

View File

@ -336,7 +336,7 @@ class gPodderCli(object):
return self._model.load_podcast(
url, create=True,
authentication_tokens=auth_tokens.get(url, None),
max_episodes=self._config.max_episodes_per_feed)
max_episodes=self._config.limit.episodes)
except feedcore.AuthenticationRequired as e:
if e.url in auth_tokens:
print(inred(_('Wrong username/password')))

View File

@ -228,7 +228,6 @@ defaults = {
# The sooner this goes away, the better
gPodderSettings_LegacySupport = {
'max_episodes_per_feed': 'limit.episodes',
'show_toolbar': 'ui.gtk.toolbar',
'episode_list_descriptions': 'ui.gtk.episode_list.descriptions',
'podcast_list_view_all': 'ui.gtk.podcast_list.all_episodes',

View File

@ -251,7 +251,7 @@ class gPodderPreferences(BuilderWidget):
index = self.update_interval_presets.index(self._config.auto_update_frequency)
self.hscale_update_interval.set_value(index)
self._config.connect_gtk_spinbutton('max_episodes_per_feed', self.spinbutton_episode_limit)
self._config.connect_gtk_spinbutton('limit.episodes', self.spinbutton_episode_limit)
self.auto_download_model = NewEpisodeActionList(self._config)
self.combo_auto_download.set_model(self.auto_download_model)

View File

@ -2668,7 +2668,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
# The URL is valid and does not exist already - subscribe!
channel = self.model.load_podcast(url=url, create=True,
authentication_tokens=auth_tokens.get(url, None),
max_episodes=self.config.max_episodes_per_feed)
max_episodes=self.config.limit.episodes)
try:
username, password = util.username_password_from_url(url)
@ -2815,7 +2815,7 @@ class gPodder(BuilderWidget, dbus.service.Object):
try:
channel._update_error = None
util.idle_add(indicate_updating_podcast, channel)
channel.update(max_episodes=self.config.max_episodes_per_feed)
channel.update(max_episodes=self.config.limit.episodes)
self._update_cover(channel)
except Exception as e:
message = str(e)

View File

@ -1258,7 +1258,7 @@ class PodcastChannel(PodcastModelObject):
self.children.remove(episode)
# This *might* cause episodes to be skipped if there were more than
# max_episodes_per_feed items added to the feed between updates.
# limit.episodes items added to the feed between updates.
# The benefit is that it prevents old episodes from apearing as new
# in certain situations (see bug #340).
self.db.purge(max_episodes, self.id) # TODO: Remove from self.children!