[Request] Internet stream media information extraction error
Describe the bug Internet stream media information extraction error https://*****:9443/vip/p4/2025/3/3/16/67c5ddc76bde00.02647420.mkv?KEY1=w_ovCX0sVYLhBigVCDOKTg&KEY2=1742981269&KEY3=488941&KEY4=world&KEY5=the.white.lotus.s03e03.1080p.web.h264-successfulcrab%5BEZTVx.to%5D.mkv&KEY7=febbox_file_download_v2&KEY8=488941
https://*****:9443/vip/p4/2025/3/24/10/67e138dcd038a1.50927552.mkv?KEY1=N9ARnzPtMFctM-bTL9LSCg&KEY2=1742979596&KEY3=488941&KEY4=world&KEY5=The+Hot+Spot+S01E02+Episode.2.1080p.NF.WEB-DL.JPN.AAC2.0.H.264-ToonsHub.mkv&KEY7=febbox_file_download_v2&KEY8=488941
I already added include_regexes include_regexes: episode: ['.*KEY5=(?P
However, the extraction still results in "the.white.lotus" or "The+Hot+Spot". The season and episode are correct, but the title includes the dot or plus sign, which causes Trakt to fail the search.
Is there any better way to do this? thanks in advance
Desktop (please complete the following information):
- OS and Version: Windows 11 24h2
- Python Version: Python 3.10.11
- Player and Version: mpv.net v7.1.1.0
- Trakt Scrobbler Version: Trakts version 1.7.0
To Reproduce
Log file
Click to see log contents
2025-03-26 13:28:00,863 - DEBUG - mpv - file_info - Guessit url '/vip/p4/2025/3/3/16/67c5ddc76bde00.02647420.mkv'
2025-03-26 13:28:00,863 - DEBUG - mpv - file_info - Matched regex pattern re.compile('.*KEY5=(?P<title>.+?)[\\+\\.]+[sS](?P<season>\\d+)[eE](?P<episode>\\d+)')
2025-03-26 13:28:00,863 - DEBUG - mpv - file_info - Guess: {'title': 'the.white.lotus', 'season': '03', 'episode': '03', 'type': 'episode'}
2025-03-26 13:28:00,863 - DEBUG - mpv - monitor - action=stop_previous
2025-03-26 13:28:00,864 - DEBUG - mpv - monitor - action=scrobble
2025-03-26 13:28:00,864 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 0.47% for The+Hot+Spot
2025-03-26 13:28:00,864 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.0, 'media_info': {'type': 'episode', 'title': 'the.white.lotus', 'season': 3, 'episode': 3}, 'updated_at': 1742966880.8630922}
2025-03-26 13:28:00,864 - WARNING - scrobbler - trakt_interface - Invalid trakt id for The+Hot+Spot
2025-03-26 13:28:00,865 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful. Discarding it.
2025-03-26 13:28:00,865 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.00% for the.white.lotus
2025-03-26 13:28:00,865 - DEBUG - scrobbler - trakt_interface - Searching trakt: Title: "the.white.lotus"
2025-03-26 13:28:01,817 - WARNING - scrobbler - trakt_interface - Trakt search yielded no results for the show, the.white.lotus
2025-03-26 13:28:01,823 - DEBUG - scrobbler - trakt_interface - Trakt ID: -1
2025-03-26 13:28:01,825 - WARNING - scrobbler - trakt_interface - Invalid trakt id for the.white.lotus
2025-03-26 13:28:01,825 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful. Discarding it.
2025-03-26 13:29:16,782 - DEBUG - mpv - monitor - action=scrobble
2025-03-26 13:29:16,783 - DEBUG - mpv - monitor - {'state': 0, 'progress': 0.0, 'media_info': {'type': 'episode', 'title': 'the.white.lotus', 'season': 3, 'episode': 3}, 'updated_at': 1742966956.782815}
2025-03-26 13:29:16,783 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 0.00% for the.white.lotus
2025-03-26 13:29:16,784 - WARNING - scrobbler - trakt_interface - Invalid trakt id for the.white.lotus
2025-03-26 13:29:16,784 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful. Discarding it.
This is the perfect usecase for remap rules. See the second example usecase in the wiki docs: https://github.com/iamkroot/trakt-scrobbler/wiki/Metadata-Remap#sample-usecases Note that you'll need a separate rule for each individual show/movie.
Here is the thing though, I know about remap, but do I really need to specify every single one of movie/tv I watched? I watch a lot from this kind of internet stream, I mean a lot a lot. Is there any easy way to just replace . or + to just space?
Ok, I have pushed a feature that should be able to handle this case.
Install from branch:
- Stop the scrobbler with
trakts stop - Run
pipx install --force --pip-args='--force-reinstall' git+https://github.com/iamkroot/trakt-scrobbler.git@regex-raw-path - Start scrobbler with
trakts start
To use it, remove the regexes from episode and movie categories, and create a new one raw_path (also a list of regexes). Create a new regex that captures the entirety of KEY5 value into a path named regex group. This value will be parsed like normal file paths, and info will automatically extracted.
This approach should be more robust than trying to detect . or + inside the paths.
Hmm, I guess this will break because of +-escaped URLs, guessit isn't able to handle your second example: The+Hot+Spot+S01E02+Episode.2.1080p.NF.WEB-DL.JPN.AAC2.0.H.264-ToonsHub.mkv. Will need to run a urldecode for this... needs a bit of thinking.
another todo- need to check why your original log file shows that guessit_url doesn't have the query parameters.
Unfortunately, this is all the time I have right now for this. Will try to get back to it soon (a few weeks probably.) I suggest using metadata remap till then.
another option might be to modify guessit config to make it handle the The+Hot+Spot case properly: https://guessit-io.github.io/guessit/configuration/, https://github.com/guessit-io/guessit/blob/master/guessit/config/options.json
(Google around to see if anyone has tried this before)
Ok, I have pushed a feature that should be able to handle this case.
Install from branch:
1. Stop the scrobbler with `trakts stop` 2. Run `pipx install --force --pip-args='--force-reinstall' git+https://github.com/iamkroot/trakt-scrobbler.git@regex-raw-path` 3. Start scrobbler with `trakts start`To use it, remove the regexes from
episodeandmoviecategories, and create a new oneraw_path(also a list of regexes). Create a new regex that captures the entirety ofKEY5value into apathnamed regex group. This value will be parsed like normal file paths, and info will automatically extracted.This approach should be more robust than trying to detect
.or+inside the paths.
Thank you so much! This should be enough for now. I do checked guessit config, but the best I can do is still to specify The Hot Spot, so there is no point doing that. Using this brunch gives me a new bug though.
Error setting up notifier! type object 'IPropertyValue' has no attribute 'get_boolean_array'