Function stremio_core::models::meta_details::selected_guess_stream_update
source · fn selected_guess_stream_update(
selected: &mut Option<Selected>,
meta_items: &[ResourceLoadable<MetaItem>],
) -> EffectsExpand description
If Selected::guess_stream is true then we will override the selected stream
no matter if it’s set (Some) or not (None).
How we override the stream:
- We find the first
MetaItemthat’s successfully loaded from the addons. - Selecting the video id for the stream request:
2.1 If there’s a
MetaItem.preview.behavior_hints.default_video_idwe use it for the request 2.2 If there’s nodefault_video_idand noMetaItem.videosreturned by the addon, we use theMetaItem.preview.id
If we haven’t found a suitable video_id, then we do not override the Selected::stream_path.