Skip to content

Conversation

@AndreiVernon
Copy link

I added a new url option for the use_titles option in the config.

When use_titles=url is set, the script will only display titles for web entries (e.g., YouTube or Vimeo URLs) and fall back to filenames for everything else. It leverages the fact that the config options are set as strings, so this shouldn't break existing configs. I also changed the default config file to make the options for this more clear.

Decided to add this because I use no so I can see the specific filenames of items, but when I do that, Youtube URLs offer absolutely no info.

I saw what was said in #12, so I made sure that this change is based on the script's already existing logic for determining the protocol. So far, I only have it set to detect ytdl, http, and https as URLs. More protocols can easily be added to the list if necessary. And if you think the use of the term "URL" is too liberal (since that could refer to FTP too) I can always change the variable and setting names to "web" or something instead.

One other change I could make is to update every other call of path_info() to include the is_url variable. That would make it clearer what the outputs of the function are for future maintainers.

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

Successfully merging this pull request may close these issues.

1 participant