[Feature]: Introduce an optional Smart Offline system for MeeTube and eventually MeeTune.
Which app?
MeeTube (phone or tablet). MeeTune integration can follow as a separate phase.
What would you like MeeTube to do?
Add an optional Smart Offline feature that saves a stable snapshot of selected personalized feeds so they can be watched without an internet connection.
The first phase should focus on Shorts and regular Home recommendations.
- Feed selection and batch size
Allow the user to prepare offline batches from:
- Shorts feed.
- Home recommendations.
- Optionally, subscriptions or selected playlists.
Let the user choose the batch size: 50, 100, 200, 500 or a custom amount.
Preserve the order of items in the fetched batch. Reuse MeeTube's existing feed data sources where possible; do not introduce a separate feed-polling service.
- No daily or periodic refresh
This is a key requirement:
- No hourly, daily or other periodic polling for Smart Offline feeds.
- Prepare the first batch only when the user enables/prepares it or presses a manual refresh action.
- Keep the current batch unchanged while it still contains pending items.
- Fetch the next batch only after every item in the current batch has met MeeTube's normal watched/progress rule through actual playback, or has been explicitly dismissed/removed by the user.
- A dismissed item must remain a separate state; dismissing it must not mark it as watched or add it to watch history.
- Reopening MeeTube, changing tabs or reconnecting to Wi-Fi must not automatically refresh or replace the batch.
- If the batch is exhausted while offline, wait until a connection is available before fetching another one.
- A manual refresh may replace the current batch only after a clear user confirmation; it must not silently discard pending items.
- Downloads must never count as views
Keep download state separate from playback and watch state.
- Downloading, queueing, fetching metadata or saving a thumbnail must not mark a video as watched.
- Merely opening a feed card or preloading a video must not mark it as watched.
- Do not start the player or generate playback/watch-history events during download or prefetch.
- Only actual user playback should update the local watched/progress state, using MeeTube's normal playback-progress rules.
- Preserve watched, unwatched, dismissed and partially watched states across restarts and offline sessions.
- Quality and storage
Provide separate quality settings for Shorts and regular videos.
For explicit resolutions (360p, 480p, 720p, 1080p, 1440p and 2160p), treat the chosen value as a hard maximum: select the highest available quality at or below it, never a higher one. If no rendition is available at or below the selected maximum, do not silently choose a higher resolution; skip that item or ask the user whether to change the limit.
Auto and Best available can remain separate choices with clearly explained behavior.
Also provide:
- A configurable Smart Offline storage limit and a visible size estimate before a large batch is queued.
- Wi-Fi-only enabled by default, with a separate mobile-data option.
- Sequential downloads using the existing queue, with pause/resume.
- Deduplication across feeds.
- No silent deletion of unwatched items. If the storage limit is reached, pause further downloads and explain that space is needed instead of deleting pending items.
- Minimize requests and bandwidth
- Fetch feed items only on initial preparation, batch exhaustion or an explicit manual refresh.
- Do not run Smart Offline polling in the background.
- Reuse known video IDs, metadata and completed downloads.
- Do not request format information again for items already downloaded or queued.
- Download one item at a time and back off after network errors.
- Respect Android network, battery and storage constraints.
- Offline Mode
When the device has no usable internet connection and a saved batch exists:
- Show the local Shorts/recommendation feed instead of an empty online feed.
- Display a clear OFFLINE indicator.
- Play saved files locally, preserving batch order and each item's state.
- Do not make network requests just to render or play the saved feed.
- When the connection returns, keep the current batch; do not silently refresh it.
- MeeTune (later phase)
After the video-feed flow is stable, the same storage/queue principles could support liked songs and selected music playlists/albums in MeeTune. Keep music quality and storage limits separate, and respect each provider's terms and download permissions. See #302 for the SoundCloud feasibility investigation; SoundCloud content must not be cached or made available offline unless SoundCloud explicitly authorizes that use in writing.
Existing implementation
MeeTube already has channel/playlist Auto download, quality selection, a sequential download queue and local MeeTune song playback.
Smart Offline should reuse that infrastructure where practical, but its feed-refresh policy must remain separate from the existing channel/playlist Auto download scheduler. Existing Auto download can keep its own behavior; Smart Offline itself must be demand-driven.
How would you use it?
I would prepare 100 or 200 Shorts while on Wi-Fi, close MeeTube and later watch them offline. Downloading them must not count as watching them, and the next batch should not be fetched just because a day has passed.