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

Add option to only display titles for web entries #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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.

None yet

1 participant