forked from 0x2620/pandora
actually set poster
This commit is contained in:
parent
9768eb4e78
commit
8639f6322e
3 changed files with 9 additions and 3 deletions
|
@ -811,6 +811,10 @@ class Item(models.Model):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def make_poster(self, force=False):
|
def make_poster(self, force=False):
|
||||||
|
posters = glob(os.path.abspath(os.path.join(settings.MEDIA_ROOT,
|
||||||
|
self.path('poster.*.jpg'))))
|
||||||
|
for f in filter(posters, lambda p: not p.endswith('poster.local.jpg')):
|
||||||
|
os.unlink(f)
|
||||||
if not self.poster or force:
|
if not self.poster or force:
|
||||||
url = self.prefered_poster_url()
|
url = self.prefered_poster_url()
|
||||||
if url:
|
if url:
|
||||||
|
|
|
@ -406,8 +406,7 @@ pandora.ui.mainMenu = function() {
|
||||||
pandora.$ui.accountDialog = (pandora.user.level == 'guest' ?
|
pandora.$ui.accountDialog = (pandora.user.level == 'guest' ?
|
||||||
pandora.ui.accountDialog('login') : pandora.ui.accountLogoutDialog()).open();
|
pandora.ui.accountDialog('login') : pandora.ui.accountLogoutDialog()).open();
|
||||||
} else if (data.id == 'posters') {
|
} else if (data.id == 'posters') {
|
||||||
var id = '0133093';
|
pandora.$ui.postersDialog = pandora.ui.postersDialog(pandora.user.ui.item).open();
|
||||||
pandora.$ui.postersDialog = pandora.ui.postersDialog(id).open();
|
|
||||||
} else if (data.id == 'places') {
|
} else if (data.id == 'places') {
|
||||||
pandora.$ui.placesDialog = pandora.ui.placesDialog().open();
|
pandora.$ui.placesDialog = pandora.ui.placesDialog().open();
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -94,11 +94,14 @@ pandora.ui.postersDialog = function(id) {
|
||||||
margin: 'auto'
|
margin: 'auto'
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
pandora.api.setPoster({
|
||||||
|
id: pandora.user.ui.item,
|
||||||
|
source: source
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$panel.replaceElement(0, $list);
|
$panel.replaceElement(0, $list);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
Loading…
Reference in a new issue