mpv-sub-select icon indicating copy to clipboard operation
mpv-sub-select copied to clipboard

SubsSelect Stopped Working

Open george-emerald opened this issue 1 year ago • 7 comments

It just stopped working seemingly at random. I was using an older version that was running without issue, I thought a recent mpv version might've broken it, yet the issue persisted after I downloaded the .lua file. FOr some reason, it produces no error code on the console, it just says it's selecting a subtitle when it isn't (at least not correctly). I'm pretty sure it's just falling back to native mpv selection. I checked my .json as well and there's nothing wrong with the syntax (it follows the example).

george-emerald avatar Jun 26 '24 15:06 george-emerald

Run mpv with --msg-level=sub_select='trace' --log-level=log.txt and upload the log. Make sure you try and open the file in question. Also upload your .json.

CogentRedTester avatar Jul 05 '24 07:07 CogentRedTester

Hey there, not the OP but I'm having trouble with the tool after I updated to the latest version, here is my log: https://dontpad.com/SubSelectLOG

Particularly these final lines seems to be the problem, since it breaks when I close the player or change file):

[   7.982][d][cplayer] Run command: quit, flags=73, args=[code="0"]
[   7.982][v][cplayer] EOF code: 5  
[   7.982][v][cplayer] Running hook: sub_select/on_unload
[   7.982][d][ao/wasapi] Thread Reset
[   7.982][d][ao/wasapi] Thread Pause

And my .json:

[
  {
    "alang": ["jpn", "jap", "ja"],
    "slang": "eng?",
    "blacklist": ["sign", "song", "forced"]
  },
  {
    "alang": ["jpn", "jap", "ja"],
    "slang": "eng?",
    "blacklist": ["sign", "song"]
  },
  {
    "alang": ["eng?", "und"],
    "slang": ["en%-us", "eng?", "und"],
    "condition": "sub.forced"
  },
  {
    "inherit": "^",
    "slang": "und"
  },
  {
    "alang": "*",
    "slang": "forced"
  },
  {
    "alang": "eng?",
    "slang": ["en%-us", "eng?", "und"],
    "whitelist": ["sign", "song"]
  },
  {
    "alang": "eng?",
    "slang": "und"
  },
  {
    "alang": "*",
    "slang": ["en%-us", "eng?", "und"]
  },
  {
    "alang": "no",
    "slang": "no"
  }
]

Additional info:

  • It seems to break when there's internal srt and external srt (this case I had an external srt "equal" to the internal)
  • I need to close on Task Manager, it freezes
  • Returning the code to previous version works (and selects the internal one)

v-amorim avatar Jul 12 '24 01:07 v-amorim

When you mention updating and reverting versions are you referring to sub-select or mpv? And which specific versions are you switching between?

CogentRedTester avatar Jul 12 '24 02:07 CogentRedTester

When you mention updating and reverting versions are you referring to sub-select or mpv? And which specific versions are you switching between?

Your script, I don't have a specific version name/link, but in my repo I have this diff ("newest" to the left)

v-amorim avatar Jul 12 '24 02:07 v-amorim

I get the following error when trying to generate a log using your provided flags:

Error parsing option log-level (option not found)
Setting commandline option --log-level=log.txt failed.

Here's my .json:

[
    {
        "alang": "jpn",
        "slang": ["eng"],
        "blacklist": ["signs", "songs"],
        "whitelist": ["commie"]
    },
    {
        "alang": "jpn",
        "slang": ["enm", "eng"],
        "blacklist": ["signs", "songs"],
        "whitelist": ["honorifics"]
    },
    {
        "alang": "jpn",
        "slang": ["enm", "eng"],
        "blacklist": ["signs", "songs", "translation only", "sdh", "chihiro"]
    },
    {
        "alang": "jpn",
        "slang": ["eng", "default"]
    },
    {
        "alang": "gre",
        "slang": "no"
    },
    {
        "alang": "eng",
        "slang": ["forced", "no"]
    },
    {
        "alang": "*",
        "slang": "eng",
        "blacklist":["sdh"]
    },
    {
        "alang":"*",
        "slang":"eng"
    }
]

Oh and sorry for the delay!

george-emerald avatar Aug 21 '24 11:08 george-emerald

Sorry, I gave the wrong command, it should have been --msg-level=sub_select='trace' --log-file=log.txt.

CogentRedTester avatar Aug 31 '24 05:08 CogentRedTester

Anyway I think I have replicated the issue. Can you try the latest version of the script and see if it's working now?

CogentRedTester avatar Aug 31 '24 06:08 CogentRedTester