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

New plugin: freedesktop #1056

Merged
merged 12 commits into from Nov 3, 2014
Merged

New plugin: freedesktop #1056

merged 12 commits into from Nov 3, 2014

Conversation

kerobaros
Copy link
Collaborator

Currently, all this plugin does is create a ".directory" file in the root of a queried album, matching issue #707. I plan to make it run as part of the import procedure, if configured.

The .directory file only contains the "Icon" key. I'm not too familiar with this fdo standard, are there any other useful keys that can be written into the file?

@sampsyo
Copy link
Member

sampsyo commented Nov 2, 2014

Very cool! Thanks for putting this together; I'm sure people will be interested in this.

You're right that an auto mode would be good to have. You could consider hooking into the album_imported event hook—or even item_moved or item_copied if you want this to work outside of the import process.

Also, would you mind drafting a quick documentation page for this plugin? It shouldn't need to be too complex. 😃

Here's the spec listing the available fields for .desktop files—I don't see much that would be useful outside of Icon.

@kerobaros
Copy link
Collaborator Author

Alright, working as expected and passing Travis. That should satisfy issue #707; any opposition?

@sampsyo
Copy link
Member

sampsyo commented Nov 3, 2014

This looks perfect. Thanks again! ✨

kerobaros added a commit that referenced this pull request Nov 3, 2014
@kerobaros kerobaros merged commit 421fac3 into beetbox:master Nov 3, 2014
sampsyo added a commit that referenced this pull request Nov 3, 2014
This lets us use `self.config`. The previous version, which checked
`beets.config['auto']`, was looking in the wrong scope.
sampsyo added a commit that referenced this pull request Nov 3, 2014
@sampsyo
Copy link
Member

sampsyo commented Nov 3, 2014

I actually found and fixed one small problem (see above): using beets.config['auto'] was looking for a top-level "auto" option. This variant uses a method inside the plugin class to get access to self.config, which looks inside the freedesktop: section.

I also fiddled with the style just a little bit.

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

2 participants