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

Transcripts folder can't be empty #52

Closed
shirgoldbird opened this issue Aug 30, 2021 · 0 comments
Closed

Transcripts folder can't be empty #52

shirgoldbird opened this issue Aug 30, 2021 · 0 comments

Comments

@shirgoldbird
Copy link

shirgoldbird commented Aug 30, 2021

Transcripts will not appear if the following option in comic_info.ini does not have a value:

Transcripts folder =

(Note, this is how it's set in the default comic_git build.)

This problem is caused by this bit of build_site.py:

transcripts_dir = get_option(
        comic_info, "Transcripts", "Transcripts folder", default=f"your_content/{comic_folder}comics"
    )

get_option returns an empty string instead of the default value, because if comic_info.has_option(section, option) evaluates to true (as the comic_info.ini file does have both a "Transcripts" section and a "Transcripts folder" option. But the code doesn't check to make sure a value is actually set, so it returns the empty string/null value that is there.

This can be fixed by removing the Transcripts folder= line entirely, or by adding another check to the get_option function to make sure properties have a non-null value, and returning the default if not.

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