Fix torrent name parsing to handle episode filenames correctly

This commit is contained in:
mhdzumair
2025-02-17 00:44:29 +05:30
parent 783ef37883
commit 7e4d0b91db
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ class MediafusionScraper(StremioScraper):
def parse_stream_title(self, stream: dict) -> dict:
description = stream["description"].splitlines()
torrent_name = description[0].removeprefix("📂 ")
torrent_name = description[0].removeprefix("📂 ").split(" ┈➤ ")[0]
metadata = PTT.parse_title(torrent_name, True)
source = stream["name"].split()[0].title()
+2 -2
View File
@@ -320,8 +320,8 @@ async def parse_stream_data(
if show_full_torrent_name:
torrent_name = (
f"{stream_data.torrent_name}/{episode_data.title or episode_data.filename or ''}"
if episode_data
f"{stream_data.torrent_name} ┈➤ {episode_data.filename}"
if episode_data and episode_data.filename
else stream_data.torrent_name
)
torrent_name = "📂 " + torrent_name.replace(".torrent", "").replace(