private async void UpdateMedia(int index)
        {
            CrunchyrollApi.ListMediaResponse res = await crunchyrollApi.GetMedias(collections[index].id);


            if (res.success)
            {
                medias = res.medias;
                //showMedias.Children.Clear();
                //int max = res.medias.Length > 30 ? 30 : res.medias.Length;
                //currentMaxMediaShow = max;
                //for(int i = 0; i < max; i++)
                //{
                //    showMedias.Children.Add( new MediaView(res.medias[i],false,res.medias,i));
                //}
                //if (max != res.medias.Length)
                //{

                //    Button button = new Button { Text = "Show more episodes" };
                //    button.Clicked += ExtendMedia;
                //    container.Children.Add(button);
                //}
                BindingContext = this;
            }
            else
            {
                // Error handeling//
            }
        }
Esempio n. 2
0
        private async void GetMedias(string collectionId)
        {
            CrunchyrollApi.ListMediaResponse res = await crunchyApi.GetMedias(collectionId);

            if (res.success)
            {
                medias = res.medias;
                FindIndex();

                InitSkip();
            }
            else
            {
            }
        }