diff --git a/dashboard-ui/boxset.html b/dashboard-ui/boxset.html index c550aa8741..b7f5de2d0e 100644 --- a/dashboard-ui/boxset.html +++ b/dashboard-ui/boxset.html @@ -21,16 +21,13 @@
--
+ --
- --
+ + + diff --git a/dashboard-ui/itembynamedetails.html b/dashboard-ui/itembynamedetails.html index e2a70f43c0..1e63164425 100644 --- a/dashboard-ui/itembynamedetails.html +++ b/dashboard-ui/itembynamedetails.html @@ -20,6 +20,7 @@ + diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 38aa894450..92d14d9643 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -26,16 +26,13 @@ --
+ --
- --
+ + + diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 18f5eb8eaf..fa595bcd0c 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -89,6 +89,7 @@ } ItemDetailPage.renderFav(item); + LibraryBrowser.renderLinks(item); Dashboard.hideLoadingMsg(); }, diff --git a/dashboard-ui/scripts/boxset.js b/dashboard-ui/scripts/boxset.js index dff4a1ff6a..f0fce068ed 100644 --- a/dashboard-ui/scripts/boxset.js +++ b/dashboard-ui/scripts/boxset.js @@ -48,6 +48,7 @@ } BoxsetPage.renderFav(item); + LibraryBrowser.renderLinks(item); Dashboard.hideLoadingMsg(); }, diff --git a/dashboard-ui/scripts/itembynamedetailpage.js b/dashboard-ui/scripts/itembynamedetailpage.js index ea424549a8..bc07715ac3 100644 --- a/dashboard-ui/scripts/itembynamedetailpage.js +++ b/dashboard-ui/scripts/itembynamedetailpage.js @@ -42,6 +42,7 @@ ItemByNameDetailPage.renderImage(item); ItemByNameDetailPage.renderOverviewBlock(item); ItemByNameDetailPage.renderFav(item); + LibraryBrowser.renderLinks(item); $('#itemName', page).html(name); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index eeb3c9192e..a0e807585a 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -269,5 +269,44 @@ return LibraryBrowser.getRandomMetroColor(); } - } + }, + + renderLinks: function (item) { + var page = $.mobile.activePage; +//console.log(item); + if (item.ProviderIds) { + var elem = $('#itemLink', page).show(); + + var html = 'Links: '; + var links = []; + + if (item.ProviderIds.Imdb) { + if (item.Type == "Movie" || item.Type == "Episode") + links.push('IMDB'); + else if (item.Type == "Person") + links.push('IMDB'); + } + if (item.ProviderIds.Tmdb) { + if (item.Type == "Movie") + links.push('TMDB'); + else if (item.Type == "Person") + links.push('TMDB'); + } + if (item.ProviderIds.Tvdb) + links.push('TVDB'); + if (item.ProviderIds.Tvcom) + links.push('TV.com'); + if (item.ProviderIds.Musicbrainz) + links.push('MusicBrainz'); + if (item.ProviderIds.Gamesdb) + links.push('GamesDB'); + + html += links.join(' / '); + + $('#itemLinks', page).html(html); + + } else { + $('#itemLinks', page).hide(); + } + } }; \ No newline at end of file