aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/sql/models.py
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2012-07-11 00:36:42 +0200
committerJoar Wandborg <git@wandborg.com>2012-07-11 00:36:42 +0200
commit6471291575c97f03d129051dc3d2bef28b4d89f2 (patch)
tree0c1252c0c23c2978736dd6eb819aefa89c1e355a /mediagoblin/db/sql/models.py
parent51eb0267d901bafcc90879dadbc2b8616ecdc4f5 (diff)
downloadmediagoblin-6471291575c97f03d129051dc3d2bef28b4d89f2.tar.lz
mediagoblin-6471291575c97f03d129051dc3d2bef28b4d89f2.tar.xz
mediagoblin-6471291575c97f03d129051dc3d2bef28b4d89f2.zip
Panel improvements
- Added progress meter for video and audio media types. - Changed the __repr__ method of a MediaEntry to display a bit more useful explanation. - Added a new MediaEntry.state, 'processing', which means that the task is running the processor on the item currently. - Fixed some PEP8 issues in user_pages/views.py - Fixed the ATOM TAG URI to show the correct year.
Diffstat (limited to 'mediagoblin/db/sql/models.py')
-rw-r--r--mediagoblin/db/sql/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mediagoblin/db/sql/models.py b/mediagoblin/db/sql/models.py
index 9815fcf9..6ce4e06f 100644
--- a/mediagoblin/db/sql/models.py
+++ b/mediagoblin/db/sql/models.py
@@ -107,6 +107,8 @@ class MediaEntry(Base, MediaEntryMixin):
fail_error = Column(Unicode)
fail_metadata = Column(JSONEncoded)
+ transcoding_progress = Column(SmallInteger)
+
queued_media_file = Column(PathTupleWithSlashes)
queued_task_id = Column(Unicode)
@@ -209,6 +211,12 @@ class MediaEntry(Base, MediaEntryMixin):
__import__(models_module)
return sys.modules[models_module].DATA_MODEL
+ def __repr__(self):
+ return '<{classname} {id}: {title}>'.format(
+ classname=self.__class__.__name__,
+ id=self.id,
+ title=self.title)
+
class FileKeynames(Base):
"""