weebzone commited on
Commit
6ffe1a9
·
1 Parent(s): 4816ad3

`V-1.1.1 Patch`

Browse files

> Skip Multipart File
> Use Filename if Caption is not there
> Minor readme fix

Backend/__init__.py CHANGED
@@ -11,4 +11,4 @@ StartTime = time()
11
  USE_DEFAULT_ID: str = None
12
  db = Database()
13
 
14
- __version__ = "1.1.0"
 
11
  USE_DEFAULT_ID: str = None
12
  db = Database()
13
 
14
+ __version__ = "1.1.1"
Backend/helper/metadata.py CHANGED
@@ -1,6 +1,7 @@
1
  import asyncio
2
  import traceback
3
  import PTN
 
4
 
5
  from Backend.helper.imdb import get_detail, get_season, search_title
6
  from Backend.helper.pyro import extract_tmdb_id
@@ -60,6 +61,12 @@ async def metadata(filename: str, channel: int, msg_id) -> dict | None:
60
  if "excess" in parsed and any("combined" in item.lower() for item in parsed["excess"]):
61
  LOGGER.info(f"Skipping {filename}: contains 'combined'")
62
  return None
 
 
 
 
 
 
63
 
64
  title, season, episode, year, quality = (
65
  parsed.get("title"),
 
1
  import asyncio
2
  import traceback
3
  import PTN
4
+ from re import compile, IGNORECASE
5
 
6
  from Backend.helper.imdb import get_detail, get_season, search_title
7
  from Backend.helper.pyro import extract_tmdb_id
 
61
  if "excess" in parsed and any("combined" in item.lower() for item in parsed["excess"]):
62
  LOGGER.info(f"Skipping {filename}: contains 'combined'")
63
  return None
64
+
65
+ # Skip multipart or split files like part1, cd2, disk1, etc.
66
+ multipart_pattern = compile(r'(?:part|cd|disc|disk)[\s._-]*\d+', IGNORECASE)
67
+ if multipart_pattern.search(filename):
68
+ LOGGER.info(f"Skipping {filename}: seems to be a split/multipart file")
69
+ return None
70
 
71
  title, season, episode, year, quality = (
72
  parsed.get("title"),
Backend/pyrofork/plugins/reciever.py CHANGED
@@ -36,9 +36,7 @@ async def file_receive_handler(client: Client, message: Message):
36
  try:
37
  if message.video or (message.document and message.document.mime_type.startswith("video/")):
38
  file = message.video or message.document
39
-
40
- caption = message.caption
41
- title = caption or file.file_name
42
  msg_id = message.id
43
  size = get_readable_file_size(file.file_size)
44
  channel = str(message.chat.id).replace("-100", "")
 
36
  try:
37
  if message.video or (message.document and message.document.mime_type.startswith("video/")):
38
  file = message.video or message.document
39
+ title = message.caption or file.file_name
 
 
40
  msg_id = message.id
41
  size = get_readable_file_size(file.file_size)
42
  channel = str(message.chat.id).replace("-100", "")
README.md CHANGED
@@ -423,7 +423,7 @@ If you want to use **only** your **Telegram Stremio Media Server addon** for met
423
 
424
  ### 2️⃣ Step 2: Remove “Cinemeta” Protection
425
 
426
- 1. Log in to your **Stremio account** via your **web browser**:
427
  👉 [https://web.stremio.com/](https://web.stremio.com/)
428
  2. Once logged in, open your **browser console** (`Ctrl + Shift + J` on Windows/Linux or `Cmd + Option + J` on macOS).
429
  3. Copy and paste the code below into the console and press **Enter**:
 
423
 
424
  ### 2️⃣ Step 2: Remove “Cinemeta” Protection
425
 
426
+ 1. Log in to your **Stremio account** using **Chrome or Chromium-based browser** :
427
  👉 [https://web.stremio.com/](https://web.stremio.com/)
428
  2. Once logged in, open your **browser console** (`Ctrl + Shift + J` on Windows/Linux or `Cmd + Option + J` on macOS).
429
  3. Copy and paste the code below into the console and press **Enter**:
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
  [project]
2
  name = "Telegram-Stremio"
3
- version = "1.1.0"
4
  description = "A powerful, self-hosted Telegram Stremio Media Server built with FastAPI, MongoDB, and PyroFork seamlessly integrated with Stremio for automated media streaming and discovery."
5
  readme = "README.md"
6
  requires-python = ">=3.11"
 
1
  [project]
2
  name = "Telegram-Stremio"
3
+ version = "1.1.1"
4
  description = "A powerful, self-hosted Telegram Stremio Media Server built with FastAPI, MongoDB, and PyroFork seamlessly integrated with Stremio for automated media streaming and discovery."
5
  readme = "README.md"
6
  requires-python = ">=3.11"