trakt-scrobbler icon indicating copy to clipboard operation
trakt-scrobbler copied to clipboard

[BUG] Scrobbling with MPV produced error

Open Alistair1231 opened this issue 4 years ago • 26 comments

Describe the bug

It worked fine a while ago, but suddenly it didn't scrobble anymore. I am using the mpv-http branch of this repo.

Desktop (please complete the following information):

  • OS and Version: Win 10 21H1
  • Python Version: 3.9.5
  • Player and Version: mpv 0.33.0

To Reproduce

  1. play file

Log file

Click to see log contents

2021-06-19 09:17:22,738 - DEBUG - mpv - file_info - Raw filepath 'Z:\files\_Plex\TV\Harley Quinn (2019)\S01\Harley Quinn (2019) S01E09 A Seat at the Table (4Kto1080p DCU Webrip x265 10bit AC3 5.1 - Goki)[TAoE].mkv'
2021-06-19 09:17:22,747 - DEBUG - mpv - file_info - Matched whitelist entry 'Z:\files\_Plex'
2021-06-19 09:17:23,282 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Harley Quinn'), ('year', 2019), ('season', 1), ('episode', 9), ('episode_title', 'A Seat at the Table'), ('streaming_service', 'DC Universe'), ('source', 'Web'), ('other', 'Rip'), ('video_codec', 'H.265'), ('color_depth', '10-bit'), ('audio_codec', 'Dolby Digital'), ('audio_channels', '5.1'), ('release_group', 'Goki)[TAoE]'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-06-19 09:17:23,283 - DEBUG - mpv - monitor - action=scrobble
2021-06-19 09:17:23,283 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.22, 'media_info': {'type': 'episode', 'title': 'Harley Quinn', 'season': 1, 'episode': 9, 'year': 2019}, 'updated_at': 1624087043.2836306}
2021-06-19 09:17:23,284 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.22% for Harley Quinn
2021-06-19 09:17:23,292 - DEBUG - scrobbler - trakt_interface - Searching trakt: Title: "Harley Quinn", Year: 2019
2021-06-19 09:17:23,857 - DEBUG - scrobbler - trakt_interface - Trakt ID: 149764
2021-06-19 09:17:24,338 - INFO - scrobbler - scrobbler - Scrobble start successful for Harley Quinn S01E09
2021-06-19 09:17:50,349 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 171, in on_line
    mpv_json = json.loads(line)
  File "c:\program files\python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "c:\program files\python39\lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 77, in run
    self.conn_loop()
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 315, in conn_loop
    self.on_line(line)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 173, in on_line
    logger.warning('Invalid JSON received. Skipping. ' + line, exc_info=True)
TypeError: can only concatenate str (not "bytes") to str

EDIT: After a quick restart (trakts stop; trakts start) it seems to work again? I will do some testing. Not sure what is happening...

Alistair1231 avatar Jun 19 '21 09:06 Alistair1231

There's two errors here. One is from mpv (JSONDecodeError) and the other (TypeError) is my fault. If the second error hadn't been there, we would've been able to figure out the actual error from mpv 😅. So for now I'll push a fix for this and you can keep a lookout for the first error (mpv probably sent some weird info).

iamkroot avatar Jun 19 '21 09:06 iamkroot

perfect. I am on the new beta (Trakts version 1.3.0-beta.1) now and started a log file for mpv. When I encounter new errors I will post it here.

Alistair1231 avatar Jun 21 '21 19:06 Alistair1231

I have another error.

2021-06-25 15:14:13,826 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.00% for Marvel's Agents of S.H.I.E.L.D.
2021-06-25 15:14:14,297 - INFO - scrobbler - scrobbler - Scrobble start successful for Marvel's Agents of S.H.I.E.L.D. S01E22
2021-06-25 15:56:56,761 - DEBUG - mpv - monitor - action=scrobble
2021-06-25 15:56:56,770 - DEBUG - mpv - monitor - {'state': 0, 'progress': 98.6, 'media_info': {'type': 'episode', 'title': "Marvel's Agents of S.H.I.E.L.D.", 'season': 1, 'episode': 22}, 'updated_at': 1624629416.75288}
2021-06-25 15:56:56,771 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 98.60% for Marvel's Agents of S.H.I.E.L.D.
2021-06-25 15:56:56,775 - DEBUG - mpv - mpv - Pipe closed.
2021-06-25 15:56:56,907 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-06-25 15:56:57,517 - INFO - scrobbler - scrobbler - Scrobble stop successful for Marvel's Agents of S.H.I.E.L.D. S01E22
2021-06-25 16:00:37,078 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 86107, 'error': 'property unavailable'}
2021-06-25 16:00:37,081 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 86109, 'error': 'property unavailable'}
2021-06-25 16:00:37,082 - ERROR - mpv - mpv - Error with command ['get_property', 'duration']. Response: {'request_id': 86110, 'error': 'property unavailable'}
2021-06-25 16:00:37,776 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
    self.conn_loop()
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 331, in conn_loop
    self.on_line(line)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 174, in on_line
    mpv_json = json.loads(line)
  File "c:\program files\python39\lib\json\__init__.py", line 341, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 1: invalid start byte

I watched Marvel's Agents of S.H.I.E.L.D. S01E22 locally (rclone mount) and it scrobbled succesfully. Then I switched over to Syncplay for S02E01 (http) and it broke. This happend after some restarts and whitelisting etc.:

