First track not added to rolling cache

Issue description:

Option to move playback cache to rolling cache is enabled, however when playing an album all tracks except the first end up in rolling cache.

Logs:

Upload description: bencache

Additional information:

 

 

Reproduction steps:

 
Enabled copy to rolling cache, play an album, check and see that first track is not cached offline while every other track is. All tracks should be cached.
 

Media provider:

Jellyfin

Screenshots:

     

Well from the logs all the tracks are cached properly.

2024-11-18 02:28:30.153 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='b37dddab8f13e8da4b6d49210830fa90', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/02 - Show Me How To Live.flac', title='Show Me How To Live', resume=0}, url=http://XXXX/Audio/b37dddab8f13e8da4b6d49210830fa90/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=1, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=21252cc7-c269-4495-a56a-64da7dc8a649, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:28:36.638 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='e09dc2ef72b0589bd69ab15eac8edfed', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/03 - Gasoline.flac', title='Gasoline', resume=0}, url=http://XXXX/Audio/e09dc2ef72b0589bd69ab15eac8edfed/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=2, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=d97a33fc-6e16-4aa0-916a-5337232ef695, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:28:41.167 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='71e23606f35cc5bb6948e718380a2880', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/04 - What You Are.flac', title='What You Are', resume=0}, url=http://XXXX/Audio/71e23606f35cc5bb6948e718380a2880/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=3, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=ef20055c-4303-4fc8-8c1a-dba4ac81a581, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:28:47.230 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='50a37fe29abd4ca5e3d79d3092675d9c', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/05 - Like A Stone.flac', title='Like A Stone', resume=0}, url=http://XXXX/Audio/50a37fe29abd4ca5e3d79d3092675d9c/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=4, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=a1e44b9b-1cea-45b2-a59a-2630464a693d, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:28:51.778 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='4ef0c71dcbc5fd04f35b8ff5134389a0', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/06 - Set It Off.flac', title='Set It Off', resume=0}, url=http://XXXX/Audio/4ef0c71dcbc5fd04f35b8ff5134389a0/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=5, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=05817300-db9b-4e12-b611-fb0ad5470a40, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:28:57.463 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='481479eb6f634b0dd5e2e0957fa01575', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/07 - Shadow On The Sun.flac', title='Shadow On The Sun', resume=0}, url=http://XXXX/Audio/481479eb6f634b0dd5e2e0957fa01575/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=6, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=79608f88-93b0-4db7-b4d2-47585d495c86, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:29:02.416 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='5b78f4db577c31508320d9a5368883cb', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/08 - I Am The Highway.flac', title='I Am The Highway', resume=0}, url=http://XXXX/Audio/5b78f4db577c31508320d9a5368883cb/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=7, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=263b3f80-7db0-4df0-b003-0e4267740e47, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:29:06.900 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='939bee77ef84b1e8703f72f6d230474c', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/09 - Exploder.flac', title='Exploder', resume=0}, url=http://XXXX/Audio/939bee77ef84b1e8703f72f6d230474c/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=8, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=b506b804-bd40-4e52-92d6-1e5d4bbb44cd, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:29:11.426 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='ea78fee6509173c131c0044c77c4cbfc', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/10 - Hypnotize.flac', title='Hypnotize', resume=0}, url=http://XXXX/Audio/ea78fee6509173c131c0044c77c4cbfc/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=9, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=d92b4c70-496f-4cdd-9688-36f6ca457eec, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:32:14.892 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='d0ecef89b2c5ac131d31269ca23c26fa', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/01 - Cochise.flac', title='Cochise', resume=0}, url=http://XXXX/Audio/d0ecef89b2c5ac131d31269ca23c26fa/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=true, mimeTypeOverride=, payload={"LiveStreamId":"","PlaySessionId":"a5dde66147e3417c9c0cabd0389a96a5","ItemId":"d0ecef89b2c5ac131d31269ca23c26fa"}, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=0, repeatCount=0, headers=null, mediaFormat=MediaFormat(duration=222, bitRate=1005074, sampleRate=44100, mimeType=flac, bitPerSample=16, channelCount=2, format=flac, codec=flac, transcodeCodec=null, transcoding=false, haveImage=false, trackReplayGain=null, albumReplayGain=null, replayGainApplied=null, size=27932708), lyrics=[], chapters=null, uuid=e4613a0b-891c-42a0-9914-2dd6368c776d, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache
2024-11-18 02:32:20.942 Verbose DownloadManager  Moved PlayableMediaItem(source=MediaItem{externalId='7301e78e85934eca34a36771008916c3', mediaType=Song, file='/home/ben/Music/Audioslave/Audioslave (Disc 1)/11 - Bring Em Back Alive.flac', title='Bring Em Back Alive', resume=0}, url=http://XXXX/Audio/7301e78e85934eca34a36771008916c3/stream.flac?static=true&dlnaheaders=true&api_key=REDACTED, externalThumbnail=, originalUrl=, urlIncludeResumePoint=false, urlIncludeResumePointValue=null, alreadyResolved=false, mimeTypeOverride=, payload=, cacheKey=, preparationError=false, preparationErrorMessage=, playlistPosition=10, repeatCount=0, headers=null, mediaFormat=null, lyrics=[], chapters=null, uuid=07999c3d-6fff-4f4f-b5fe-7fd7b80da4e4, supportSeeking=true, playsAsAdvertisement=false, isPublicStreamable=false) from playback cache to rolling cache

That’s interesting… It definitely was missing the first track when I used the filter button to show only offline available media. I just removed it from the rolling cache and played the album again and it appears to have cached the first track properly this time. There were a few other partially cached albums in the library (pulled them up with a filter on the album view), but of course I manually added them to the rolling cache already so I don’t have any screen shots to show that.

I’ll switch debug mode on and try playing a few more albums this evening to see if it does it again.

I was able to get it to do it again. I’ve attached a screen shot where the first track is missing from “offline available” tracks on the album and ‘bencache2’ should be the uploaded log

I think I"m starting to notice how it’s working… when the album is played it will cache forward the amount of songs as configured, and then after the first track is finished playing it gets added to the offline cache. That does actually make sense, so there may not be anything wrong here. Perhaps those albums that were incomplete I started to play and then changed my mind before the first track finished playing? I honestly don’t remember.

Is there any way that, perhaps, if the first track is paused during playback or otherwise not allowed to play straight through, it wouldn’t be moved to the rolling cache?

I’m also experiencing the album “Low” by David Bowie (24/96), for whatever reason will not download / save the rolling cache. Could that happen if it was previously automatically cached, and I had removed it from the rolling cache? Would it then not automatically cache again? I would like it to do so (to cache again) if that is the case.

Yes if you do not finish a track it’s not added to the cache as the option says :wink:

When you pre cache to playback cache the files are fully pre cached at some point and so will be moved to rolling cache.

So all works as expected.

For the other issue well you know the drill open an issue with logs and details, but yes it should cache but hi res files takes a lot of place you maybe just don’t have a large enough cache.

1 Like