[fixed] [MP2-786] Cannot play audio playlist with >=1000 entries (1 Viewer)

Nikki Locke

Portal Pro
February 2, 2019
468
62
72
Home Country
United Kingdom United Kingdom
Did you try with a small number, e.g. 20, 50, 100?
Yes, it works with a small number.

I have a playlist with just over 500 items, and it works with that.

I notice the program chunks requests into blocks of 1000, so I assume you would need somewhere near 1000 items to trigger the problem, but you probably know far better than I.

I have just built a playlist with 1666 items, and that also exhibits the problem.

I have also tried reducing the cluster size in ManagePlaylistModel.cs:329 to 100, but that doesn't help.

PlayItemsModel.CheckQueryPlayAction(() => CollectionUtils.Cluster(playlistData.MediaItemIds, 100).SelectMany(itemIds =>
cd.LoadCustomPlaylistAsync(itemIds, necessaryMIATypes, optionalMIATypes).Result), avType.Value);
 

HTPCSourcer

Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    but you probably know far better than I.
    No, I don't. I believe that the playlist logic dates back to the early times of the project and has probably not been touched in the last five years. Given that 1000+ playlists are not really common, it may well be that any issue has stayed undetected. I'll try to create a 999 and a 1001 list for testing.

    When you look at the Jira, there a some minor things related to playlists which are unresolved since ages. Would be great if you took a look at MP2-198, MP2-199 and MP2-200, which IMHO should not be too diffcult to fix. The fact that they are still unresolved indicates how (un)important this seems to be for the users :(.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    Personal question: why would one want to have a playlist with >1000 entries? If every track is 3 min long, we are looking at 50 hrs of uninterrupted playback. This appears as a very hypothetical scenario to me.
     

    Nikki Locke

    Portal Pro
    February 2, 2019
    468
    62
    72
    Home Country
    United Kingdom United Kingdom
    Normally, when we listen to music on Windows Media Centre, we go to music, click Play All, and make sure it is on shuffle.

    If I am being picky, I pick one of the playlists I have created (e.g. the one with all the World music in it, about 1600 entries), and shuffle that instead.

    I am trying to emulate that behaviour as closely as possible. It is definitely more difficult with MediaPortal2, but I guess we can put up with a little inconvenience in exchange for a media centre that isn't getting more and more flaky, like WMC is.

    I was hoping to persuade you (perhaps by providing a patch) to add a button for "Shuffle all", or maybe at least the ability to remember that I prefer to play my music on shuffle.

    I don't usually like the bother of deciding what to play. I prefer to be surprised. If I don't like an album or track, I don't have it on my media centre anyway.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    I was hoping to persuade you
    You are talking to the wrong person. I am not against a PlayAll/Shuffle button. Just be aware that this project lives of people who contribute. At this time there are far too many who take and way too little who feed. Among the latter a handful of developers who need to decide what they want to spend their coding time for. A user request has much more chances of being implemented if it matches a developer's personal interest.

    Now this thread started with a bug report, which yet awaits confirmation. As I explained it doesn't seem to be anything of broader interest. You are now turning it into a feature request, which should better go into the respective section from where it may or may not be picked up by a dev.

    I personally was hoping that you might join the side of project feeders by taking care of the small issues, which I mentioned above.
     

    Nikki Locke

    Portal Pro
    February 2, 2019
    468
    62
    72
    Home Country
    United Kingdom United Kingdom
    Sorry, I missed your message suggesting bugs I could have a look at.

    Happy to do so, but I don't know how to create a playlist to import, as I haven't found a playlist export facility anywhere yet.

    If someone could point me in the right direction, I would be happy to have a look.

    You are now turning it into a feature request

    No, I wasn't intending to turn it into a feature request - I was just trying to explain where I was coming from. If and when this bug is fixed (*), it might be time to create a feature request, and/or implement the feature myself.

    (*) Fixed by me or someone else - I would be looking at it now if I could persuade my debug server to import music - unfortunately it is not adding any records to the M_AUDIOITEM table, and I haven't found out why yet - the live server is doing it fine. It would help if I could find the code that does that, but searching for the string "M_AUDIOITEM" yields no results!

    It takes a long time to get familiar with such a complex set of code as MP2, and I will probably be asking stupid questions for ages till I get up to speed. That's why I asked about a developers conference, as I hoped to keep such irrelevant traffic away from the user forums, but I fully understand you don't want any old idiot in there! Particularly after the number of dumb things I have done already.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    @henso @Brownard @morpheus_xx @aspik are probably the Devs, that can answer and support with your questions.
    Contribution is very welcome, but just one hint :whistle: You created a lot of bug reports and asked a lot of questions, which is very appreciated.
    But everybody here has another life and is hardly able to even complete the started task packages. So my hint is to first close one topic and then jump to the next otherwise people get tired and will not reply ;) Please don't take me wrong.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    (*) Fixed by me or someone else - I would be looking at it now if I could persuade my debug server to import music - unfortunately it is not adding any records to the M_AUDIOITEM table, and I haven't found out why yet
    Have you checked the server logs? You can post them here if you want me to have a look.
     

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    It would help if I could find the code that does that, but searching for the string "M_AUDIOITEM" yields no results!
    In code almost all tables are represented by an aspect like AudioAspect or MovieAspect and so on. The AudioAspect is represented by the M_AUDIOITEM table while the MovieAspect is represented by the M_MOVIEITEM table. With that in mind I think you understand the connection.
    It takes a long time to get familiar with such a complex set of code as MP2
    We always need more devs, so maybe the best would be to start on small simple bugs or find some small ones yourself and then try to fix them. That way you will slowly start to understand how everything works.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    I did some testing:
    • Playlist with 998 items loads and plays correctly (y)
    • Playlist with 1000 items loads at first sight. The play icon appears in the top screen, yet nothing happens.(n)
    • Any playlist with more than 1000 entries is also not loading/playing.
    Logs with successful 998 playback and non-working 1000 attached. The client app needs to be killed after the 1000 playlist attempt.

    In summary I can confirm that the troubles start with any playlist that contains 1000 or more entries. Added to Jira as
    MP2-786 Cannot play playlist with >=1000 entries.
     

    Attachments

    • Client-MediaPortal2-Logs-2019-02-09-11.21.09.zip
      152.3 KB
    • Server-MediaPortal2-Logs-2019-02-09-11.21.23.zip
      1.3 MB
    Last edited:

    Users who are viewing this thread

    Top Bottom