From 4a7821012c16bf33ebd915dd51812c9e075f6f4d Mon Sep 17 00:00:00 2001 From: Buckminsterfullerene02 Date: Mon, 14 Aug 2023 19:09:09 +0100 Subject: [PATCH] Fix #51 --- src/providers/modio.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/providers/modio.rs b/src/providers/modio.rs index 79075047..060c8307 100644 --- a/src/providers/modio.rs +++ b/src/providers/modio.rs @@ -211,6 +211,10 @@ impl ModProvider for ModioProvider { use modio::filter::{Eq, In}; use modio::mods::filters::{Id, NameId, Visible}; + if spec.url.contains("?preview=") { + return Err(anyhow!("Preview mod links cannot be added directly, please subscribe to the mod on mod.io and use the subscription link instead.")); + }; + let url = &spec.url; let captures = RE_MOD.captures(url).context("invalid modio URL {url}")?;