Code Monkey home page Code Monkey logo

Comments (6)

Sp3EdeR avatar Sp3EdeR commented on August 10, 2024 1

The issue is raised because the continuation byte is D4 (11010100), and according to the UTF-8 standard, all continuation bytes must begin with 10... in binary. So this is a clear hint that the path is not transmitted in UTF-8. The logs say that the system encoding scheme is CP1251, which is the cyrillic code page, which makes sense for this system, of course. In this single-byte codepage, the D4 byte represents the Ф character, which is what @soredake pasted, so they match. This clearly shows that somewhere in the script, we try to decode with utf8, instead of cp1251.

The second case, where logs are attached show the UTF-8 and System string lines though. In this log, both lines correctly represent the Видео string in the associated encoding. So at least the logs show seemingly correct data.

My first guess would be that somewhere in the code, we use MPV.net's output that is in the encoding set in Windows (Windows is capable of unicode in UTF-16, but it is up to each program to choose whether to use UTF-16 or the encoding set by the system.) I think the easiest solution would be to reproduce the issue with MPV.net while setting the Windows codepage to whatever cp, and reproducing the issue with an aptly named folder. Then through debugging, it would be easiest to find where utf8 is assumed instead of using the correct system encoding.

The difference from MPC-HC will be that MPC specifically uses UTF-8 on its web API, so it does not change from computer to computer. In this case, it can be expected that every computer will have a different setup, and thus the encoding should be read (from the system or the MPV.net interface) instead of assumed.

from trakt-scrobbler.

iamkroot avatar iamkroot commented on August 10, 2024

Maybe related to #208 and #205? Try updating to the master branch.

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@master
  3. Start scrobbler with trakts start

I don't have enough time right now to try to reproduce this locally.

from trakt-scrobbler.

soredake avatar soredake commented on August 10, 2024

I was already on master, so no changes for me.

from trakt-scrobbler.

soredake avatar soredake commented on August 10, 2024

Same with ukrainian:

2024-03-24 12:36:54,413 - DEBUG - mpv - file_info - Raw filepath 'C:\\Users\\user\\OneDrive\\Âèäåî\\Captures\\Shin Megami Tensei - Persona 3 FES 2024-03-06 17-56-04.mp4'
2024-03-24 12:36:54,414 - DEBUG - mpv - utils - System encoding scheme: 'cp1251'
2024-03-24 12:36:54,415 - DEBUG - mpv - utils - UTF8: b'C:\\Users\\user\\OneDrive\\\xd0\x92\xd0\xb8\xd0\xb4\xd0\xb5\xd0\xbe\\Captures\\Shin Megami Tensei - Persona 3 FES 2024-03-06 17-56-04.mp4'
2024-03-24 12:36:54,415 - DEBUG - mpv - utils - System: b'C:\\Users\\user\\OneDrive\\\xc2\xe8\xe4\xe5\xee\\Captures\\Shin Megami Tensei - Persona 3 FES 2024-03-06 17-56-04.mp4'
2024-03-24 12:36:54,415 - WARNING - mpv - utils - Ignoring encoding error 'utf-8' codec can't decode byte 0xc2 in position 23: invalid continuation byte

from trakt-scrobbler.

iamkroot avatar iamkroot commented on August 10, 2024

Pinging @Sp3EdeR to see if they have any insights on this.

from trakt-scrobbler.

iamkroot avatar iamkroot commented on August 10, 2024

This is happening in mpv, though I'm guessing we have to do something similar to what we did for mpchc...

from trakt-scrobbler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.