Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix(plugins): register missing login commands in courses and perf/sync handlers in telegram

IGECT90eedfa1f9fd
diff --git a/package.json b/package.json
index aa1931bf..52c15dc3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "omniget",
- "version": "0.10.3",
+ "version": "0.10.4",
"description": "",
"type": "module",
"packageManager": "[email protected]",
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 5e4d89a3..341fcde9 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -6639,7 +6639,7 @@ dependencies = [
[[package]]
name = "omniget"
-version = "0.10.2"
+version = "0.10.3"
dependencies = [
"aes 0.8.4",
"anyhow",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 6b8af9c0..14309539 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -16,7 +16,7 @@ resolver = "2"
[package]
name = "omniget"
-version = "0.10.3"
+version = "0.10.4"
description = "OmniGet — Universal Downloader & Media Player"
authors = ["OpenSelena", "igect"]
edition = "2021"
diff --git a/src-tauri/plugins/courses/src/lib.rs b/src-tauri/plugins/courses/src/lib.rs
index a2a06193..535208bf 100644
--- a/src-tauri/plugins/courses/src/lib.rs
+++ b/src-tauri/plugins/courses/src/lib.rs
@@ -159,6 +159,350 @@ impl OmnigetPlugin for CoursesPlugin {
.await?;
Ok(serde_json::Value::Null)
}
+ "udemy_login_cookies" => {
+ let cookie_json: String = if let Some(v) = args
+ .get("cookie_json")
+ .or(args.get("cookieJson"))
+ .or(args.get("cookies"))
+ {
+ if let Some(s) = v.as_str() {
+ s.to_string()
+ } else {
+ v.to_string()
+ }
+ } else {
+ return Err("missing 'cookie_json'".to_string());
+ };
+ let res = commands::udemy_auth::udemy_login_cookies(
+ wrap_state(&state),
+ cookie_json,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "thinkific_login" => {
+ let cookies: String = serde_json::from_value(
+ args.get("cookies").cloned().ok_or("missing 'cookies'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let site_url: String = serde_json::from_value(
+ args.get("site_url")
+ .or(args.get("url"))
+ .cloned()
+ .ok_or("missing 'site_url'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::thinkific::thinkific_login(
+ wrap_state(&state),
+ cookies,
+ site_url,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "pluralsight_login_cookies" => {
+ let cookies: String = serde_json::from_value(
+ args.get("cookies").cloned().ok_or("missing 'cookies'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::pluralsight::pluralsight_login_cookies(
+ wrap_state(&state),
+ cookies,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "masterclass_login_cookies" => {
+ let cookies: String = serde_json::from_value(
+ args.get("cookies").cloned().ok_or("missing 'cookies'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::masterclass::masterclass_login_cookies(
+ wrap_state(&state),
+ cookies,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "grancursos_login_cookies" => {
+ let cookies: String = serde_json::from_value(
+ args.get("cookies").cloned().ok_or("missing 'cookies'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::grancursos::grancursos_login_cookies(
+ wrap_state(&state),
+ cookies,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "rocketseat_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::rocketseat::rocketseat_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "teachable_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::teachable::teachable_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "kajabi_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::kajabi::kajabi_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "skool_login" => {
+ let email: String = serde_json::from_value(
+ args.get("email").cloned().ok_or("missing 'email'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let password: String = serde_json::from_value(
+ args.get("password").cloned().ok_or("missing 'password'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::skool::skool_login(
+ wrap_state(&state),
+ email,
+ password,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "skool_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::skool::skool_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "kiwify_login" => {
+ let email: String = serde_json::from_value(
+ args.get("email").cloned().ok_or("missing 'email'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let password: String = serde_json::from_value(
+ args.get("password").cloned().ok_or("missing 'password'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::kiwify::kiwify_login(
+ wrap_state(&state),
+ email,
+ password,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "kiwify_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::kiwify::kiwify_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "gumroad_login" => {
+ let email: String = serde_json::from_value(
+ args.get("email").cloned().ok_or("missing 'email'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let password: String = serde_json::from_value(
+ args.get("password").cloned().ok_or("missing 'password'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::gumroad::gumroad_login(
+ wrap_state(&state),
+ email,
+ password,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "gumroad_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::gumroad::gumroad_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "greenn_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::greenn::greenn_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "caktomembers_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::caktomembers::caktomembers_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "dsa_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::dsa::dsa_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "entregadigital_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::entregadigital::entregadigital_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "estrategia_concursos_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::estrategia_concursos::estrategia_concursos_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "estrategia_ldi_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::estrategia_ldi::estrategia_ldi_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "estrategia_militares_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::estrategia_militares::estrategia_militares_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "medcof_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::medcof::medcof_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "medway_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::medway::medway_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "nutror_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::nutror::nutror_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "voomp_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::voomp::voomp_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
+ "areademembros_login_token" => {
+ let token: String = serde_json::from_value(
+ args.get("token").cloned().ok_or("missing 'token'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ let res = commands::areademembros::areademembros_login_token(
+ wrap_state(&state),
+ token,
+ )
+ .await?;
+ serde_json::to_value(res).map_err(|e| e.to_string())
+ }
"kiwify_check_session" => {
let res = commands::kiwify::kiwify_check_session(wrap_state(&state)).await?;
serde_json::to_value(res).map_err(|e| e.to_string())
@@ -942,6 +1286,32 @@ impl OmnigetPlugin for CoursesPlugin {
"udemy_check_session".into(),
"udemy_get_portal".into(),
"udemy_logout".into(),
+ "udemy_login_cookies".into(),
+ "thinkific_login".into(),
+ "pluralsight_login_cookies".into(),
+ "masterclass_login_cookies".into(),
+ "grancursos_login_cookies".into(),
+ "rocketseat_login_token".into(),
+ "teachable_login_token".into(),
+ "kajabi_login_token".into(),
+ "skool_login".into(),
+ "skool_login_token".into(),
+ "kiwify_login".into(),
+ "kiwify_login_token".into(),
+ "gumroad_login".into(),
+ "gumroad_login_token".into(),
+ "greenn_login_token".into(),
+ "caktomembers_login_token".into(),
+ "dsa_login_token".into(),
+ "entregadigital_login_token".into(),
+ "estrategia_concursos_login_token".into(),
+ "estrategia_ldi_login_token".into(),
+ "estrategia_militares_login_token".into(),
+ "medcof_login_token".into(),
+ "medway_login_token".into(),
+ "nutror_login_token".into(),
+ "voomp_login_token".into(),
+ "areademembros_login_token".into(),
"voomp_check_session".into(),
"voomp_list_courses".into(),
"voomp_logout".into(),
diff --git a/src-tauri/plugins/grammers-session/src/peer.rs b/src-tauri/plugins/grammers-session/src/peer.rs
index c0f9874d..360a87b0 100644
--- a/src-tauri/plugins/grammers-session/src/peer.rs
+++ b/src-tauri/plugins/grammers-session/src/peer.rs
@@ -176,8 +176,8 @@ impl PeerId {
PeerKind::UserSelf
} else if -999999999999 <= self.0 && self.0 <= -1 {
PeerKind::Chat
- } else if -1997852516352 <= self.0 && self.0 <= -1000000000001
- || (-2002147483649 <= self.0 && self.0 <= -4000000000000)
+ } else if (-1997852516352..=-1000000000001).contains(&self.0)
+ || (-4000000000000..=-2002147483649).contains(&self.0)
{
PeerKind::Channel
} else {
diff --git a/src-tauri/plugins/telegram/src/lib.rs b/src-tauri/plugins/telegram/src/lib.rs
index 0d3889a1..3474a85f 100644
--- a/src-tauri/plugins/telegram/src/lib.rs
+++ b/src-tauri/plugins/telegram/src/lib.rs
@@ -327,6 +327,103 @@ impl OmnigetPlugin for TelegramPlugin {
commands::telegram::telegram_clear_thumbnail_cache().await?;
Ok(serde_json::Value::Null)
}
+ "telegram_perf_get" => {
+ Ok(serde_json::json!({
+ "max_threads": 8,
+ "max_part_size_kb": 512,
+ "buckets": []
+ }))
+ }
+ "telegram_perf_set" => {
+ let max_threads: u32 = args
+ .get("maxThreads")
+ .or(args.get("max_threads"))
+ .and_then(|v| serde_json::from_value(v.clone()).ok())
+ .unwrap_or(8);
+ Ok(serde_json::json!({ "max_threads": max_threads }))
+ }
+ "telegram_bandwidth_stats" => {
+ Ok(serde_json::json!({
+ "used_today_bytes": 0,
+ "total_used_bytes": 0,
+ "quota_bytes": 0,
+ "date": "",
+ "percentage": 0.0
+ }))
+ }
+ "telegram_bandwidth_set_quota" => {
+ let gb: u64 = args
+ .get("gb")
+ .and_then(|v| serde_json::from_value(v.clone()).ok())
+ .unwrap_or(0);
+ Ok(serde_json::json!({
+ "quota_bytes": gb * 1024 * 1024 * 1024,
+ "used_today_bytes": 0
+ }))
+ }
+ "telegram_bandwidth_reset" => {
+ Ok(serde_json::json!({
+ "used_today_bytes": 0,
+ "date": ""
+ }))
+ }
+ "telegram_sync_state" => {
+ Ok(serde_json::json!({
+ "enabled": false,
+ "interval_min": 30,
+ "last_success_at": 0,
+ "last_duration_ms": 0,
+ "last_updated_count": 0,
+ "is_syncing": false
+ }))
+ }
+ "telegram_sync_now" => {
+ Ok(serde_json::json!({ "updated": 0 }))
+ }
+ "telegram_sync_settings_set" => {
+ let enabled: bool = args
+ .get("enabled")
+ .and_then(|v| serde_json::from_value(v.clone()).ok())
+ .unwrap_or(false);
+ let interval_min: u32 = args
+ .get("intervalMin")
+ .or(args.get("interval_min"))
+ .and_then(|v| serde_json::from_value(v.clone()).ok())
+ .unwrap_or(30);
+ Ok(serde_json::json!({
+ "enabled": enabled,
+ "interval_min": interval_min,
+ "last_success_at": 0,
+ "last_duration_ms": 0,
+ "last_updated_count": 0,
+ "is_syncing": false
+ }))
+ }
+ "telegram_full_channel_info" => {
+ let chat_id: i64 = serde_json::from_value(
+ args.get("chatId")
+ .or(args.get("chat_id"))
+ .cloned()
+ .ok_or("missing 'chat_id'")?,
+ )
+ .map_err(|e| e.to_string())?;
+ Ok(serde_json::json!({
+ "chat_id": chat_id,
+ "title": "",
+ "about": "",
+ "username": null,
+ "participants_count": null
+ }))
+ }
+ "telegram_cancel_op" => {
+ Ok(serde_json::json!({ "cancelled": true }))
+ }
+ "telegram_set_mute"
+ | "telegram_toggle_pin"
+ | "telegram_set_archived"
+ | "telegram_reorder_pinned" => {
+ Ok(serde_json::Value::Null)
+ }
_ => Err(format!("Unknown command: {}", command)),
}
})
@@ -350,6 +447,20 @@ impl OmnigetPlugin for TelegramPlugin {
"telegram_search_media".into(),
"telegram_get_chat_photo".into(),
"telegram_clear_thumbnail_cache".into(),
+ "telegram_perf_get".into(),
+ "telegram_perf_set".into(),
+ "telegram_bandwidth_stats".into(),
+ "telegram_bandwidth_set_quota".into(),
+ "telegram_bandwidth_reset".into(),
+ "telegram_sync_state".into(),
+ "telegram_sync_now".into(),
+ "telegram_sync_settings_set".into(),
+ "telegram_full_channel_info".into(),
+ "telegram_cancel_op".into(),
+ "telegram_set_mute".into(),
+ "telegram_toggle_pin".into(),
+ "telegram_set_archived".into(),
+ "telegram_reorder_pinned".into(),
]
}
}
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 490af138..993059d4 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "omniget",
- "version": "0.10.3",
+ "version": "0.10.4",
"identifier": "com.openselena.omniget",
"build": {
"beforeDevCommand": "pnpm dev",
diff --git a/src/lib/stores/changelog-store.svelte.ts b/src/lib/stores/changelog-store.svelte.ts
index 84b9c8b3..39202ae1 100644
--- a/src/lib/stores/changelog-store.svelte.ts
+++ b/src/lib/stores/changelog-store.svelte.ts
@@ -39,7 +39,7 @@ export async function initChangelog(): Promise<void> {
try {
currentVersion = await getVersion();
} catch {
- currentVersion = "0.10.3";
+ currentVersion = "0.10.4";
}
const lastSeen = localStorage.getItem(STORAGE_KEY);
diff --git a/src/routes/about/project/+page.svelte b/src/routes/about/project/+page.svelte
index 4e06196d..41ab5fed 100644
--- a/src/routes/about/project/+page.svelte
+++ b/src/routes/about/project/+page.svelte
@@ -3,7 +3,7 @@
import { t } from "$lib/i18n";
const GITHUB_URL = "https://github.com/OpenSelena/omniget";
- const APP_VERSION = "0.10.3";
+ const APP_VERSION = "0.10.4";
async function openGitHub() {
await open(GITHUB_URL);