jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.86k stars 489 forks source link

Playlist limited to 150 items #470

Open bwachtendorf opened 4 years ago

bwachtendorf commented 4 years ago

Describe the bug I created a playlist for the shows Stargate SG-1 and Stargate Atlantis and respective movies. The playlist contains 254 items (according to android tv app) and has duration of 13959 minutes. It works without problems in the web client and in the app on my phone. But the app on my Fire TV Stick 4K stops showing items after 150. The items displayed are in the correct order.

To Reproduce

  1. Add more than 150 episodes to playlist
  2. Open playlist in android tv app and scroll to end
  3. See error

Expected behavior Complete playlist should be available, as it is in web and android app.

System (please complete the following information):

nielsvanvelzen commented 4 years ago

A quick code search shows that our code base loves limits of 150 items: https://github.com/jellyfin/jellyfin-androidtv/search?q=150&unscoped_q=150

I'm not sure what the performance impact is when we remove those limits without lazy loading functionality though. Needs some further investigation.

stale[bot] commented 4 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

clawrence22 commented 3 years ago

This is still an issue I just got a brand new google tv and downloaded the latest jellyfin. Was unable to shuffle/watch any episode above 150. I can see performance being a factor as it does slow down loading in android and the desktop version of the app.

RyanS027 commented 3 years ago

+1 for investigating this issue for Music. Shuffled playlists end at 150 songs without playing through the whole playlist.

VasDaq commented 3 years ago

Same problem still exists, 150 items per playlist, using FireTV latest JellyFin. (Awesome app BTW)

mscroggi commented 3 years ago

+1 to please look into this issue. One of the reasons I moved to Jellyfin is that Plex has many playlist bugs.. I ported my libraries and went through all the hassle of creating the playlists, finding missing graphics etc.. and just noticed that my playlist of 530 items seems to be limited to 150 on playback. I am loving Jellyfin, this is the only issue I have run across.

mscroggi commented 3 years ago

I have a large playlist and ran across this limitation.. I found a workaround, but its a bit clunky.. If you can split the large playlist into smaller ones (max 150 items).. you can load them to the playback queue individually, one after another (obviously appending to the existing queue and not replacing the queue). Once the queue is loaded up, you can shuffle the queue (if shuffle playback is what you are after) and it will shuffle the entire queue (I tested with 530 items)