Traceback (most recent call last):
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
    self.conn_loop()
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 295, in conn_loop
    self.file_handle = win32file.CreateFile(
pywintypes.error: (231, 'CreateFile', 'All pipe instances are busy.')
2021-06-25 16:09:38,767 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2021-06-25 16:09:38,929 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-06-25 16:09:38,943 - INFO - MainThread - monitor - Started monitor for mpv
2021-06-25 16:09:38,961 - DEBUG - mpv - file_info - Raw filepath 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:09:38,961 - DEBUG - mpv - file_info - Converted to url 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:09:38,961 - INFO - mpv - file_info - File path not in whitelist.
2021-06-25 16:11:11,009 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.pause, scrobble.resume, scrobble.start, scrobble.stop, trakt
2021-06-25 16:11:11,178 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-06-25 16:11:11,193 - INFO - MainThread - monitor - Started monitor for mpv
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Raw filepath 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Converted to url 'http://192.168.195.232/Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv'
2021-06-25 16:11:11,208 - DEBUG - mpv - file_info - Matched whitelist entry 'http://192.168.195.232/'
2021-06-25 16:11:11,504 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', '192 168 195 232'), ('season', 2), ('episode_title', "Marvel's Agents of S.H.I.E.L.D."), ('episode', 1), ('screen_size', '1080p'), ('color_depth', '10-bit'), ('source', 'Blu-ray'), ('audio_codec', 'AAC'), ('audio_channels', '5.1'), ('video_codec', 'H.265'), ('video_profile', 'High Efficiency Video Coding'), ('release_group', 'Vyndros_Track02'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-06-25 16:11:11,505 - DEBUG - mpv - monitor - action=scrobble
2021-06-25 16:11:11,505 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.67, 'media_info': {'type': 'episode', 'title': '192 168 195 232', 'season': 2, 'episode': 1}, 'updated_at': 1624630271.5055656}
2021-06-25 16:11:11,505 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.67% for 192 168 195 232
2021-06-25 16:11:11,511 - DEBUG - scrobbler - trakt_interface - Searching trakt: Title: "192 168 195 232"
2021-06-25 16:11:12,084 - WARNING - scrobbler - trakt_interface - Trakt search yielded no results for the show, 192 168 195 232
2021-06-25 16:11:12,085 - DEBUG - scrobbler - trakt_interface - Trakt ID: -1
2021-06-25 16:11:12,086 - WARNING - scrobbler - trakt_interface - Invalid trakt id for 192 168 195 232
2021-06-25 16:11:12,086 - WARNING - scrobbler - scrobbler - Scrobble unsuccessful.

Apart from the other crashes, it seems the name wasn't recognized properly this time... This is the filename: Marvel's.Agents.of.S.H.I.E.L.D.S02E01.Shadows.1080p.10bit.BluRay.AAC5.1.HEVC-Vyndros_Track02.mkv

I don't think it matters, but I hosted the http with caddy: pwsh pic

Alistair1231 avatar Jun 25 '21 14:06 Alistair1231

First, I recommend updating to the master branch (beta version is old):

  1. Stop the scrobbler with trakts stop
  2. Run pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@master
  3. Start scrobbler with trakts start

Then, try to again play the file that caused the first issue (UnicodeDecodeError), and send the logs for that.

Regarding the second issue (wrong title), that's a bug in the current parser. Will make a separate issue for this.

iamkroot avatar Jun 26 '21 10:06 iamkroot

I updated to main and it seems fine again, apart from the issue https://github.com/iamkroot/trakt-scrobbler/issues/125#issuecomment-868985158

The UnicodeDecodeError seems to come only sometimes and is hard to reproduce. I will post about it if/when it comes up again.

EDIT: Since this https://github.com/iamkroot/trakt-scrobbler/issues/125#issuecomment-868985158 issue only appears when opened via http, which was when the bug appeared, maybe that was the problem after all. That something about how http represents symbols like quotes screwed with the parsing? If you think that might be it just close this.

Alistair1231 avatar Jun 26 '21 11:06 Alistair1231

Since this #125 (comment) issue only appears when opened via http, which was when the bug appeared, maybe that was the problem after all. That something about how http represents symbols like quotes screwed with the parsing?

Probably not an http thing, the error is originating in MPV Monitor when communicating with the player. It may be due to a weird symbol, but I'd like to get to the bottom of this.

iamkroot avatar Jun 26 '21 12:06 iamkroot

Alright. I will keep my eyes open and will post here if it happens again.

Alistair1231 avatar Jun 26 '21 14:06 Alistair1231

It happened again. Weirdly enough it still says something about unicode even though I installed this version https://github.com/iamkroot/trakt-scrobbler/commit/afe8171d8688f5cb7cdb4e44ceaec37066fcddb9 from master. Here is the log:

2021-06-27 23:11:46,996 - INFO - scrobbler - scrobbler - Scrobble stop successful for Marvel's Jessica Jones S01E10
2021-06-28 17:46:10,695 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 11427, 'error': 'property unavailable'}
2021-06-28 17:46:13,840 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
    self.conn_loop()
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 334, in conn_loop
    self.on_line(line)
  File "c:\users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
    mpv_json = json.loads(line)
  File "c:\program files\python39\lib\json\__init__.py", line 341, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x86 in position 24: invalid start byte

Here is the mpv log (places with a lot of dots were trimmed since it repeated a lot in idle): It was too long for a comment so here is a pastebin

Alistair1231 avatar Jun 28 '21 16:06 Alistair1231

Hmm that doesn't help a lot. I've added some code to catch and log the raw data when the error occurs occurs. Could you please try installing this:

  1. Stop the scrobbler with trakts stop
  2. Run pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@mpv_debug
  3. Start scrobbler with trakts start

