It is very simple idea but will be very useful. If a video is being watched 2nd or 3rd time, then save it offline so that next time when the same video is being watched it can be played from offline copy.
It does already cache streams (up to a certain amount). However the URL to the stream is different every time you'll try to load it, so that cache is not so useful after you restart NewPipe.
@Redirion: Do you happen to know if it's possible for ExoPlayer to use some custom ID (i.e. service name + stream ID + stream ID as introduced by TeamNewPipe/NewPipeExtractor#367) for the cache instead of simply the URL?
nice work at your extractor pr @wb9688
In think it could be very useful to work with other attributes than the short living URL. This might also help with some issues where the url became invalid.
However before exploring this option I would like to wait for the imminent release of ExoPlayer 2.12.
Meanwhile could you please re-review #3909?
@Redirion: Yeah, let's wait for ExoPlayer 2.12 before perhaps implementing this feature. We should make an accompanying NewPipe PR for that NewPipeExtractor PR soon though, as it will fix e.g. the long standing #2415, but I hope I'll have time for that this week. I'll review #3909 later today. I'll also make more stream related PRs soon-ish for e.g. not having a hardcoded itag list for YouTube, supporting HDR and 360掳 videos, etc.
Most helpful comment
@Redirion: Yeah, let's wait for ExoPlayer 2.12 before perhaps implementing this feature. We should make an accompanying NewPipe PR for that NewPipeExtractor PR soon though, as it will fix e.g. the long standing #2415, but I hope I'll have time for that this week. I'll review #3909 later today. I'll also make more stream related PRs soon-ish for e.g. not having a hardcoded itag list for YouTube, supporting HDR and 360掳 videos, etc.