diff --git a/static/js/pandora/infoView.indiancinema.js b/static/js/pandora/infoView.indiancinema.js
index ab3f96d2a..3942685d2 100644
--- a/static/js/pandora/infoView.indiancinema.js
+++ b/static/js/pandora/infoView.indiancinema.js
@@ -131,6 +131,8 @@ pandora.ui.infoView = function(data) {
$minutes,
+ $imdb,
+
$descriptions,
$statistics = $('
')
@@ -235,6 +237,10 @@ pandora.ui.infoView = function(data) {
renderGroup(['imdbId']);
+ if (canEdit) {
+ updateIMDb();
+ }
+
if (data.summary || canEdit) {
Ox.EditableContent({
clickLink: pandora.clickLink,
@@ -454,6 +460,8 @@ pandora.ui.infoView = function(data) {
if (Ox.contains(nameKeys, key)) {
names = getNames();
renderDescriptions();
+ } else if (key == 'imdbId') {
+ updateIMDb();
}
});
}
@@ -737,6 +745,9 @@ pandora.ui.infoView = function(data) {
.html(' min')
[data.runtime ? 'show' : 'hide']()
.appendTo($element);
+ } else if (key == 'imdbId') {
+ $imdb = $('
')
+ .appendTo($element);
}
}
});
@@ -933,6 +944,27 @@ pandora.ui.infoView = function(data) {
pandora.UI.set({infoIconSize: iconSize});
}
+ function updateIMDb() {
+ if (data.imdbId) {
+ pandora.api.find({
+ query: {
+ conditions: [{key: 'imdbId', operator: '=', value: data.imdbId}]
+ }
+ }, function(result) {
+ if (result.data.items == 1) {
+ $imdb.empty();
+ } else {
+ $imdb.html(
+ ' ('
+ + result.data.items + ' duplicates)'
+ );
+ }
+ });
+ } else {
+ $imdb.empty();
+ }
+ }
+
that.reload = function() {
var src = src = '/' + data.id + '/' + (
ui.icons == 'posters'