-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
To make it easier to add other features like downloading specific podcasts, it would be a good idea to add an ID attribute for podcast records. Using a straight numeric ID would not be ideal as there may be cases where the numbers to get out of sync.
To create a safe unique identifier, you can create a short hash of the podcast audio URL as follows:
import hashlib
feed_url="https://media.transistor.fm/9c4b292f/754f684f.mp3"
feed_id=hashlib.shake_256(feed_url.encode()).hexdigest(5)
This will create a short 10 character hash that would be unique for every feed regardless of the changes to the feeds. As long as the feed does not re-use podcast URLs, there should be no collisions.
This ID should be stored in the feed.json as id and it can be used to download specific podcasts.
Metadata
Metadata
Assignees
Labels
No labels