the $subj podcast rss does not contain id and pubdate. because missing guid the gpodder reports always "no new episodes" for the podcast.
this hook fix this - the pubdate can be calculated from the autio file url and I used the same number as guid. this is my first code in python, probably not optimal :) -*- coding: utf-8 -*- # add missing attributes for # 'Zpravodajstvi (Cesky Rozhlas 1 - Radiozurnal)' podcast # Copy this script to ~/.config/gpodder/hooks/ to enable it. # Jan Lana <[email protected]>; 2011-03-28 import re import time class gPodderHooks(object): def on_episode_save(self, e): m = re.search('http://.*/media/zpravy/(\d+)-cro1_(\d\d)_(\d\d)_(\d\d)_(\d\d).mp3', e.url) if m: ts = time.mktime([int(m.group(1)),int(m.group(2)),int(m.group(3)),int(m.group(4)),int(m.group(5)),0,-1,-1,-1]) e.pubDate = ts e.guid = int(ts)
_______________________________________________ gpodder-devel mailing list [email protected] https://lists.berlios.de/mailman/listinfo/gpodder-devel
