codeandcountry / podcaster

A simple podcast CMS using active admin.
4 stars 0 forks source link

Allow guid format to be set at feed level #15

Closed codeandcountry closed 9 years ago

codeandcountry commented 9 years ago

perhaps we provide tags that can use used for example: %slug%%eid% would output the feed slug and the episode id (tdrs123)

codeandcountry commented 9 years ago

this should be set at the feed level. if it's not set the user should be able to define a custom guid for an episode, if it is set it should not be overridable at the episode level.

breese524 commented 9 years ago

GUID has a specific meaning.

A Globally Unique Identifier (GUID, /ˈɡwɪd/or /ˈɡuːɪd/) is a unique reference number used as an identifier in computer software. The term GUID typically refers to various implementations of the universally unique identifier (UUID) standard.[1]

GUIDs are usually stored as 128-bit values, and are commonly displayed as 32 hexadecimal digits with groups separated by hyphens, such as {21EC2020-3AEA-4069-A2DD-08002B30309D}. They may or may not be generated from random (or pseudo-random) numbers.

http://en.wikipedia.org/wiki/Globally_unique_identifier

Interestingly, Apple implies that the guid element in an rss feed can be any string. However, when they describe the guid element in documentation they use GUID which would imply the wikipedia definition.

http://example.com/podcasts/archive/aae20140601.mp3 Every (episode) should have a permanent, case-sensitive GUID (Globally Unique Identifier). When you add episodes to your RSS podcast feed, GUIDs are compared in case-sensitive fashion to determine which episodes are new. If you don’t add the GUID for an episode, the episode URL will be used instead. The GUID should be assigned to an episode only once and should never change. Assigning new GUIDs to existing episodes may cause issues with your podcast’s listing and chart placement in the iTunes Store. https://www.apple.com/itunes/podcasts/specs.html
codeandcountry commented 9 years ago

@breese524 : I don't think that Apple's interpretation of GUID is truly 'global'. I think as long as the string is unique within the scope of the feed that is enough uniqueness. For our podcasts we have used a stream id concatenated with a numberic episode id and that seems to work fine. That said we probably should just generate a random guid and close this ticket as the format is probably irrelevant to most (maybe all) users.

codeandcountry commented 9 years ago

maybe use this? http://ruby-doc.org/stdlib-1.9.3/libdoc/securerandom/rdoc/SecureRandom.html#method-c-uuid

codeandcountry commented 9 years ago

instead of allowing this to be set I just had it generated at create time, it's more for machine use anyway so no need to add more work for the user.