iamkroot avatar Jun 28 '21 16:06 iamkroot

alright done. Will update once errors occur

Alistair1231 avatar Jun 28 '21 17:06 Alistair1231

Hmm that doesn't help a lot. I've added some code to catch and log the raw data when the error occurs occurs. Could you please try installing this:

1. Stop the scrobbler with `trakts stop`

2. Run `pipx install --force git+https://github.com/iamkroot/trakt-scrobbler.git@mpv_debug`

3. Start scrobbler with `trakts start`

alright done. Will update once errors occur

you might have inadvertently fixed it? I wasn't having any issues anymore. I just wanted to give an update letting you know I did use it and it was fine.

However if something happens I will update

Alistair1231 avatar Aug 20 '21 09:08 Alistair1231

Hmm very weird. For now, you should just install v1.3.0 and we'll deal with this if it comes up again

iamkroot avatar Aug 21 '21 16:08 iamkroot

Hi! I'm on 1.3.2 right now and encountered an error again. I was running in mpv using a m3u playlist with urls, which I manage using mpv-playlistmanager. Here is the log

2021-10-08 21:38:04,424 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2677, 'error': 'property unavailable'}
2021-10-08 21:38:31,781 - WARNING - mpv - mpv - Invalid JSON received. Skipping.
Traceback (most recent call last):
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
    mpv_json = json.loads(line)
  File "c:\program files\python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "c:\program files\python39\lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)
2021-10-08 21:38:31,806 - DEBUG - mpv - mpv - b'2021-10-08 20:43:01\x00"reason":"quit","playlist_entry_id":6}'
2021-10-08 21:38:31,807 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 21:38:31,807 - WARNING - mpv - mpv - Incomplete media status info
2021-10-08 21:38:32,822 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.

As always a restart with trakts stop; trakts start and everything works again.

Alistair1231 avatar Oct 08 '21 19:10 Alistair1231

Just to verify, you're running mpv directly, or via smplayer?

I guess this is most likely a quirk of that playlist manager script and how it interacts with the mpv end-file event. I suspect that it inserts a newline char (\n) somewhere in the ID, and this breaks our JSON parsing (sometimes), which assumes that if we hit a newline, the json record is complete. Just a hunch, will have to test further.

edit: that might not be the case. I see that there's a \x00 just before the "reason" field. This isn't valid json, even if the lua script added a newline somewhere. This seems more like an mpv bug. Again, need to reproduce this reliably.

iamkroot avatar Oct 09 '21 07:10 iamkroot

I use mpv directly and I'm using windows. I installed mpv via chocolatey and am on version v2020.12.06. Is there a reason why the program just quits after finding this error? I'd rather that the scrobbling of the one episode fails rather than noticing the scrobbler crashed multiple episodes in, tbh.

Alistair1231 avatar Oct 09 '21 07:10 Alistair1231

Is there a reason why the program just quits after finding this error?

If you look carefully, the program hasn't crashed. After you originally raised the bug report, I added logic such that it would log a warning+exception traceback (to figure out exactly which line is giving error), but it would ignore the malformed input and move on. You can see Pipe closed message, meaning it has terminated the connection with MPV. The monitor would now go into the dormant state. If you did play a new file, it should have recognized the new episodes. If not, that suggests a deeper issue in the connection between mpv and our app. Are there any more log messages after the snippet you posted above (ie, after Unable to connect to MPV)? I would expect that the next time mpv is started, our monitor would re-connect to it.

Are you actually closing MPV at the end of the file, or just moving to the next file in the playlist?

iamkroot avatar Oct 09 '21 10:10 iamkroot

Ohhh ok. That might have been exactly what happened. Maybe I caught it exactly as it happened and restarted the scrobbler and mpv, where mpv would've been enough! I thought it already crashed after Episode 7 of Squid Game since it didn't update on trakt, but it the log looks like only crashed after episode 9, and at least up until episode 8 it should have been completed, but on trakt they aren't. Maybe I closed the episode too early because of the long outro it seems I watched only 86.54%. Otherwise, this might be a trakt issue though since I think after noticing it I manually set them to watched. Maybe I'm misremebering? After setting it to watched again manually today, it seems to stick, so I don't know what's going on...

