Curious George | Player | TG4 | Irish Television Channel, Súil Eile (2024)

Skip to main content

  • Watch Live
    • Cúla4 Live
  • Genre
    • Documentaries
    • Entertainment
    • Music
    • Sport
    • Drama
    • Lifestyle
    • Current Affairs
    • Cúla4
  • Boxsets

Curious George | Player | TG4 | Irish Television Channel, Súil Eile (2)

Curious George | Player | TG4 | Irish Television Channel, Súil Eile (3)

Curious George | Player | TG4 | Irish Television Channel, Súil Eile (4)

    S E |

      ';}])tg4App.filter('unique', function() { return function(collection, keyname) { var output = [], keys = []; angular.forEach(collection, function(item) { var key = item[keyname]; if(keys.indexOf(key) === -1) { keys.push(key); output.push(item); } }); return output; };});/* Check querystring parameters for Series */var params={};//decodeURIComponent(location.search).replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,k,v){ params[k]=v });location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(m,k,v){ params[k]=v });if (params.series) { var qrySeries = params.series;}if (params.genre) { var qryGenre = params.genre;}/* if (params.snum) { var qrySnum = '"+%2Bseries%3A"' + params.snum;} else { var qrySnum = ''; } */if (params.snum) { var qrySnum = '&seriesNumber=' + params.snum;} else { var qrySnum = ''; }if (params.plid) { var qryPlaylist = params.plid;}if (qrySeries) { /* Series Page *//* tg4App.controller('tg4Ctrl', function($scope, $http, $cookies) { $scope.current_Lang='en'; $scope.thisPage = 1; var headerParam = { headers: { "Accept": "application/json;odata=verbose;pk=BCpkADawqM06jqL45ctEd3WI7cu6cQehHpa8gagtPhVaf4NweEaPxeSs6chAgWRnOtW3cNpNldNJIepmdz4eEpf7aEU2HHC4O9_r_hUHaSgonX4eEQSeDYhLMImeC57QGNIeIEsNbs-uvvj8" } }; if (qrySeries == 'Ros%20na%20R%C3%BAn') { qrySnum = '"+%2Bseries%3A27"'; } var endPoint = '/videos?limit=100&offset=0&q=%2Bseriestitle%3A"' + qrySeries + '"+%2Bcategory_c%3A"' + qryGenre + qrySnum + '"+%2Bplayable%3Atrue&sort=-schedule_starts_at';$http.get('https://edge.api.brightcove.com/playback/v1/accounts/1555966122001' + endPoint, headerParam).then(function(d) { if ($cookies.get('GeoCountry') == 'IE') { $scope.pAll = d.data.videos; $scope.pSeries = $scope.pAll; $scope.pSeriesNumber = []; for(var z=0; z=0; i--) { if($scope.pAll[i].custom_fields.series == p) { $scope.pSeries.push(d.data.videos[i]); } } var result = $scope.pSeries.sort(function(a,b) {return a.custom_fields.episode - b.custom_fields.episode}); } // Paging within programme series $scope.pageChanged = function() { if ($scope.pSeries == '') { $scope.pSeries = $scope.pAll; } var startPos = ($scope.thisPage - 1) * 12; console.log("Page changed to: " + $scope.thisPage); };});}); */ tg4App.controller('tg4Ctrl', function($scope, $http, $cookies) { $scope.current_Lang='en'; $scope.pageLayout='Cula4'; $scope.thisPage = 1; $scope.firstSearch = function() { if ($cookies.get('thisSeries')) { return $cookies.get('thisSeries'); } else { return ''; } } $scope.setEpCntInfo = function(e) { if ($cookies.get('thisEpCnt')) { $cookies.remove('thisEpCnt'); } $cookies.put('thisEpCnt', $scope.pDistinctSeries[e]); } var headerParam = { headers: { "Content-Type": "application/json", "x-api-key": "NQWJD9AVi}zKRFmi7D@m" } }; $http.get('https://playerapi.tg4tech.com/series/videos?seriesTitle=' + qrySeries + qrySnum, headerParam).then(function(d) { if ($cookies.get('GeoCountry') == 'IE') { $scope.pAll = d.data; //console.log("Series", $scope.pAll, d.data.length); $scope.pSeries = $scope.pAll.reverse(); $scope.pSeriesEpisodes = $scope.pAll.length; $cookies.put('thisEpCnt', $scope.pSeriesEpisodes); $scope.pSeriesNumber = []; for(var z=0; z increment prev[item.series_number]++; } else { //category does not exist -> init prev[item.series_number] = 1; } return prev; }, {}); //console.log("Series Number", $scope.pDistinctSeries); } else { $scope.pAll = d.data; //$scope.pSeries = []; $scope.pSeries = $scope.pAll.reverse(); $scope.pSeriesEpisodes = $scope.pAll.length; $cookies.put('thisEpCnt', $scope.pSeriesEpisodes); $scope.pSeriesNumber = []; for(var z=0; z=0; i--) { if($scope.pAll[i].custom_fields.series == $scope.SeriesNumber) { //$scope.pSeries.push(d.data.videos[i]); $scope.pSeries.push(d.data[i]); } } var result = $scope.pSeries.sort(function(a,b) {return a.custom_fields.episode - b.custom_fields.episode}); } } $scope.showSeries = function(p) { /* Filter series from pAll based on Series chosen in dropdown */ $scope.pSeries = []; if ($cookies.get('thisEpCnt')) { $cookies.remove('thisEpCnt'); } if ($cookies.get('thisSeries')) { $cookies.remove('thisSeries'); } if(p=='') { $scope.pSeries = $scope.pAll; var result = $scope.pSeries; } else { for(var i=$scope.pAll.length-1; i>=0; i--) { if($scope.pAll[i].custom_fields.series == p) { //$scope.pSeries.push(d.data.videos[i]); $scope.pSeries.push(d.data[i]); var result = $scope.pSeries.sort(function(a,b) {return a.custom_fields.episode - b.custom_fields.episode}); } } } $scope.pSeriesEpisodes = $scope.pSeries.length; $cookies.put('thisEpCnt', $scope.pSeriesEpisodes); $cookies.put('thisSeries', p); /* console.log("SERIES: ", $scope.pSeries, $scope.pSeriesEpisodes, p); */ //console.log("RESULT: ", result); return result; } /* Paging within programme series */ $scope.pageChanged = function() { if ($scope.pSeries == '') { $scope.pSeries = $scope.pAll; } var startPos = ($scope.thisPage - 1) * 12; /* $scope.displayprogs = $scope.pSeries.slice(startPos, startPos + 12); console.log("Page changed to: " + $scope.thisPage); */ }; }); });} else if (qryPlaylist) { /* Playlist Page */ tg4App.controller('tg4Ctrl', ['$scope', '$http', '$cookies', function($scope, $http, $cookies) { $scope.current_Lang='en'; var headerParam = { headers: { "Accept": "application/json;odata=verbose;pk=BCpkADawqM06jqL45ctEd3WI7cu6cQehHpa8gagtPhVaf4NweEaPxeSs6chAgWRnOtW3cNpNldNJIepmdz4eEpf7aEU2HHC4O9_r_hUHaSgonX4eEQSeDYhLMImeC57QGNIeIEsNbs-uvvj8" } }; var endPointPlayList = '/playlists/' + qryPlaylist + '?limit=100'; $http.get('https://edge.api.brightcove.com/playback/v1/accounts/1555966122001' + endPointPlayList, headerParam).then(function(d){ $scope.pPlaylist = d.data; if (d.data.name.includes("$") != 0) { $scope.pPlaylistNameIE = $scope.pPlaylist.name.split("$")[0].trim(); $scope.pPlaylistNameEN = $scope.pPlaylist.name.split("$")[1].trim(); } if (d.data.description.includes("$") != 0) { $scope.pPlaylistDescIE = $scope.pPlaylist.description.split("$")[0].trim(); $scope.pPlaylistDescEN = $scope.pPlaylist.description.split("$")[1].trim(); } $scope.pAll = d.data.videos; $scope.total = d.data.videos.length; $scope.page = parseInt($scope.total/12); if (performance.navigation.type != 2) { $cookies.put('thisPage', 1); } if ($cookies.get('thisPage')=='') { $cookies.put('thisPage', 1); } else { /* Check if Back/Forward button clicked to get here */ if (performance.navigation.type == 2) { $scope.thisPage = $cookies.get('thisPage'); } else { $scope.thisPage = 1; } } if($scope.total%12>0) { $scope.pageMod = 1; } else { $scope.pageMod = 0; } $scope.totalPage = parseInt($scope.page + $scope.pageMod); console.log($scope.pPlaylistNameIE, $scope.pAll, "Total: ", $scope.total); /* */ }); $scope.pageChanged = function() { $cookies.put('thisPage', $scope.thisPage); var startPos = ($scope.thisPage - 1) * 12; $scope.displayprogs = $scope.pAll.slice(startPos, startPos + 12); }; } ]);} else { /* Genre Page */tg4App.controller('tg4Ctrl', ['$scope', '$http', '$cookies', '$filter', function($scope, $http, $cookies, $filter) { $scope.current_Lang='en'; $scope.pageLayout='Cula4'; $scope.pageHighlight=''; $scope.reverse = true; $scope.firstSort = function() { if ($cookies.get('thisSort')) { return $cookies.get('thisSort'); } else { return '-schedule_starts_at_sort_index'; } } $scope.getFilterInfo = function() { if ($cookies.get('thisFilter')) { return $cookies.get('thisFilter'); } else { return ''; } } $scope.clearFilterInfo = function() { if ($cookies.get('thisFilter')) { $cookies.remove('thisFilter'); } } /* Function to generate encoded URL */ $scope.generateEncodedURL = function(qryStr) { return encodeURIComponent(qryStr.trim()); }; if ($scope.pageHighlight != '') { var headerParamHighlight = { headers: { "Accept": "application/json;odata=verbose;pk=BCpkADawqM06jqL45ctEd3WI7cu6cQehHpa8gagtPhVaf4NweEaPxeSs6chAgWRnOtW3cNpNldNJIepmdz4eEpf7aEU2HHC4O9_r_hUHaSgonX4eEQSeDYhLMImeC57QGNIeIEsNbs-uvvj8" } }; var endPointHighlight = '/playlists/' + $scope.pageHighlight; $http.get('https://edge.api.brightcove.com/playback/v1/accounts/1555966122001' + endPointHighlight, headerParamHighlight).then(function(d) { $scope.pHighlights = d.data.videos; $scope.pHighlightsNum = d.data.videos.length; if (d.data.name.indexOf("$") != 0) { $scope.pHighlightTitleIe = d.data.name.split("$")[0].trim(); $scope.pHighlightTitleEn = d.data.name.split("$")[1].trim(); } else { $scope.pHighlightTitleIe = "Buaicphointí"; $scope.pHighlightTitleEn = "Highlights"; } }); } var headerParam = { headers: { "Content-Type": "application/json", "x-api-key": "NQWJD9AVi}zKRFmi7D@m" } }; $http.get('https://playerapi.tg4tech.com/genres?genre=' + $scope.pageLayout, headerParam) .then(function(response) { $scope.pAll = response.data; $scope.seriesprogs = response.data; $scope.status = response.status; $scope.pAll = $scope.seriesprogs.length; /* console.log("Final Array:", $scope.pAll, $scope.seriesprogs); */ if ($cookies.get('thisSort')) { $scope.pSort = $cookies.get('thisSort'); } else { $scope.pSort = '-schedule_starts_at_sort_index' } $scope.seriesprogs = $filter('orderBy')($scope.seriesprogs, $scope.pSort, $scope.reverse); if ($cookies.get('thisPage')) { $scope.thisPage = $cookies.get('thisPage'); } else { $scope.thisPage = 1; } //console.log("1st Draft: ", $scope.seriesprogs, $scope.pSort, $scope.pageLayout, $scope.status); }, function(error) { $scope.status = error.status; console.log('ERROR STATUS: ', $scope.status); }); $scope.srtBy = function(s) { $cookies.put('thisSort', s); $scope.seriesprogs = $filter('orderBy')($scope.seriesprogs, s, true); //console.log("Sort by: ", s, $scope.seriesprogs); }; $scope.setFilterInfo = function(f) { $cookies.put('thisFilter', f); } function removeAccents(value) { return value .replace(/á/g, 'a') .replace(/é/g, 'e') .replace(/í/g, 'i') .replace(/ó/g, 'o') .replace(/ú/g, 'u') .replace(/Á/g, 'A') .replace(/É/g, 'E') .replace(/Í/g, 'I') .replace(/Ó/g, 'O') .replace(/Ú/g, 'U'); } $scope.pageChanged = function() { $cookies.put('thisPage', $scope.thisPage); var startPos = ($scope.thisPage - 1) * 12; $scope.displayprogs = $scope.seriesprogs.slice(startPos, startPos + 12); }; $scope.replaceBulk = function(str, findArray, replaceArray) { if (str) { var i, regex = [], map = {}; for(i=0; i a').css('color', '#EB0071'); /* Have Féach highlighted when in different categories - IE */ if($('li.page-item-81398').hasClass('current_page_parent') == true) { $('#menu-item-80919').addClass('current-menu-ancestor'); } /* EN */ if($('li.page-item-81399').hasClass('current_page_parent') == true) { $('#menu-item-80918').addClass('current-menu-ancestor'); } /* Set search filters, paging sorting on choosing different language */ $('.lang-btn').bind('click', function() { $(this).data('clicked', true); //var thisPath = $(location).attr('href').replace(/\/$/,''); //var nextPath = $('.lang-btn').attr('href').replace(/\/$/,''); var thisPath = $(location).attr('href').substr(0, $(location).attr('href').lastIndexOf('/')); var nextPath = $('.lang-btn').attr('href').substr(0, $('.lang-btn').attr('href').lastIndexOf('/')); var thisurl = new URL(thisPath); var nexturl = new URL(nextPath); var thisFilter = $("#filterText"). val(); var thisPageCookie = $.cookie('thisPage'); var thisSortCookie = $.cookie('thisSort'); $.cookie('thisFilter', thisFilter, {path:thisurl.pathname}); $.cookie('thisFilter', thisFilter, {path:nexturl.pathname}); $.cookie('thisPage', thisPageCookie, {path:thisurl.pathname}); $.cookie('thisPage', thisPageCookie, {path:nexturl.pathname}); $.cookie('thisSort', thisSortCookie, {path:thisurl.pathname}); $.cookie('thisSort', thisSortCookie, {path:nexturl.pathname}); }); $('a').click(function(){ if (!($('.lang-btn').data('clicked'))) { $.removeCookie('thisFilter'); } });});
      Curious George | Player | TG4 | Irish Television Channel, Súil Eile (2024)
      Top Articles
      Latest Posts
      Article information

      Author: Lidia Grady

      Last Updated:

      Views: 6753

      Rating: 4.4 / 5 (65 voted)

      Reviews: 88% of readers found this page helpful

      Author information

      Name: Lidia Grady

      Birthday: 1992-01-22

      Address: Suite 493 356 Dale Fall, New Wanda, RI 52485

      Phone: +29914464387516

      Job: Customer Engineer

      Hobby: Cryptography, Writing, Dowsing, Stand-up comedy, Calligraphy, Web surfing, Ghost hunting

      Introduction: My name is Lidia Grady, I am a thankful, fine, glamorous, lucky, lively, pleasant, shiny person who loves writing and wants to share my knowledge and understanding with you.