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

Change Map to List to use the same command option multiple times #172

Merged
merged 2 commits into from
Aug 7, 2022

Conversation

JunkFood02
Copy link
Collaborator

Close #170

@p3g4asus
Copy link
Collaborator

p3g4asus commented Aug 7, 2022

This modification is indeed needed to use the same option more than once but would it be more efficient and less battery consuming using a Map<Sring,ArrayList<String>>? It would avoid some for loops. What do you think?

@JunkFood02
Copy link
Collaborator Author

This modification is indeed needed to use the same option more than once but would it be more efficient and less battery consuming using a Map<Sring,ArrayList<String>>? It would avoid some for loops. What do you think?

After some testing, it turns out that we need to also add the option, not only the args to the command.

yt-dlp https://youtu.be/nBwT2Sgb1yY -x --parse-metadata "%(uploader|)s:%(meta_artist)s" --parse-metadata "%(title)s:%(meta_title)s" --add-metadata

  • Ok

yt-dlp https://youtu.be/nBwT2Sgb1yY -x --parse-metadata "%(uploader|)s:%(meta_artist)s" "%(title)s:%(meta_title)s" --add-metadata

  • This throws an error

@JunkFood02
Copy link
Collaborator Author

Oh, I got what you mean. ArrayList looks nice! I'll make the modifications soon

@JunkFood02
Copy link
Collaborator Author

A little more complicated than I thought. Please take another look @p3g4asus

unhandled null pointer
@p3g4asus p3g4asus merged commit 814cc4e into yausername:master Aug 7, 2022
@JunkFood02 JunkFood02 deleted the option_list branch December 1, 2024 17:37
JunkFood02 pushed a commit that referenced this pull request Dec 1, 2024
Change Map to List to use the same command option multiple times
JunkFood02 pushed a commit that referenced this pull request Dec 1, 2024
Change Map to List to use the same command option multiple times
JunkFood02 pushed a commit to JunkFood02/youtubedl-android that referenced this pull request Dec 1, 2024
Change Map to List to use the same command option multiple times
JunkFood02 pushed a commit to JunkFood02/youtubedl-android that referenced this pull request Dec 1, 2024
Change Map to List to use the same command option multiple times
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.

Change Map to List to use the same command option multiple times
2 participants