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

Export plugin can now export path from library. #3084

Merged
merged 1 commit into from
Dec 1, 2018

Conversation

domenn
Copy link
Contributor

@domenn domenn commented Nov 28, 2018

Exports path (file path) if specified in fields to export (with -i parameter). Only when exporting library fields, because file tags don't contain path. Info works as before. Path won't be displayed in the list even if user provides it in parameters.

beetsplug/info.py Outdated Show resolved Hide resolved
beetsplug/info.py Outdated Show resolved Hide resolved
@jackwilsdon
Copy link
Member

I didn't mean to reference this PR in #3085, oops!

@domenn
Copy link
Contributor Author

domenn commented Nov 28, 2018

Ok. I see I need to better check the guidelines next time.
Do you like better if I submit changes as new commit or amend current one, to reduce number of commits for small changes like this one?

@jackwilsdon
Copy link
Member

jackwilsdon commented Nov 28, 2018

I personally prefer amending the current commit (it leads to a cleaner history IMO), but it's up to you 👍 I'm going to leave the rest of this PR to someone else as I'm not familiar enough with what it's changing.

…ed as field to export. Info plugin behaviour is unchanged.
@domenn
Copy link
Contributor Author

domenn commented Nov 28, 2018

I agree. Not sure yet how this is usually done. So I asked.
Changes pushed.

@@ -239,4 +240,5 @@ def filter_(data):


def identity(val):
val.pop('path', None) # path is fetched from item
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little odd to call this function identity when it's not really an identity function. 😃 I'm going to fiddle around with this a little bit…

@sampsyo
Copy link
Member

sampsyo commented Dec 1, 2018

OK, merged with a small refinement in the below commit. Let me know if anything looks wrong, please!

@sampsyo sampsyo merged commit 5de3ee9 into beetbox:master Dec 1, 2018
sampsyo added a commit that referenced this pull request Dec 1, 2018
Export plugin can now export path from library.
sampsyo added a commit that referenced this pull request Dec 1, 2018
@domenn
Copy link
Contributor Author

domenn commented Dec 2, 2018

Thanks. I will check within two days and let you know if there are problems.

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.

3 participants