As a test, I did create one master playlist containing the four sub playlists hoping it would trick the system into loading all of them.. but the 150 item limit still showed up.. :-(

jtrrns commented 3 years ago

This bug is still present more than a year after being reported, at least on my Nvidia Shield with the latest version of Jellyfin. The workaround kindly suggested by mscroggi is useful but definitely not a fix. :(

Any plan to further investigate the issue and fix the bug?

nielsvanvelzen commented 3 years ago

There is no investigation needed, we know the cause of this issue but no-one volunteered to fix it. The fix might not be easy either as the app doesn't really have proper pagination code right now.

mscroggi commented 3 years ago

@jtrrns Another partial workaround that might help a little. If you have a very large playlist and you are ok to play it in random order, you can still select the it and tell it to shuffle play. It will only pull 150 items into the queue from the big playlist, but they will at least be a random selection. It seems to be randomizing from the main list pretty well as it is always a different mix every time I play it this way. Its not perfect, but this has been working for me since 150 tracks is long enough to last at least 8 hours, and I play the playlists in shuffle mode anyway.

jtrrns commented 3 years ago

Hi @nielsvanvelzen and @mscroggi, thank you for your replies.

I wish I could help, but I'm not at all good with coding.

@mscroggi Does your 2nd suggestion actually work for you? For music that would be totally ok. 8 hrs randomly selected from the playlist are more than enough. Actually, at first, I thought that that was what was happening so I wasn't bothered with the limit of 150 items on the shuffled list.

However, after checking some 10 times, I noticed that it only shuffles the 1st 150 songs. Of the 10 times I tried, not a single time it selected a song beyond the first 150. Actually, if I try to explore the non-shuffled list on the Android TV (Nvidia Shield) I can only see the 1st 150 songs. On the web interface, where I created the playlist, it does show all the items.

mscroggi commented 3 years ago

@jtrrns I did some testing and here is what I found.

I took my big 'grande' playlist which contains 652 songs and pulled out the 'path' to the music files to a list (poolgrandelist.txt) I then loaded the playist in Jellyfin and selected 'shuffle'. It began playing. I then searched for the playing song in the playlist to see where it resided in the list of songs. Then I clicked 'next track' to move to the next etc..

Here is what it found -

monty@harpo:/tmp$ grep -n 'Holding Out For Love' poolgrandelist.txt 77: /work/media/AUDIO/Music/Blues/Mike Zito-Today/03.Holding Out For Love.mp3 monty@harpo:/tmp$ grep -n 'Rendezvous' poolgrandelist.txt 480: /work/media/AUDIO/Music/Blues/Tab Benoit-Night Train to Nashville/07 Rendezvous With the Blues.mp3 monty@harpo:/tmp$ grep -n 'Pour Me' poolgrandelist.txt 327: /work/media/AUDIO/Music/Blues/Damon Fowler - The Whiskey Bayou Session/Damon Fowler - Pour Me.mp3 monty@harpo:/tmp$ grep -n 'California' poolgrandelist.txt 136: /work/media/AUDIO/Music/Blues/John Mayall and Friends - Along for the Ride/12.California.mp3 monty@harpo:/tmp$ grep -n 'Peg' poolgrandelist.txt 570: /work/media/AUDIO/Music/Pop-Rock/Steely Dan - The Very Best of CD2/09.Peg.mp3 monty@harpo:/tmp$ grep -n 'Katmandu' poolgrandelist.txt 643: /work/media/AUDIO/Music/Pop-Rock/Bob Seger & The Silver Bullet Band - Ultimate Hits_ Rock And Roll Never Forgets CD2/09.Katmandu.mp3 monty@harpo:/tmp$ grep -n 'Boom Boom' poolgrandelist.txt 575: /work/media/AUDIO/Music/Blues/Billy Branch - Roots And Branches - The Songs Of Little Walter/10.Boom Boom Out Go The Lights.mp3 monty@harpo:/tmp$ grep -n 'Find Someone Who Will' poolgrandelist.txt 248: /work/media/AUDIO/Music/Blues/Coco Montoya - Hard Truth/05.I'll Find Someone Who Will.mp3 monty@harpo:/tmp$ grep -n 'Been So Blue' poolgrandelist.txt 117: /work/media/AUDIO/Music/Blues/Brandon Santini - This Time Another Year/08.Been So Blue.mp3 monty@harpo:/tmp$ grep -n 'Brown Eyed Girl' poolgrandelist.txt 500: /work/media/AUDIO/Music/Pop-Rock/Van Morrison-The Best of Van Morrison/01.Brown Eyed Girl.mp3

As you can see.. of the 10 searches, 4 of them are in the 0-150 range but the others are all over the above range.

I did this using the browser view. To compare, I fired up the app on a Chromecast TV and did the same thing. In that test, I saw the same thing you are reporting. Not a single track was extracted from the playlist outside of the first 150 items.

There is still another workaround until this can be resolved -

It seems the app has the problem but the web view does not. I WAS able to load a browser (open browser in this case. I tried puffin but it did not work) in my chromecast TV and it will play the playlists in the web view.
The web view is much easier to achieve on an Amazon FireTV . With the built in Silk browser, I installed 'Bookmarker 1' app and set the URL of Jellyfin for the app to deliver the web view of jellyfin. It takes me right in to the home view..

Its up to which workaround is easiest: Split out your playlists into individual ones of 150 items or less and play them individually. Load the different smaller playlists into the queue and shuffle the queue Access Jellyfin in a browser view and play the big playlist in shuffle mode.

Hope this helps!

Monty

jtrrns commented 3 years ago

Hey Monty ( @mscroggi )!

Thank you for all the detailed testing and workaround suggestions :)

I think I'll have to use the multiple smaler playlist trick since, other than Puffin, I don't know any browsers for the nVidia Shield. Also, I really like the backdrop slide show from the Android TV app, which I don't think is available with the web interface.

Hopefully someone will take the challenge to fix this for the next version. Even if it's only to make the shuffle option select 150 from the entire playlist.

Thanks again! Jerónimo

mscroggi commented 3 years ago

@jtrrns I too have taken the route of using the shorter playlists. For me, I just want to randomly play from the large list. I don't want whole albums on one of the smaller lists.

I decided to build smaller lists based on random selections. I took the XML from the large playlist, and pulled out 'Path' lines for each track (I actually already had this from before when testing - poolgrandelist.txt ). I randomized the list (sort -R) then split them out into smaller files of 150 tracks each. I wrapped each line with the '' and '' XML tags, restored an XML block that proceeded, and followed the 'PlaylistItems' items in the XML files. After pushing the XML files into Jellyfins' playlists folder, I scanned the libraries and it validated the playlists and they work fine.

Now I can load one of the smaller lists and it will be a random slice of the large playlist. It at least gets me a little closer to what I want.

Monty

mscroggi commented 3 years ago

If anyone is interested. I created a quick and dirty Perl script to pull in a large XML and generate randomly distributed sub playlists not to exceed 150 entries. When you get new music, simply add it to the big master xml, and run the script again.

gen_split_playlists.pl.zip

pcgamingisted commented 2 years ago

On 0.14.1 (with the playlist shuffle fix), the 150 limit is still present. Some of my playlists are 1000+ so would hate to see this issue be forgotten.

Apologies if reviving this thread isn't correct!

tomnehek commented 2 years ago

Issue still present on 0.14.2

pcgamingisted commented 2 years ago

I have absolutely no idea what I'm doing, but I forked the project and edited "playlistSongs.setLimit(150);" in "src/main/java/org/jellyfin/androidtv/ui/itemdetail/ItemListFragment.java" to a test number (5000 in this case) and my ATV emulator is showing a lot more than 150 in the playlist. Shuffling also works as before I only went up to B, but just went from F to I to A to I again.

jellyfin tv

tomnehek commented 2 years ago

That doesn't seem like an overly complex fix. Hopefully it's implemented soon.

steevithak commented 1 year ago

Just a MeToo++ comment. This bug affects both Play and Shuffle of music by playlist or Genre. We loaded up our Christmas music by genre on shuffle and it just keeps playing the same 150 tracks (out of about 1500). Tried making a playlist but it's broken too. Same thing as genre, just plays the first 150 items. Doesn't appear to be any easy way to get to the rest of our music except maybe create 10 or 15 distinct play lists. This is a major issue for us as we listen to lots of music and at this point JellyFin's 150 track limit makes it unuseable. I'm running v0.14.5

tomnehek commented 1 year ago

Seems like the most recent beta (v0.15.0-beta.2) has fixed this issue. Shuffling the playlist will play any item in the list past 150 - but the list itself, if you were to scroll through it, still only displays 150 items.

Personally this fix is what I was looking for because I only shuffle my playlists, but if you scroll through your playlists in the gui, you'll still see the 150 cap.

pcgamingisted commented 1 year ago

On the beta, it now shuffles my TV episodes, however letting the next episode autoplay just restarts the episode just finished. Manually skipping does continue to the next episode.

------- Original Message ------- On Friday, November 25th, 2022 at 14:07, tomnehek @.***> wrote:

Seems like the most recent beta (v0.15.0-beta.2) has fixed this issue. Shuffling the playlist will play any item in the list past 150 - but the list itself, if you were to scroll through it, still only displays 150 items.

Personally this fix is what I was looking for because I only shuffle my playlists, but if you scroll through your playlists in the gui, you'll still see the 150 cap.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

tomnehek commented 1 year ago

On the beta, it now shuffles my TV episodes, however letting the next episode autoplay just restarts the episode just finished. Manually skipping does continue to the next episode. ------- Original Message ------- On Friday, November 25th, 2022 at 14:07, tomnehek @.> wrote: Seems like the most recent beta (v0.15.0-beta.2) has fixed this issue. Shuffling the playlist will play any item in the list past 150 - but the list itself, if you were to scroll through it, still only displays 150 items. Personally this fix is what I was looking for because I only shuffle my playlists, but if you scroll through your playlists in the gui, you'll still see the 150 cap. — Reply to this email directly, [view it on GitHub](#470 (comment)), or unsubscribe. You are receiving this because you commented.Message ID: @.>

Weirdly, this didn't happen for me until about the third episode. Can confirm this is an issue.

DiegoBM commented 1 year ago

Am I the only one getting a limit of 300 items in the playlist for the web and android players in version 10.8.8?

Update: Nevermind, I saw that it was hardcoded into the code so I built a new personal version without limit

thornbill commented 1 year ago

The limit exists because you will start getting request errors beyond that point...

DiegoBM commented 1 year ago

The limit exists because you will start getting request errors beyond that point...

@thornbill, I've removed the limit in the web app and it seems to be working fine so far. I've created a playlist with 700+ items and it seems to work as expected. Under what circumstances will I start receiving these errors?

Mis1ify commented 2 months ago

Hi, Is there any reason why there is a limit? I changed the line 77 limit = 700 in ItemListFragmentHelper.kt and it works as expected, no errors. It's been 4 years this issue was created, and changing just the limit seems like a too easy solution, but it really works without any problems. Could the maintainer do something, please?

nielsvanvelzen commented 2 months ago

Repeating from what is already said above: just increasing (or removing) the limit is not a solution. It will increase load on both the server and client which will end up causing issues. The proper way to fix this is to add pagination.

Mis1ify commented 2 months ago

Okay now I understand, thanks. I would suggest adding an option to manually change playlist limit in dev options for example, until pagination or a proper fix will be added. That way, more experienced people with good hardware on both the client and server could experiment with this. Aside from that, thank you for your hard work you already pulled in!