loctools / title

Title: Timed Text Localization Engine
MIT License
3 stars 1 forks source link

Can't call method "generate_preview_link" #1

Open aliw77 opened 3 years ago

aliw77 commented 3 years ago

Hi, trying to get title to do its magic, getting the following error on a VTT file that I have downloaded from vimeo:

Creating directory /home/azureuser/serge/smartcat-serge-bootstrap/vcs/rev-transcript/vcs/.title/452659481.en.vtt
Creating file /home/azureuser/serge/smartcat-serge-bootstrap/vcs/rev-transcript/vcs/.title/452659481.en.vtt/config.json
Reading config file /home/azureuser/serge/smartcat-serge-bootstrap/vcs/rev-transcript/vcs/.title/452659481.en.vtt/config.json
Reading source file /home/azureuser/serge/smartcat-serge-bootstrap/vcs/rev-transcript/vcs/452659481.en.vtt
Saving meta output to /home/azureuser/serge/smartcat-serge-bootstrap/vcs/rev-transcript/vcs/.title/452659481.en.vtt/452659481.en.meta
Can't call method "generate_preview_link" on an undefined value at /home/azureuser/serge/title/bin/../lib/Title/Command/parse.pm line 151.
iafan commented 3 years ago

Most likely you don't have videoID parameter specified in your config.json file. Can you share the list of commands that you used, and how your .title/452659481.en.vtt/config.json file looks like?

aliw77 commented 3 years ago

You are correct, the videoID parameter is missing in the json file:

less .title/452659481.en.vtt/config.json
{
    "locjsonFileComments": []
}

I have a folder with vtt files pre-downloaded (Video is publicly playable, but for some reason the import wasn't able to download the vtt files)

Commands

title enable ./452659481.en.vtt

iafan commented 3 years ago

I guess I'll need to research this further, but meanwhile, can you try updating your config file to the following:

{
    "locjsonFileComments": [],
    "platform": "Vimeo",
    "videoId": "452659481"
}

(assuming 452659481 is the video ID)

aliw77 commented 3 years ago

Yes this worked! i was able to get locjson and meta files in the folder. I see that serge has a parser for locjson. So this should work. Now just need to figure out why the downloaded VTT file didn't work with the "enable" parameter.

aliw77 commented 3 years ago

Hi @iafan - should I create the .title/file.vtt/config.json file manually for now for the subtitle files? as I'm not sure why the import didn't work for me, even though its a public vimeo video.

iafan commented 3 years ago

Yes, please. Should be an easy step to do if import doesn't work. Just let me know if import doesn't work for Vimeo at all, or for specific videos only. I'll take a look at the core issue once I have some time.