Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't call method "generate_preview_link" #1

Open
aliw77 opened this issue Jan 30, 2021 · 6 comments
Open

Can't call method "generate_preview_link" #1

aliw77 opened this issue Jan 30, 2021 · 6 comments

Comments

@aliw77
Copy link

aliw77 commented Jan 30, 2021

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
Copy link
Contributor

iafan commented Feb 1, 2021

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
Copy link
Author

aliw77 commented Feb 2, 2021

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
Copy link
Contributor

iafan commented Feb 2, 2021

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
Copy link
Author

aliw77 commented Feb 2, 2021

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
Copy link
Author

aliw77 commented Feb 3, 2021

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
Copy link
Contributor

iafan commented Feb 3, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants