from pytz import UTC
from werkzeug.utils import cached_property
-from mediagoblin import mg_globals
from mediagoblin.media_types import FileTypeNotSupported
from mediagoblin.tools import common, licenses
from mediagoblin.tools.pluginapi import hook_handle
# TODO: implement generic fallback in case MEDIA_MANAGER does
# not specify one?
if u'thumb' in self.media_files:
- thumb_url = mg_globals.app.public_store.file_url(
+ thumb_url = self._app.public_store.file_url(
self.media_files[u'thumb'])
else:
# No thumbnail in media available. Get the media's
# MEDIA_MANAGER for the fallback icon and return static URL
# Raises FileTypeNotSupported in case no such manager is enabled
manager = self.media_manager
- thumb_url = mg_globals.app.staticdirector(manager[u'default_thumb'])
+ thumb_url = self._app.staticdirector(manager[u'default_thumb'])
return thumb_url
@property
if u"original" not in self.media_files:
return self.thumb_url
- return mg_globals.app.public_store.file_url(
+ return self._app.public_store.file_url(
self.media_files[u"original"]
)