make external id's modular

This commit is contained in:
Luke Pulverenti 2014-02-21 13:48:15 -05:00
parent c38c8601c0
commit 9d932e463a
7 changed files with 39 additions and 111 deletions

View File

@ -14,6 +14,10 @@
display: none;
}
.libraryTree {
margin-left: .25em;
}
.offlineEditorNode {
color: #cc3333;
}
@ -94,23 +98,6 @@
height: 450px;
}
.editPageSidebar {
position: fixed;
top: 48px;
bottom: 0;
left: 0;
width: 27.5%;
overflow-y: scroll;
overflow-x: auto!important;
display: block;
border-right: 1px solid #555;
}
.editPageInnerContent {
float: right;
width: 70%;
}
.remoteBannerImage {
width: 450px;
height: 83px;
@ -159,6 +146,23 @@
.availableImagesList {
width: 700px;
}
.editPageSidebar {
position: fixed;
top: 48px;
bottom: 0;
left: 0;
width: 30%;
overflow-y: scroll;
overflow-x: auto!important;
display: block;
border-right: 1px solid #555;
}
.editPageInnerContent {
float: right;
width: 67.5%;
}
}
@media all and (min-width: 900px) {
@ -213,11 +217,11 @@
@media all and (min-width: 1800px) {
.editPageSidebar {
width: 22.5%;
width: 25%;
}
.editPageInnerContent {
width: 75%;
width: 72.5%;
}
}

View File

@ -1333,90 +1333,15 @@
links.push('<a class="textlink" href="' + item.HomePageUrl + '" target="_blank">Website</a>');
}
var providerIds = item.ProviderIds || {};
if (item.ExternalUrls) {
if (providerIds.Imdb) {
if (item.Type == "Person") {
links.push('<a class="textlink" href="http://www.imdb.com/name/' + providerIds.Imdb + '" target="_blank">IMDb</a>');
}
else {
links.push('<a class="textlink" href="http://www.imdb.com/title/' + providerIds.Imdb + '" target="_blank">IMDb</a>');
for (var i = 0, length = item.ExternalUrls.length; i < length; i++) {
var url = item.ExternalUrls[i];
links.push('<a class="textlink" href="' + url.Url + '" target="_blank">' + url.Name + '</a>');
}
}
if (providerIds.Tmdb) {
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "MusicVideo")
links.push('<a class="textlink" href="http://www.themoviedb.org/movie/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
else if (item.Type == "BoxSet")
links.push('<a class="textlink" href="http://www.themoviedb.org/collection/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
else if (item.Type == "Person")
links.push('<a class="textlink" href="http://www.themoviedb.org/person/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
else if (item.Type == "Series")
links.push('<a class="textlink" href="http://www.themoviedb.org/tv/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
}
if (providerIds.Tvdb) {
if (item.Type == "Series") {
links.push('<a class="textlink" href="http://thetvdb.com/index.php?tab=series&id=' + providerIds.Tvdb + '" target="_blank">TheTVDB</a>');
}
}
if (providerIds.Tvcom) {
if (item.Type == "Episode")
links.push('<a class="textlink" href="http://www.tv.com/shows/' + providerIds.Tvcom + '" target="_blank">TV.com</a>');
else if (item.Type == "Person")
links.push('<a class="textlink" href="http://www.tv.com/people/' + providerIds.Tvcom + '" target="_blank">TV.com</a>');
}
if (providerIds.MusicBrainzAlbum) {
links.push('<a class="textlink" href="http://musicbrainz.org/release/' + providerIds.MusicBrainzAlbum + '" target="_blank">MusicBrainz Album</a>');
}
if (providerIds.MusicBrainzAlbumArtist) {
links.push('<a class="textlink" href="http://musicbrainz.org/artist/' + providerIds.MusicBrainzAlbumArtist + '" target="_blank">MusicBrainz Album Artist</a>');
}
if (providerIds.MusicBrainzArtist) {
var text = item.Type == "MusicArtist" ? "MusicBrainz" : "MusicBrainz Artist";
links.push('<a class="textlink" href="http://musicbrainz.org/artist/' + providerIds.MusicBrainzArtist + '" target="_blank">' + text + '</a>');
}
if (providerIds.MusicBrainzReleaseGroup) {
links.push('<a class="textlink" href="http://musicbrainz.org/release-group/' + providerIds.MusicBrainzReleaseGroup + '" target="_blank">MusicBrainz Release Group</a>');
}
if (providerIds.AudioDbArtist) {
if (item.Type == "MusicArtist")
links.push('<a class="textlink" href="http://www.theaudiodb.com/artist/' + providerIds.AudioDbArtist + '" target="_blank">TheAudioDB</a>');
else
links.push('<a class="textlink" href="http://www.theaudiodb.com/artist/' + providerIds.AudioDbArtist + '" target="_blank">TheAudioDB Artist</a>');
}
if (providerIds.AudioDbAlbum) {
if (item.Type == "MusicAlbum")
links.push('<a class="textlink" href="http://www.theaudiodb.com/album/' + providerIds.AudioDbAlbum + '" target="_blank">TheAudioDB</a>');
else
links.push('<a class="textlink" href="http://www.theaudiodb.com/album/' + providerIds.AudioDbAlbum + '" target="_blank">TheAudioDB Album</a>');
}
if (providerIds.Gamesdb) {
links.push('<a class="textlink" href="http://thegamesdb.net/game/' + providerIds.Gamesdb + '" target="_blank">GamesDB</a>');
}
if (providerIds.NesBox) {
if (item.GameSystem == "Nintendo") {
links.push('<a class="textlink" href="http://nesbox.com/game/' + providerIds.NesBox + '" target="_blank">NESbox</a>');
}
else if (item.GameSystem == "Super Nintendo") {
links.push('<a class="textlink" href="http://snesbox.com/game/' + providerIds.NesBox + '" target="_blank">SNESbox</a>');
}
}
if (providerIds.Zap2It)
links.push('<a class="textlink" href="http://tvlistings.zap2it.com/tv/dexter/' + providerIds.Zap2It + '?aid=zap2it" target="_blank">Zap2It</a>');
if (links.length) {

View File

@ -11,7 +11,7 @@
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Movie",
Limit: screenWidth >= 1440 ? 16 : 12,
Limit: screenWidth >= 1440 ? 21 : 12,
Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed"
@ -33,7 +33,7 @@
SortOrder: "Descending",
IncludeItemTypes: "Movie",
Filters: "IsResumable",
Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1440 ? 4 : 3),
Limit: screenWidth >= 1920 ? 4 : (screenWidth >= 1440 ? 4 : 3),
Recursive: true,
Fields: "DateCreated,UserData"
};
@ -63,7 +63,7 @@
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Trailer",
Limit: screenWidth >= 1440 ? 8 : 6,
Limit: screenWidth >= 1440 ? 7 : 6,
Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed"

View File

@ -11,7 +11,7 @@
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "MusicAlbum",
Limit: screenWidth >= 1920 ? 7 : (screenWidth >= 1440 ? 6 : 5),
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1440 ? 6 : 5),
Recursive: true,
Fields: "PrimaryImageAspectRatio"
};
@ -34,7 +34,7 @@
SortBy: "DateCreated",
SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: screenWidth >= 1920 ? 7 : (screenWidth >= 1440 ? 6 : 5),
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1440 ? 6 : 5),
Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo"
};
@ -57,7 +57,7 @@
SortBy: "DatePlayed",
SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: screenWidth >= 1920 ? 7 : (screenWidth >= 1440 ? 6 : 5),
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1440 ? 6 : 5),
Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo",
Filters: "IsPlayed"
@ -87,7 +87,7 @@
SortBy: "PlayCount",
SortOrder: "Descending",
IncludeItemTypes: "Audio",
Limit: screenWidth >= 1920 ? 14 : (screenWidth >= 1440 ? 12 : 10),
Limit: screenWidth >= 1920 ? 12 : (screenWidth >= 1440 ? 12 : 10),
Recursive: true,
Fields: "PrimaryImageAspectRatio,AudioInfo",
Filters: "IsPlayed"

View File

@ -38,7 +38,7 @@
SortOrder: "Descending",
IncludeItemTypes: "Episode",
Filters: "IsResumable",
Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1440 ? 4 : 3),
Limit: screenWidth >= 1920 ? 4 : (screenWidth >= 1440 ? 4 : 3),
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
ExcludeLocationTypes: "Virtual"

View File

@ -72,9 +72,9 @@
{ name: 'Live TV Programs', value: 'LiveTvProgram' },
{ name: 'Movies', value: 'Movie' },
{ name: 'Music', value: 'Music' },
{ name: 'Others', value: 'Other' },
{ name: 'Trailers', value: 'Trailer' },
{ name: 'TV Shows', value: 'Series' }
{ name: 'TV Shows', value: 'Series' },
{ name: 'Others', value: 'Other' }
];
var html = '';

View File

@ -35,7 +35,6 @@
<div>
<div class="blockUnratedItems">
</div>
</div>
<br />
<br />