Click to expand the log!
2021-10-07 22:09:14,312 - DEBUG - mpv - monitor - action=scrobble
2021-10-07 22:09:14,312 - DEBUG - mpv - monitor - {'state': 2, 'progress': 18.81, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 7}, 'updated_at': 1633637354.311184}
2021-10-07 22:09:14,312 - DEBUG - scrobbler - scrobbler - Scrobbling start at 18.81% for Squid Game
2021-10-07 22:09:14,533 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E07
2021-10-07 22:52:07,218 - DEBUG - mpv - monitor - action=scrobble
2021-10-07 22:52:07,219 - DEBUG - mpv - monitor - {'state': 0, 'progress': 92.62, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 7}, 'updated_at': 1633639927.2186875}
2021-10-07 22:52:07,221 - DEBUG - mpv - mpv - Pipe closed.
2021-10-07 22:52:07,221 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 92.62% for Squid Game
2021-10-07 22:52:07,901 - INFO - scrobbler - scrobbler - Scrobble stop successful for Squid Game S01E07
2021-10-07 22:52:08,229 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 18:18:52,173 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.start, scrobble.stop, trakt
2021-10-08 18:18:53,161 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-10-08 18:18:53,267 - INFO - MainThread - monitor - Started monitor for mpv
2021-10-08 18:18:53,289 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 18:41:44,499 - DEBUG - mpv - file_info - Raw filepath 'C:\\Users\\alima\\Videos\\2021-10-08 18-40-17.mp4'
2021-10-08 18:41:44,499 - INFO - mpv - file_info - File path not in whitelist.
2021-10-08 18:41:54,965 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 18:41:55,977 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 19:14:47,495 - DEBUG - mpv - file_info - Raw filepath 'C:\\Users\\alima\\MEGASync\\2021-10-08 18-40-17-ImZooooomin~1.mp4'
2021-10-08 19:14:47,495 - INFO - mpv - file_info - File path not in whitelist.
2021-10-08 19:14:54,270 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 19:14:55,282 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 19:17:15,400 - DEBUG - mpv - file_info - Raw filepath 'https://user:[email protected]/dav/_Plex/TV/Squid%20Game/S01/Squid.Game.S01E08.Front.Man.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:15,401 - DEBUG - mpv - file_info - Converted to url 'https://user:[email protected]/dav/_Plex/TV/Squid Game/S01/Squid.Game.S01E08.Front.Man.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:15,401 - DEBUG - mpv - file_info - Guessit url '/dav/_Plex/TV/Squid Game/S01/Squid.Game.S01E08.Front.Man.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:15,403 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:[email protected]/dav'
2021-10-08 19:17:15,764 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Squid Game'), ('season', 1), ('episode', 8), ('episode_title', 'Front Man'), ('screen_size', '1080p'), ('streaming_service', 'Netflix'), ('source', 'Web'), ('audio_codec', ['Dolby Digital Plus', 'Dolby Atmos']), ('audio_channels', '5.1'), ('video_codec', 'H.264'), ('release_group', 'SKiN'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-10-08 19:17:15,765 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:17:15,765 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.0, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633713435.765383}
2021-10-08 19:17:15,765 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.00% for Squid Game
2021-10-08 19:17:16,213 - INFO - scrobbler - scrobbler - Scrobble start successful for Squid Game S01E08
2021-10-08 19:17:32,394 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:17:32,394 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.86, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633713452.3944488}
2021-10-08 19:17:32,394 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.86% for Squid Game
2021-10-08 19:17:32,541 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E08
2021-10-08 19:17:38,645 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 43, 'error': 'property unavailable'}
2021-10-08 19:17:40,758 - DEBUG - mpv - file_info - Raw filepath 'https://user:[email protected]/dav/_Plex/TV/Squid%20Game/S01/Squid.Game.S01E09.One.Lucky.Day.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:40,758 - DEBUG - mpv - file_info - Converted to url 'https://user:[email protected]/dav/_Plex/TV/Squid Game/S01/Squid.Game.S01E09.One.Lucky.Day.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:40,758 - DEBUG - mpv - file_info - Guessit url '/dav/_Plex/TV/Squid Game/S01/Squid.Game.S01E09.One.Lucky.Day.1080p.NF.WEB-DL.DDP5.1.Atmos.x264-SKiN.mkv'
2021-10-08 19:17:40,758 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:[email protected]/dav'
2021-10-08 19:17:40,792 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Squid Game'), ('season', 1), ('episode', 9), ('episode_title', 'One Lucky Day'), ('screen_size', '1080p'), ('streaming_service', 'Netflix'), ('source', 'Web'), ('audio_codec', ['Dolby Digital Plus', 'Dolby Atmos']), ('audio_channels', '5.1'), ('video_codec', 'H.264'), ('release_group', 'SKiN'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-10-08 19:17:40,792 - DEBUG - mpv - monitor - action=stop_previous
2021-10-08 19:17:40,793 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:17:40,793 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 0.86% for Squid Game
2021-10-08 19:17:40,793 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.0, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633713460.7928205}
2021-10-08 19:17:40,939 - INFO - scrobbler - scrobbler - Scrobble stop successful for Squid Game S01E08
2021-10-08 19:17:40,941 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.00% for Squid Game
2021-10-08 19:17:42,454 - INFO - scrobbler - scrobbler - Scrobble start successful for Squid Game S01E09
2021-10-08 19:17:45,299 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 58, 'error': 'property unavailable'}
2021-10-08 19:17:48,044 - DEBUG - mpv - monitor - action=stop_previous
2021-10-08 19:17:48,044 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:17:48,044 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 0.00% for Squid Game
2021-10-08 19:17:48,044 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.86, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633713468.0446687}
2021-10-08 19:17:48,182 - INFO - scrobbler - scrobbler - Scrobble stop successful for Squid Game S01E09
2021-10-08 19:17:48,183 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.86% for Squid Game
2021-10-08 19:17:48,517 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:17:48,517 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.87, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633713468.517079}
2021-10-08 19:17:49,477 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E08
2021-10-08 19:17:49,478 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.87% for Squid Game
2021-10-08 19:17:49,874 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E08
2021-10-08 19:27:42,181 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:27:42,182 - DEBUG - mpv - monitor - {'state': 1, 'progress': 31.51, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714062.1813974}
2021-10-08 19:27:42,182 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 31.51% for Squid Game
2021-10-08 19:27:42,479 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E08
2021-10-08 19:27:57,571 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:27:57,571 - DEBUG - mpv - monitor - {'state': 2, 'progress': 31.51, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714077.571654}
2021-10-08 19:27:57,571 - DEBUG - scrobbler - scrobbler - Scrobbling start at 31.51% for Squid Game
2021-10-08 19:27:57,782 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E08
2021-10-08 19:29:10,491 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:29:10,491 - DEBUG - mpv - monitor - {'state': 1, 'progress': 35.28, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714150.4902513}
2021-10-08 19:29:10,491 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 35.28% for Squid Game
2021-10-08 19:29:10,630 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E08
2021-10-08 19:31:57,584 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:31:57,584 - DEBUG - mpv - monitor - {'state': 2, 'progress': 35.28, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714317.5837576}
2021-10-08 19:31:57,584 - DEBUG - scrobbler - scrobbler - Scrobbling start at 35.28% for Squid Game
2021-10-08 19:31:57,982 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E08
2021-10-08 19:38:58,037 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:38:58,037 - DEBUG - mpv - monitor - {'state': 1, 'progress': 57.02, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714738.037035}
2021-10-08 19:38:58,037 - DEBUG - mpv - monitor - action=enter_fast_pause
2021-10-08 19:38:58,037 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 57.02% for Squid Game
2021-10-08 19:38:58,378 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E08
2021-10-08 19:39:34,221 - DEBUG - mpv - monitor - action=delayed_play
2021-10-08 19:39:39,223 - DEBUG - Thread-168 - monitor - Delayed scrobble
2021-10-08 19:39:39,223 - DEBUG - Thread-168 - monitor - {'state': 2, 'progress': 57.03, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 8}, 'updated_at': 1633714774.221012}
2021-10-08 19:39:39,223 - DEBUG - Thread-168 - monitor - Exiting fast_pause
2021-10-08 19:39:39,223 - DEBUG - scrobbler - scrobbler - Scrobbling start at 57.03% for Squid Game
2021-10-08 19:39:39,560 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E08
2021-10-08 19:49:14,448 - DEBUG - mpv - monitor - action=stop_previous
2021-10-08 19:49:14,448 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 19:49:14,449 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.14, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633715354.448423}
2021-10-08 19:49:14,449 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 86.54% for Squid Game
2021-10-08 19:49:14,940 - INFO - scrobbler - scrobbler - Scrobble stop successful for Squid Game S01E08
2021-10-08 19:49:14,942 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.14% for Squid Game
2021-10-08 19:49:15,152 - INFO - scrobbler - scrobbler - Scrobble start successful for Squid Game S01E09
2021-10-08 20:17:08,774 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:17:08,775 - DEBUG - mpv - monitor - {'state': 1, 'progress': 50.47, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717028.7748919}
2021-10-08 20:17:08,775 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 50.47% for Squid Game
2021-10-08 20:17:09,344 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E09
2021-10-08 20:17:10,920 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:17:10,920 - DEBUG - mpv - monitor - {'state': 2, 'progress': 50.47, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717030.9209409}
2021-10-08 20:17:10,920 - DEBUG - scrobbler - scrobbler - Scrobbling start at 50.47% for Squid Game
2021-10-08 20:17:11,126 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E09
2021-10-08 20:17:14,406 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:17:14,406 - DEBUG - mpv - monitor - {'state': 1, 'progress': 50.57, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717034.406976}
2021-10-08 20:17:14,406 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 50.57% for Squid Game
2021-10-08 20:17:14,555 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E09
2021-10-08 20:17:14,911 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:17:14,911 - DEBUG - mpv - monitor - {'state': 2, 'progress': 50.58, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717034.9114516}
2021-10-08 20:17:14,911 - DEBUG - scrobbler - scrobbler - Scrobbling start at 50.58% for Squid Game
2021-10-08 20:17:16,501 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E09
2021-10-08 20:26:27,241 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:26:27,241 - DEBUG - mpv - monitor - {'state': 1, 'progress': 67.18, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717587.2414403}
2021-10-08 20:26:27,241 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 67.18% for Squid Game
2021-10-08 20:26:27,475 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E09
2021-10-08 20:28:51,817 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:28:51,817 - DEBUG - mpv - monitor - {'state': 2, 'progress': 67.18, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717731.8177285}
2021-10-08 20:28:51,817 - DEBUG - scrobbler - scrobbler - Scrobbling start at 67.18% for Squid Game
2021-10-08 20:28:52,062 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E09
2021-10-08 20:29:21,950 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:29:21,950 - DEBUG - mpv - monitor - {'state': 1, 'progress': 68.08, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717761.9509919}
2021-10-08 20:29:21,950 - DEBUG - mpv - monitor - action=enter_fast_pause
2021-10-08 20:29:21,950 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 68.08% for Squid Game
2021-10-08 20:29:22,119 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E09
2021-10-08 20:29:46,215 - DEBUG - mpv - monitor - action=delayed_play
2021-10-08 20:29:51,227 - DEBUG - Thread-487 - monitor - Delayed scrobble
2021-10-08 20:29:51,227 - DEBUG - Thread-487 - monitor - {'state': 2, 'progress': 68.09, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633717786.2159278}
2021-10-08 20:29:51,227 - DEBUG - Thread-487 - monitor - Exiting fast_pause
2021-10-08 20:29:51,227 - DEBUG - scrobbler - scrobbler - Scrobbling start at 68.09% for Squid Game
2021-10-08 20:29:51,614 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E09
2021-10-08 20:38:05,815 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:38:05,816 - DEBUG - mpv - monitor - {'state': 1, 'progress': 83.1, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633718285.8155904}
2021-10-08 20:38:05,816 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 83.10% for Squid Game
2021-10-08 20:38:06,147 - INFO - scrobbler - scrobbler - Scrobble pause successful for Squid Game S01E09
2021-10-08 20:38:06,971 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:38:06,971 - DEBUG - mpv - monitor - {'state': 2, 'progress': 83.1, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633718286.971906}
2021-10-08 20:38:06,971 - DEBUG - scrobbler - scrobbler - Scrobbling start at 83.10% for Squid Game
2021-10-08 20:38:08,325 - INFO - scrobbler - scrobbler - Scrobble resume successful for Squid Game S01E09
2021-10-08 20:43:00,600 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 20:43:00,600 - DEBUG - mpv - monitor - {'state': 0, 'progress': 91.93, 'media_info': {'type': 'episode', 'title': 'Squid Game', 'season': 1, 'episode': 9}, 'updated_at': 1633718580.6000762}
2021-10-08 20:43:00,600 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 20:43:00,600 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 91.93% for Squid Game
2021-10-08 20:43:01,011 - INFO - scrobbler - scrobbler - Scrobble stop successful for Squid Game S01E09
2021-10-08 20:43:01,606 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 21:38:04,424 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2677, 'error': 'property unavailable'}
2021-10-08 21:38:31,781 - WARNING - mpv - mpv - Invalid JSON received. Skipping.
Traceback (most recent call last):
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
    mpv_json = json.loads(line)
  File "c:\program files\python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "c:\program files\python39\lib\json\decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 5 (char 4)
