diff --git a/pandora/archive/migrations/0003_file_time.py b/pandora/archive/migrations/0003_file_time.py index c5d28478b..9a446a705 100644 --- a/pandora/archive/migrations/0003_file_time.py +++ b/pandora/archive/migrations/0003_file_time.py @@ -9,13 +9,16 @@ class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'FileInstance.ctime' - db.alter_column('archive_fileinstance', 'ctime', self.gf('django.db.models.fields.IntegerField')()) + db.delete_column('archive_fileinstance', 'ctime') + db.add_column('archive_fileinstance', 'ctime', self.gf('django.db.models.fields.IntegerField')()) # Changing field 'FileInstance.mtime' - db.alter_column('archive_fileinstance', 'mtime', self.gf('django.db.models.fields.IntegerField')()) + db.delete_column('archive_fileinstance', 'mtime') + db.add_column('archive_fileinstance', 'mtime', self.gf('django.db.models.fields.IntegerField')()) # Changing field 'FileInstance.atime' - db.alter_column('archive_fileinstance', 'atime', self.gf('django.db.models.fields.IntegerField')()) + db.delete_column('archive_fileinstance', 'atime') + db.add_column('archive_fileinstance', 'atime', self.gf('django.db.models.fields.IntegerField')()) def backwards(self, orm): diff --git a/pandora/archive/migrations/0004_file_name.py b/pandora/archive/migrations/0004_file_name.py index ef783e4b9..9d78a334a 100644 --- a/pandora/archive/migrations/0004_file_name.py +++ b/pandora/archive/migrations/0004_file_name.py @@ -15,7 +15,7 @@ class Migration(SchemaMigration): db.add_column('archive_fileinstance', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=2048), keep_default=False) # Removing unique constraint on 'FileInstance', fields ['volume', 'path', 'folder'] - db.delete_unique('archive_fileinstance', ['volume_id', 'path', 'folder']) + #db.delete_unique('archive_fileinstance', ['volume_id', 'path', 'folder']) # Adding unique constraint on 'FileInstance', fields ['volume', 'folder', 'name'] db.create_unique('archive_fileinstance', ['volume_id', 'folder', 'name']) diff --git a/pandora/backend/migrations/0006_poster.py b/pandora/backend/migrations/0006_poster.py index d6beef85d..0fe7c48ea 100644 --- a/pandora/backend/migrations/0006_poster.py +++ b/pandora/backend/migrations/0006_poster.py @@ -9,7 +9,7 @@ class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field movies on 'list' - db.delete_table('backend_list_movies') + #db.delete_table('backend_list_movies') # Deleting field 'movie.stream_mid' db.delete_column('backend_movie', 'stream_mid') diff --git a/pandora/static/js/pandora.js b/pandora/static/js/pandora.js index f5c99c9dc..6158afc69 100755 --- a/pandora/static/js/pandora.js +++ b/pandora/static/js/pandora.js @@ -38,13 +38,17 @@ var app = new Ox.App({ app.$ui.app = app.constructApp(); + ///* app.$body.css({ opacity: 0 }); + //*/ app.$ui.app.appendTo(app.$body); + ///* app.$body.animate({ opacity: 1 }, 2000); + //*/ Ox.Request.requests() && app.$ui.loadingIcon.start(); Ox.Event.bind('', 'requestStart', function() { @@ -55,7 +59,7 @@ var app = new Ox.App({ Ox.print('requestStop') app.$ui.loadingIcon.stop(); }); - $.each(app.afterLaunch, function(i, fn){ fn() }); + }); @@ -485,7 +489,9 @@ app.constructInfo = function() { } app.constructList = function(view) { - var $list; + var $list, + info = $.inArray(app.user.ui.sort[0].key, ['title', 'director']) > -1 ? 'year' : app.user.ui.sort[0].key, + keys = Ox.unique(['director', 'id', 'poster', 'title', info]); Ox.print('constructList', view); if (view == 'list' || view == 'calendar') { $list = new Ox.TextList({ @@ -511,29 +517,24 @@ app.constructList = function(view) { id: 'list', item: function(data, sort, size) { return { - height: data.posterHeight, + height: data.poster.height || 128, // fixme: remove later id: data['id'], - info: data[$.inArray(sort[0].key, ['title', 'director']) > -1 ? 'year' : sort[0].key], + info: data[info], title: data.title + (data.director ? ' (' + data.director + ')' : ''), url: 'http://0xdb.org/' + data.id + '/poster.' + size + '.' + 'jpg', - width: data.posterWidth + width: data.poster.width || 80 // fixme: remove later }; }, - keys: ['director', 'id', 'posterHeight', 'posterWidth', 'posterURL', 'title'], + keys: keys, request: function(options) { app.request('find', $.extend(options, { query: app.Query.toObject() }), options.callback); }, size: 128, - sort: [ - { - key: 'director', - operator: '' - } - ], + sort: app.user.ui.sort, unique: 'id' - }).css('background', 'blue'); + }); } else { $list = new Ox.Element('