Skip to content

Commit

Permalink
fix(stremio-core-protobuf): ActionLoad - remove CatalogsWithExtraAll …
Browse files Browse the repository at this point in the history
…and CatalogWithFiltersAll

Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Oct 21, 2024
1 parent e4ab8d5 commit e0c570b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
22 changes: 10 additions & 12 deletions stremio-core-protobuf/proto/stremio/core/runtime/action_load.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ message ActionLoad {
oneof args {
stremio.core.models.AddonDetails.Selected addon_details = 1;
stremio.core.models.CatalogsWithExtra.Selected catalogs_with_extra = 2;
google.protobuf.Empty catalogs_with_extra_all = 3;
stremio.core.models.CatalogWithFilters.Selected catalog_with_filters = 4;
google.protobuf.Empty catalog_with_filters_all = 5;
stremio.core.models.AddonsWithFilters.Selected addons_with_filters = 6;
stremio.core.models.LibraryByType.Selected library_by_type = 7;
stremio.core.models.LibraryWithFilters.Selected library_with_filters = 8;
stremio.core.models.MetaDetails.Selected meta_details = 9;
stremio.core.models.CatalogsWithExtra.Selected search = 10;
stremio.core.models.Player.Selected player = 11;
google.protobuf.Empty link = 12;
google.protobuf.Empty data_export = 13;
google.protobuf.Empty local_search = 14;
stremio.core.models.CatalogWithFilters.Selected catalog_with_filters = 3;
stremio.core.models.AddonsWithFilters.Selected addons_with_filters = 4;
stremio.core.models.LibraryByType.Selected library_by_type = 5;
stremio.core.models.LibraryWithFilters.Selected library_with_filters = 6;
stremio.core.models.MetaDetails.Selected meta_details = 7;
stremio.core.models.CatalogsWithExtra.Selected search = 8;
stremio.core.models.Player.Selected player = 9;
google.protobuf.Empty link = 10;
google.protobuf.Empty data_export = 11;
google.protobuf.Empty local_search = 12;
}
}
27 changes: 6 additions & 21 deletions stremio-core-protobuf/src/bridge/action.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
use std::ops::Range;

use stremio_core::{
models::catalogs_with_extra::Selected,
runtime::{
msg::{
Action, ActionCatalogWithFilters, ActionCatalogsWithExtra, ActionCtx,
ActionLibraryByType, ActionLibraryWithFilters, ActionLink, ActionLoad,
ActionMetaDetails, ActionPlayer, ActionStreamingServer, CreateTorrentArgs,
PlayOnDeviceArgs,
},
RuntimeAction,
use stremio_core::runtime::{
msg::{
Action, ActionCatalogWithFilters, ActionCatalogsWithExtra, ActionCtx, ActionLibraryByType,
ActionLibraryWithFilters, ActionLink, ActionLoad, ActionMetaDetails, ActionPlayer,
ActionStreamingServer, CreateTorrentArgs, PlayOnDeviceArgs,
},
RuntimeAction,
};

use crate::{
Expand Down Expand Up @@ -226,13 +222,6 @@ impl FromProtobuf<Action> for runtime::Action {
Some(action_load::Args::CatalogsWithExtra(selected)) => {
Action::Load(ActionLoad::CatalogsWithExtra(selected.from_protobuf()))
}
// Board
Some(action_load::Args::CatalogsWithExtraAll(_empty)) => {
Action::Load(ActionLoad::CatalogsWithExtra(Selected {
r#type: None,
extra: vec![],
}))
}
// Search
// Needs `LoadRange` to fetch next pages
Some(action_load::Args::Search(selected)) => {
Expand All @@ -243,10 +232,6 @@ impl FromProtobuf<Action> for runtime::Action {
Some(action_load::Args::CatalogWithFilters(selected)) => Action::Load(
ActionLoad::CatalogWithFilters(Some(selected.from_protobuf())),
),
// Discovery
Some(action_load::Args::CatalogWithFiltersAll(_empty)) => {
Action::Load(ActionLoad::CatalogWithFilters(None))
}
Some(action_load::Args::AddonsWithFilters(selected)) => {
Action::Load(match selected.request.base.is_empty() {
true => ActionLoad::InstalledAddonsWithFilters(selected.from_protobuf()),
Expand Down

0 comments on commit e0c570b

Please sign in to comment.