2021-10-08 21:38:31,806 - DEBUG - mpv - mpv - b'2021-10-08 20:43:01\x00"reason":"quit","playlist_entry_id":6}'
2021-10-08 21:38:31,807 - DEBUG - mpv - mpv - Pipe closed.
2021-10-08 21:38:31,807 - WARNING - mpv - mpv - Incomplete media status info
2021-10-08 21:38:32,822 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 21:45:27,214 - DEBUG - MainThread - notifier - Notifications enabled for categories: exception, misc, scrobble.start, scrobble.stop, trakt
2021-10-08 21:45:27,378 - INFO - MainThread - scrobbler - Started scrobbler thread.
2021-10-08 21:45:27,391 - INFO - MainThread - monitor - Started monitor for mpv
2021-10-08 21:45:27,392 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-10-08 21:45:47,428 - DEBUG - mpv - file_info - Raw filepath 'https://user:[email protected]/dav/_Plex/TV/Marvel%27s%20Luke%20Cage/S02/Marvels.Luke.Cage.S02E03.Wig.Out.WEBRip.1080p.AC3.H265-d3g.mkv'
2021-10-08 21:45:47,428 - DEBUG - mpv - file_info - Converted to url "https://user:[email protected]/dav/_Plex/TV/Marvel's Luke Cage/S02/Marvels.Luke.Cage.S02E03.Wig.Out.WEBRip.1080p.AC3.H265-d3g.mkv"
2021-10-08 21:45:47,428 - DEBUG - mpv - file_info - Guessit url "/dav/_Plex/TV/Marvel's Luke Cage/S02/Marvels.Luke.Cage.S02E03.Wig.Out.WEBRip.1080p.AC3.H265-d3g.mkv"
2021-10-08 21:45:47,428 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:[email protected]/dav'
2021-10-08 21:45:47,765 - DEBUG - mpv - file_info - Guess: MatchesDict([('season', 2), ('title', 'Marvels Luke Cage'), ('episode', 3), ('episode_title', 'Wig Out'), ('source', 'Web'), ('other', 'Rip'), ('screen_size', '1080p'), ('audio_codec', 'Dolby Digital'), ('video_codec', 'H.265'), ('release_group', 'd3g'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-10-08 21:45:47,765 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:45:47,765 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.55, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633722347.76592}
2021-10-08 21:45:47,766 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.55% for Marvels Luke Cage
2021-10-08 21:45:48,104 - INFO - scrobbler - scrobbler - Scrobble pause successful for Marvel's Luke Cage S02E03
2021-10-08 21:45:48,352 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:45:48,352 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.55, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633722348.3522062}
2021-10-08 21:45:48,352 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.55% for Marvels Luke Cage
2021-10-08 21:45:48,560 - INFO - scrobbler - scrobbler - Scrobble resume successful for Marvel's Luke Cage S02E03
2021-10-08 21:45:53,562 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:45:53,562 - DEBUG - mpv - monitor - {'state': 1, 'progress': 0.7, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633722353.5623946}
2021-10-08 21:45:53,562 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 0.70% for Marvels Luke Cage
2021-10-08 21:45:53,701 - INFO - scrobbler - scrobbler - Scrobble pause successful for Marvel's Luke Cage S02E03
2021-10-08 21:46:38,421 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:46:38,421 - DEBUG - mpv - monitor - {'state': 2, 'progress': 0.7, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633722398.421391}
2021-10-08 21:46:38,421 - DEBUG - scrobbler - scrobbler - Scrobbling start at 0.70% for Marvels Luke Cage
2021-10-08 21:46:38,627 - INFO - scrobbler - scrobbler - Scrobble resume successful for Marvel's Luke Cage S02E03
2021-10-08 21:53:16,667 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:53:16,667 - DEBUG - mpv - monitor - {'state': 1, 'progress': 11.73, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633722796.667988}
2021-10-08 21:53:16,668 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 11.73% for Marvels Luke Cage
2021-10-08 21:53:16,811 - INFO - scrobbler - scrobbler - Scrobble pause successful for Marvel's Luke Cage S02E03
2021-10-08 21:58:10,347 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 21:58:10,347 - DEBUG - mpv - monitor - {'state': 2, 'progress': 11.73, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633723090.347753}
2021-10-08 21:58:10,348 - DEBUG - scrobbler - scrobbler - Scrobbling start at 11.73% for Marvels Luke Cage
2021-10-08 21:58:10,569 - INFO - scrobbler - scrobbler - Scrobble resume successful for Marvel's Luke Cage S02E03
2021-10-08 22:45:50,833 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 22:45:50,833 - DEBUG - mpv - monitor - {'state': 1, 'progress': 91.05, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633725950.833277}
2021-10-08 22:45:50,833 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 91.05% for Marvels Luke Cage
2021-10-08 22:45:51,137 - INFO - scrobbler - scrobbler - Scrobble pause successful for Marvel's Luke Cage S02E03
2021-10-08 23:20:47,560 - DEBUG - mpv - monitor - action=scrobble
2021-10-08 23:20:47,560 - DEBUG - mpv - monitor - {'state': 2, 'progress': 91.06, 'media_info': {'type': 'episode', 'title': 'Marvels Luke Cage', 'season': 2, 'episode': 3}, 'updated_at': 1633728047.5605783}
2021-10-08 23:20:47,560 - DEBUG - scrobbler - scrobbler - Scrobbling start at 91.06% for Marvels Luke Cage
2021-10-08 23:20:47,921 - INFO - scrobbler - scrobbler - Scrobble resume successful for Marvel's Luke Cage S02E03
2021-10-08 23:24:09,273 - ERROR - mpv - mpv - Error with command ['get_property', 'time-pos']. Response: {'request_id': 2971, 'error': 'property unavailable'}
2021-10-08 23:24:10,367 - DEBUG - mpv - file_info - Raw filepath 'https://user:[email protected]/dav/_Plex/TV/Marvel%27s%20Luke%20Cage/S02/Marvels.Luke.Cage.S02E04.I.Get.Physical.WEBRip.1080p.AC3.H265-d3g.mkv'
2021-10-08 23:24:10,367 - DEBUG - mpv - file_info - Converted to url "https://user:[email protected]/dav/_Plex/TV/Marvel's Luke Cage/S02/Marvels.Luke.Cage.S02E04.I.Get.Physical.WEBRip.1080p.AC3.H265-d3g.mkv"
2021-10-08 23:24:10,367 - DEBUG - mpv - file_info - Guessit url "/dav/_Plex/TV/Marvel's Luke Cage/S02/Marvels.Luke.Cage.S02E04.I.Get.Physical.WEBRip.1080p.AC3.H265-d3g.mkv"
2021-10-08 23:24:10,368 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:[email protected]/dav'
2021-10-08 23:24:10,406 - DEBUG - mpv - file_info - Guess: MatchesDict([('season', 2), ('title', 'Marvels Luke Cage'), ('episode', 4), ('episode_title', 'I Get Physical'), ('source', 'Web'), ('other', 'Rip'), ('screen_size', '1080p'), ('audio_codec', 'Dolby Digital'), ('video_codec', 'H.265'), ('release_group', 'd3g'), ('container', 'mkv'), ('mimetype', 'video/x-matroska'), ('type', 'episode')])
2021-10-08 23:24:10,407 - DEBUG - mpv - monitor - action=stop_previous
2021-10-08 23:24:10,407 - DEBUG - mpv - monitor - action=scrobble

image

edit: at this point I'm pretty sure trakt is having issues: my History AGAIN doesn't include the 2 episodes! Same with S02E03 of Luke Cage image

Alistair1231 avatar Oct 09 '21 14:10 Alistair1231

Maybe I closed the episode too early because of the long outro it seems I watched only 86.54%.

Probably not. The default value for getting marked as "complete" is 80%, unless you've changed it in trakt settings.

Looking at the logs, it must be a trakt thing, since we have clearly sent the scrobbles to the server and they've been successful.

I've pushed a commit that makes it a bit more clear what trakt replied about the scrobble (whether it got stopped, or simply "paused"). I've also made some internal changes to the mpv monitor on windows, so it would be helpful if you could make sure there's no bugs introduced:

  1. Stop the scrobbler with trakts stop
  2. pipx uninstall
  3. pipx install git+https://github.com/iamkroot/trakt-scrobbler.git
  4. Start scrobbler with trakts start

Regarding the JSONDecodeError, I think I know why it is happening, but I'll need some more experimentation to verify it. Even so, as I said before, currently, we just drop the connection with mpv when that occurs, and try a fresh one, so having the error shouldn't really impact the scrobbles by much.

iamkroot avatar Nov 01 '21 06:11 iamkroot

It happened again. I am on trakt-scrobbler 1.3.2:

2021-12-10 16:47:28,817 - DEBUG - mpv - monitor - action=scrobble
2021-12-10 16:47:28,818 - DEBUG - mpv - monitor - {'state': 1, 'progress': 56.66, 'media_info': {'type': 'episode', 'title': 'Star Trek The Next Generation', 'season': 2, 'episode': 20}, 'updated_at': 1639151248.8173425}
2021-12-10 16:47:28,818 - DEBUG - scrobbler - scrobbler - Scrobbling pause at 56.66% for Star Trek The Next Generation
2021-12-10 16:47:29,148 - INFO - scrobbler - scrobbler - Scrobble pause successful for Star Trek: The Next Generation S02E20
2021-12-10 17:52:06,644 - DEBUG - mpv - monitor - action=scrobble
2021-12-10 17:52:06,645 - DEBUG - mpv - monitor - {'state': 0, 'progress': 56.66, 'media_info': {'type': 'episode', 'title': 'Star Trek The Next Generation', 'season': 2, 'episode': 20}, 'updated_at': 1639155126.6401112}
2021-12-10 17:52:06,647 - DEBUG - mpv - mpv - Pipe closed.
2021-12-10 17:52:06,647 - DEBUG - scrobbler - scrobbler - Scrobbling stop at 56.66% for Star Trek The Next Generation
2021-12-10 17:52:06,972 - INFO - scrobbler - scrobbler - Scrobble stop successful for Star Trek: The Next Generation S02E20
2021-12-10 17:52:07,648 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:06:42,159 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2602, 'error': 'property unavailable'}
2021-12-11 18:06:46,044 - DEBUG - mpv - file_info - Raw filepath 'https://user:[email protected]/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,047 - DEBUG - mpv - file_info - Converted to url 'https://user:[email protected]/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,048 - DEBUG - mpv - file_info - Guessit url '/dav/_Plex/Movie/Ant-Man.2015.1080p.BluRay.x265-RARBG/Ant-Man.2015.1080p.BluRay.x265-RARBG.mp4'
2021-12-11 18:06:46,051 - DEBUG - mpv - file_info - Matched whitelist entry 'https://user:[email protected]/dav'
2021-12-11 18:06:46,149 - DEBUG - mpv - file_info - Guess: MatchesDict([('title', 'Ant-Man'), ('year', 2015), ('screen_size', '1080p'), ('source', 'Blu-ray'), ('video_codec', 'H.265'), ('release_group', 'RARBG'), ('container', 'mp4'), ('mimetype', 'video/mp4'), ('type', 'movie')])
2021-12-11 18:06:46,150 - DEBUG - mpv - monitor - action=enter_preview
2021-12-11 18:06:46,537 - DEBUG - mpv - monitor - action=pause_preview
2021-12-11 18:07:40,126 - DEBUG - mpv - monitor - action=exit_preview
2021-12-11 18:07:40,130 - DEBUG - mpv - monitor - Exiting preview
2021-12-11 18:07:40,130 - DEBUG - mpv - mpv - Pipe closed.
2021-12-11 18:07:41,131 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:07:51,134 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2642, 'error': 'property unavailable'}
2021-12-11 18:07:54,917 - DEBUG - mpv - monitor - action=enter_preview
2021-12-11 18:07:56,454 - DEBUG - mpv - monitor - action=exit_preview
2021-12-11 18:07:56,455 - DEBUG - mpv - monitor - Exiting preview
2021-12-11 18:07:56,455 - DEBUG - mpv - mpv - Pipe closed.
2021-12-11 18:07:57,455 - INFO - mpv - mpv - Unable to connect to MPV. Check ipc path.
2021-12-11 18:09:37,463 - ERROR - mpv - mpv - Error with command ['get_property', 'path']. Response: {'request_id': 2657, 'error': 'property unavailable'}
2021-12-11 18:11:55,657 - ERROR - mpv - __init__ - Unhandled exception
Traceback (most recent call last):
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\__init__.py", line 42, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 80, in run
    self.conn_loop()
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 334, in conn_loop
    self.on_line(line)
  File "C:\Users\alima\.local\pipx\venvs\trakt-scrobbler\lib\site-packages\trakt_scrobbler\player_monitors\mpv.py", line 176, in on_line
    mpv_json = json.loads(line)
  File "C:\Users\alima\.pyenv\pyenv-win\versions\3.8.10\Lib\json\__init__.py", line 343, in loads
    s = s.decode(detect_encoding(s), 'surrogatepass')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 232: invalid start byte

