Skip to content

Commit

Permalink
Merge pull request #59 from Stremio/update-core-crates
Browse files Browse the repository at this point in the history
chore: use new core crates setup
  • Loading branch information
elpiel committed Aug 10, 2023
2 parents 8ff25c1 + 4978429 commit e2a62af
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 58 deletions.
106 changes: 70 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ lto = true
opt-level = 's'

[dependencies]
stremio-core = { git = "https://github.com/Stremio/stremio-core", branch = "development" }
stremio-derive = { git = "https://github.com/Stremio/stremio-core", branch = "development" }
stremio-analytics = { git = "https://github.com/Stremio/stremio-core", branch = "development" }
stremio-core = { git = "https://github.com/Stremio/stremio-core", features = ["derive", "analytics"], branch = "development" }
serde = { version = "1.0.*", features = ["derive"] }
serde_json = "1.0.*"
futures = "0.3.*"
Expand Down Expand Up @@ -57,5 +55,3 @@ tracing-wasm = "0.2"
# [patch.'https://github.com/Stremio/stremio-core']

# stremio-core = { path = "../core" }
# stremio-derive = { path = "../core/stremio-derive" }
# stremio-analytics = { path = "../core/stremio-analytics" }
37 changes: 21 additions & 16 deletions src/env.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
use crate::event::{UIEvent, WebEvent};
use crate::model::WebModel;
use chrono::offset::TimeZone;
use chrono::{DateTime, Utc};
use futures::future::Either;
use futures::{future, Future, FutureExt, TryFutureExt};
use std::{collections::HashMap, sync::RwLock};

use chrono::{offset::TimeZone, DateTime, Utc};
use futures::{
future::{self, Either},
Future, FutureExt, TryFutureExt,
};
use http::{Method, Request};
use lazy_static::lazy_static;
use regex::Regex;
use serde::{Deserialize, Serialize};
use serde_json::json;

use std::collections::HashMap;
use std::sync::RwLock;

use stremio_analytics::Analytics;
use stremio_core::models::ctx::Ctx;
use stremio_core::models::streaming_server::StreamingServer;
use stremio_core::runtime::msg::{Action, ActionCtx, Event};
use stremio_core::runtime::{Env, EnvError, EnvFuture, EnvFutureExt, TryEnvFuture};
use stremio_core::types::api::AuthRequest;
use stremio_core::types::resource::StreamSource;
use stremio_core::{
analytics::Analytics,
models::{ctx::Ctx, streaming_server::StreamingServer},
runtime::{
msg::{Action, ActionCtx, Event},
Env, EnvError, EnvFuture, EnvFutureExt, TryEnvFuture,
},
types::{api::AuthRequest, resource::StreamSource},
};

use tracing::trace;
use url::Url;
Expand All @@ -30,6 +30,11 @@ use wasm_bindgen::{JsCast, JsValue};
use wasm_bindgen_futures::{spawn_local, JsFuture};
use web_sys::WorkerGlobalScope;

use crate::{
event::{UIEvent, WebEvent},
model::WebModel,
};

const UNKNOWN_ERROR: &str = "Unknown Error";
const INSTALLATION_ID_STORAGE_KEY: &str = "installation_id";

Expand Down
2 changes: 1 addition & 1 deletion src/model/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use stremio_core::{
notifications::NotificationsBucket, profile::Profile, resource::MetaItemPreview,
streams::StreamsBucket,
},
Model,
};
use stremio_derive::Model;

use crate::{
env::WebEnv,
Expand Down

0 comments on commit e2a62af

Please sign in to comment.