Python script that launches MPV
Question: I wrote a python script to make the use of mpv easier (cim is the title).

Here's the script:

    
    
    from sh import mpv
    cim=input("Cím: ")
    a=int(input("with start(1) | without start (2) "))
    b=int(input("with sub (1) | without sub(2) "))
    if a == 1:
        #w/ start
        c=input("xx:yy:zz : ")
        if b == 1:
            #w/ sub
            sh.mpv(cim,"--sub-file=",d,"start=",c)
    
    
        elif b == 2:
            #w/ sub
            sh.mpv(cim,"start=",c)
    
    elif a == 2:
        #nincs start
        if b == 1:
            #w/ sub
            d=input("sub: ")
            sh.mpv(cim,"--sub-file=",d)
    
        if b == 2:
            sh.mpv(cim)
    

When i try to run it:

    
    
    RAN: 
    '/usr/bin/mpv Red Museum.avi --sub-file= eng.srt'
    
    STDOUT:
    Error parsing option sub-file (option requires parameter)
    Setting commandline option --sub-file= failed.
    


Answer: The problem appears to be the extra space between `--sub-file=` and `eng.srt`.
You could fix it by removing the `=` so that `mpv` expects them to be
separated by a space. i.e. replace the line

    
    
    sh.mpv(cim,"--sub-file=",d)
    

with

    
    
    sh.mpv(cim,"--sub-file", d)
    

* * *

If that doesn't work you could get rid of the extra space by using a string
concatenation:

    
    
    sh.mpv(cim,"--sub-file=" + d)
    

