Пример #1
0
        static async void Search_Playlist()
        {
            // Disable logging
            Log.setMode(false);

            // Keyword
            string querystring = "Bushido";

            // Number of result pages
            int querypages = 1;

            ////////////////////////////////
            // Start searching
            ////////////////////////////////

            PlaylistSearch playlist = new PlaylistSearch();
            var            items    = await playlist.GetPlaylists(querystring, querypages);

            foreach (var item in items)
            {
                Console.WriteLine("Id: " + item.getId());
                Console.WriteLine("Title: " + item.getTitle());
                Console.WriteLine("Author: " + item.getAuthor());
                Console.WriteLine("VideoCount: " + item.getVideoCount());
                Console.WriteLine("Thumbnail: " + item.getThumbnail());
                Console.WriteLine("Url: " + item.getUrl());
                Console.WriteLine("");
            }
        }
        public MainPage()
        {
            InitializeComponent();
            _playlistSearchClient = new PlaylistSearch();
            _playlistitemsClient  = new PlaylistItemsSearch();

            try
            {
                FileManager.InitFolders();

                InitPlaylists();
            }
            catch (Exception ex)
            {
                FileManager.LogError("Error setting up home page", ex);
            }

            BindingContext = new PlaylistObject();
        }