Replace spaces in podcast episode id

main
Bob Mottram 2022-01-12 13:11:40 +00:00
parent c53189442b
commit 21811daf4d
2 changed files with 4 additions and 2 deletions

View File

@ -14069,7 +14069,8 @@ class PubServer(BaseHTTPRequestHandler):
nickname = self.path.split('/users/')[1] nickname = self.path.split('/users/')[1]
if '/' in nickname: if '/' in nickname:
nickname = nickname.split('/')[0] nickname = nickname.split('/')[0]
episode_timestamp = self.path.split('?podepisode=')[1] episode_timestamp = self.path.split('?podepisode=')[1].strip()
episode_timestamp = episode_timestamp.replace('__', ' ')
if self.server.newswire.get(episode_timestamp): if self.server.newswire.get(episode_timestamp):
pod_episode = self.server.newswire[episode_timestamp] pod_episode = self.server.newswire[episode_timestamp]
html_str = \ html_str = \

View File

@ -272,8 +272,9 @@ def _html_newswire(base_dir: str, newswire: {}, nickname: str, moderator: bool,
if podcast_properties: if podcast_properties:
if podcast_properties.get('persons') and \ if podcast_properties.get('persons') and \
podcast_properties.get('image'): podcast_properties.get('image'):
episode_id = date_str.replace(' ', '__')
link_url = \ link_url = \
'/users/' + nickname + '/?podepisode=' + date_str '/users/' + nickname + '/?podepisode=' + episode_id
html_str += separator_str html_str += separator_str
if moderated_item and 'vote:' + nickname in item[2]: if moderated_item and 'vote:' + nickname in item[2]: