private async Task GetWhatsOn(bool isRefresh)
        {
            if (_whatsOnLoaded && !isRefresh && !LiveTvHelper.HasExpired(_whatsOnLastRun))
            {
                return;
            }

            try
            {
                SetProgressBar(AppResources.SystemTrayGettingWhatsOn);

                var query = new RecommendedProgramQuery
                {
                    IsAiring = true,
                    Limit    = 7,
                    UserId   = AuthenticationService.Current.LoggedInUserId
                };

                var items = await ApiClient.GetRecommendedLiveTvProgramsAsync(query);

                if (items != null && !items.Items.IsNullOrEmpty())
                {
                    WhatsOn = items.Items.Take(6).ToList();

                    ShowMoreWhatsOn = items.Items.Count() > 6;

                    _whatsOnLoaded  = true;
                    _whatsOnLastRun = DateTime.Now;
                }
            }
            catch (HttpException ex)
            {
                Utils.HandleHttpException("GetUpcoming()", ex, NavigationService, Log);
            }

            SetProgressBar();
        }
        private async Task LoadProgrammes(bool isRefresh)
        {
            if (!NavigationService.IsNetworkAvailable || (_programmesLoaded && !isRefresh && !LiveTvHelper.HasExpired(_programmesLastRun)))
            {
                return;
            }

            try
            {
                SetProgressBar(AppResources.SysTrayGettingRecordedItems);

                var query = new RecordingQuery
                {
                    IsInProgress = false,
                    Status       = RecordingStatus.Completed,
                    UserId       = AuthenticationService.Current.LoggedInUserId
                };

                var items = await ApiClient.GetLiveTvRecordingsAsync(query);

                if (items != null && !items.Items.IsNullOrEmpty())
                {
                    RecordedProgrammes = items.Items.OrderBy(x => x.StartDate).ToList();
                    await GroupProgrammes();

                    _programmesLoaded  = true;
                    _programmesLastRun = DateTime.Now;
                }
            }
            catch (HttpException ex)
            {
                Utils.HandleHttpException(ex, "LoadProgrammes(" + isRefresh + ")", NavigationService, Log);
            }

            SetProgressBar();
        }
        private async Task LoadCurrentlyRecording(bool isRefresh)
        {
            if (!NavigationService.IsNetworkAvailable || (_currentlyRecordingLoaded && !isRefresh && !LiveTvHelper.HasExpired(_currentlyRecordingLastRun, 5)))
            {
                return;
            }

            try
            {
                SetProgressBar(AppResources.SysTrayGettingCurrentlyRecording);

                var query = new RecordingQuery
                {
                    IsInProgress = true,
                    Status       = RecordingStatus.InProgress,
                    UserId       = AuthenticationService.Current.LoggedInUserId
                };

                var items = await ApiClient.GetLiveTvRecordingsAsync(query);

                if (items != null && !items.Items.IsNullOrEmpty())
                {
                    CurrentlyRecording = items.Items.ToList();

                    _currentlyRecordingLoaded  = true;
                    _currentlyRecordingLastRun = DateTime.Now;
                }
            }
            catch (HttpException ex)
            {
                Utils.HandleHttpException(ex, "LoadCurrentlyRecording(" + isRefresh + ")", NavigationService, Log);
            }

            SetProgressBar();
        }