exebetche / vlsub

VLC extension to download subtitles from opensubtitles.org
1.34k stars 345 forks source link

vlsub not loading subtitles from compressed files #212

Open Reverend-Jim opened 6 years ago

Reverend-Jim commented 6 years ago

When subtitles are downloaded by vlsub as srt files they load immediately into vlc and display properly. However, I am seeing, more and more, that subtitles are being downloaded as compressed (typically .gz) files. Unfortunately this seems to screw up the process. I suspect that in the first case the process is

  1. vlsub downloads the srt file and renames it to match the current video file name

but in the second case

  1. vlsub downloads the .gz file
  2. then creates the destination .srt file
  3. vlc opens the .srt file
  4. vlsub opens the .gz file and reads the .srt text
  5. vlsub tries to write the text to the destination .srt file
  6. and fails (quietly) because the file is locked by vlc

If this is the case then I suggest

  1. vlsub downloads the .gz file
  2. then creates a temporary file
  3. extracts the .srt text from the compressed file
  4. saves it to the temp file
  5. then renames .tmp to the final .srt name
thanhl94 commented 6 years ago

VLC 3.0.2 included VLSub 0.11, worked now :)

Stanojoski commented 4 years ago

I have the same issue. I see the .gz file in the movie folder. The .srt file is 0 bytes. I am using VLC 3.0.8 Is there a fix for this?