It seems like the thread URL is just inserting the media_id into a
template? The image varies independently of the key, right?


On Sun, Sep 29, 2013 at 1:22 PM, Eugene Fang <notifications@github.com>wrote:

> In models/media.py:
>
> > +
> > +class Media(ndb.Model):
> > +    """
> > +    """
> > +
> > +    # Do not change! key_names are generated based on this
> > +    SLUG_NAMES = {
> > +        MediaType.YOUTUBE: 'youtube',
> > +        MediaType.CD_PHOTO_THREAD: 'cdphotothread',
> > +    }
> > +
> > +    # media_type and media_id make up the key_name
> > +    media_type_enum = ndb.IntegerProperty(required=True)
> > +    media_id = ndb.StringProperty(required=
> True)  # Unique id for the particular media type. Ex: the "random" string at the end of a YouTube url
> > +
> > +    details_json = ndb.StringProperty()  # Additional details required for rendering
>
> It varies per type. Currently, the only reason this is here is so that we
> can keep track of both the forum thread URL and image URL of a photo on CD.
> Do you think this is necessary? Or should we not worry about the thread URL?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gregmarra/the-blue-alliance/pull/762/files#r6648205>
> .
>