Skip to content

Instantly share code, notes, and snippets.

@OmgImAlexis
Created March 1, 2016 09:15
Show Gist options
  • Save OmgImAlexis/69d3bb25318ee1cc6778 to your computer and use it in GitHub Desktop.
Save OmgImAlexis/69d3bb25318ee1cc6778 to your computer and use it in GitHub Desktop.
for(var season in data.season_exceptions){
if(data.season_exceptions.hasOwnProperty(season)) {
if(Object.keys(data.xem_numbering)) {
// Let's handle this as a xem season numbered exception
for(var indexerSeason in data.xem_numbering){
if(data.season_exceptions.hasOwnProperty(season)) {
if(data.xem_numbering[indexerSeason] == season) {
xemImg = $('<img>', {
'id': 'xem-exception-season-' + season,
'alt': '[xem]',
'height': '16',
'width': '16',
'src': srRoot + '/images/xem.png',
'title': data.season_exceptions[season],
}).appendTo('[data-season=' + indexerSeason + ']');
}
}
console.log("Exception: " + data.season_exceptions[season] + " for season: "+ season);
} else {
// This is not a xem season exception, let's set the exceptions as a medusa exception
xemImg = $('<img>', {
'id': 'xem-exception-season-' + season,
'alt': '[medusa]',
'height': '16',
'width': '16',
'src': srRoot + '/images/ico/favicon-16.png',
'title': data.season_exceptions[season],
}).appendTo('[data-season=' + season + ']');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment