Esempio n. 1
0
        private void FetchProgramInfo()
        {
            lock (_lockObj)
            {
                if (_abemaState.CurrentEpisode == null)
                {
                    Title = "";
                    return;
                }
                try
                {
                    _statusService.UpdateStatus(Resources.FetchingProgramInformation);
                    var slot    = _abemaState.CurrentSlot;
                    var episode = _abemaState.CurrentEpisode;

                    if (slot == null)
                    {
                        Title = "";
                        return;
                    }

                    Casts.Clear();
                    Crews.Clear();

                    Title       = slot.Episodes.Count == 1 ? slot.Title : $"{slot.Title} - #{episode.Sequence}";
                    Description = slot.Description;
                    episode.Casts.ForEach(w => Casts.Add(w.Name));
                    episode.Crews.ForEach(w => Crews.Add(w.Name));

                    ProvideThumbnails(episode);

                    _statusService.UpdateStatus(Resources.FetchedProgramInformation);
                }
                catch
                {
                    // ignored
                }
            }
        }