locked
Can't change the number of displayed videos in listview anymore RRS feed

  • Question

  • Hello,

    since the new App Studio Beta Update I can't edit the number of video results that are shown in the listview section. Before it was possible to change the max. result number in the code like this:

    string.Format("{0}/channels?forUsername={1}&part=contentDetails&maxResults=20&key={2}", _baselUrl, _query, _apiKey)

    But now there is no such section anymore. How can I change the number of max. results now? Or rather is there a way that the listview page every time reloads the page if I scroll down and so increases the number of displayed results? So there wouldn't be any limit of displayed video results anymore.

    Please help me by showing how to edit the code in Visual studio for a higher result number.

    Besides it would be great if everybody could choose the number of displayed results by himself. The App Studio Beta is still a beta for a long time now. I think its time to include more features for more usage scenarios. (Push notification, number of results, change the place where the ad units are shown, notification by new rss feeds, private rss feeds with password and username..., and so on)

    I would be happy for your help. Thanks!


    • Edited by Skarûn Saturday, January 30, 2016 2:29 PM
    Saturday, January 30, 2016 2:28 PM

Answers

  • Hi,

    Here is the solution to increase the number of YT videos in App Studio.

    1. Now, navigate to the datasource section where you want to make changes

     Add the highlighted code (this will change the number of videos from 40 to 50).

    public class YouTubeConfig : SectionConfigBase<YouTubeSchema>

        {

               private readonly YouTubeDataProvider _dataProvider = new YouTubeDataProvider(new YouTubeOAuthTokens

            {

                         ApiKey = "key"

            });

     

            public override int MaxRecords

            {

                get

                {

                    return 50;

                }

            }

     

            public override Func<Task<IEnumerable<YouTubeSchema>>> LoadDataAsyncFunc

            {

                get

                {

                    var config = new YouTubeDataConfig

                    {

                        QueryType = YouTubeQueryType.Channels,

                        Query = @"windowsphone"

                    };

     

                    return () => _dataProvider.LoadDataAsync(config, MaxRecords);

                }

            }

     

    Thursday, February 18, 2016 8:12 PM
    Moderator

All replies

  • I have the same problem. I created an App with a YouTube data-source. But the app only shows 40 Videos as the limit. Anyone please help.
    Friday, February 5, 2016 4:06 PM
  • Hi,

    Here is the solution to increase the number of YT videos in App Studio.

    1. Now, navigate to the datasource section where you want to make changes

     Add the highlighted code (this will change the number of videos from 40 to 50).

    public class YouTubeConfig : SectionConfigBase<YouTubeSchema>

        {

               private readonly YouTubeDataProvider _dataProvider = new YouTubeDataProvider(new YouTubeOAuthTokens

            {

                         ApiKey = "key"

            });

     

            public override int MaxRecords

            {

                get

                {

                    return 50;

                }

            }

     

            public override Func<Task<IEnumerable<YouTubeSchema>>> LoadDataAsyncFunc

            {

                get

                {

                    var config = new YouTubeDataConfig

                    {

                        QueryType = YouTubeQueryType.Channels,

                        Query = @"windowsphone"

                    };

     

                    return () => _dataProvider.LoadDataAsync(config, MaxRecords);

                }

            }

     

    Thursday, February 18, 2016 8:12 PM
    Moderator
  • Thank you so much for help! :)

    Have a nice day!

    Friday, February 19, 2016 10:56 AM