Alistair1231 avatar Dec 11 '21 18:12 Alistair1231

Quick question, does the file name/path have a sign somewhere?

iamkroot avatar Dec 11 '21 18:12 iamkroot

:/@._- are the only symbols, other that that only letters and numbers and : is only at the beginning after https

the link to the file you mean, correct?

Alistair1231 avatar Dec 11 '21 18:12 Alistair1231

Hmm, never mind then. Looks like some weirdness with encodings and I would prefer not to go down that rabbit hole. MPV says that it sends UTF-8, but then also goes on to say that the data may be malformed, so we can't make any assumptions about it. I'm just gonna go ahead and have our app ignore all non-UTF8 chars.

iamkroot avatar Dec 11 '21 18:12 iamkroot

That sounds like a valid solution. I could see how german filenames might become an issue, since Üü, Ää, Öö and ß are not utf-8. But I'm not sure if it is common to use these in filenames of tv-shows or movies. Maybe those symbols could be caught and replaced with Ue, Ae, Oe and ss instead? Those are common replacements and might even still be picked up by trakt. At least the search on the website does allow it! example: image Don't judge the movie choice, it was the first thing I could think of with a non utf-8 symbol 😆

Alistair1231 avatar Dec 11 '21 18:12 Alistair1231

Yeah, I'm not even sure how mpv deals with this. They say they want to give utf8 data, and if that were the case, life would be really simple! I'll experiment with some umlauts to see what happens, when I get some time.

iamkroot avatar Dec 11 '21 18:12 iamkroot

Great, Thanks! At least we now know what the issue is. Seems very random when/if this happens. Maybe that would even be an issue to open on mpv-player/mpv? Though since they do state it might be malformed, they might not plan to fix it.

Alistair1231 avatar Dec 11 '21 19:12 Alistair1231

At least on linux, I'm not seeing any problems with umlauts. Looking closer, Ü is a proper unicode char: https://www.compart.com/en/unicode/U+00FC

So the file is getting scrobbled perfectly well. Not sure if it is some Windows-specific bug that you faced earlier.

iamkroot avatar Feb 18 '22 16:02 iamkroot

Closing due to inactivity.

iamkroot avatar Mar 23 '24 13:03 iamkroot