-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support for DSF files #2379
Support for DSF files #2379
Conversation
Awesome! This looks good so far. Would you mind also adding a test file to Also, one thing we've done in the past for Mutagen dependencies is to use feature detection. That way we can release a beets version with the new support before the code is even merged into Mutagen. That's not necessary, of course—if the Mutagen side is ready soon, we can just bump our version number requirement. |
I did add the requested tests to Regarding the feature detection: where would I have to look for more details on how that works? |
Things look great so far! I'll check out the test now. For this particular extension, I actually don't know if any code is necessary at all to maintain compatibility. I don't think the For the tests, we might do something like: try:
import mutagen.dsf
except:
HAVE_DSF = True
else:
HAVE_DSF = False followed by |
@@ -77,6 +78,7 @@ | |||
'mpc': 'Musepack', | |||
'asf': 'Windows Media', | |||
'aiff': 'AIFF', | |||
'dsf': 'DSD Stream File', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's not quite the expansion of the acronym, but maybe "DSD Stream" or even just "DSD" would better match the other short names we have here, none of which have a "file" or "audio" suffix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there is also DSDIFF. Although it doesn't support tags, it might be valuable to be as precise as possible here. But if you want me to change that, I'll happily do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arg, you're right—it's weird that there are competing standards here. But I agree in that case; let's keep the full name.
8b621c9
to
1e10e62
Compare
For the >>> mutagen.File('test/rsrc/unparseable.mp3')
{'TDRC': TDRC(encoding=<Encoding.UTF8: 3>, text=[u''])} It looks like the current test file has no tags at all: >>> mutagen.File('test/rsrc/unparseable.dsf')
{} Maybe the test file should just use the same empty-string frame as the MP3? I realize this is confusing and poorly documented—I'm going to add some comments to the source now to make this more intelligible. |
Ok, I've "fixed" the |
- Fixed unparseable.dsf - Added DSF feature detection to test_mediafile.py
abfcf25
to
e0a4dc6
Compare
And let me know if you want me to rebase everything into one commit before merging the PR... |
There isn't currently an `image.dsf`, so those tests fail.
Looks great; thanks! I merged this and did some tests locally, so we should be good to go. I had to turn off the image tests because there isn't an |
I do have the |
This sounds a bit ambivalent, but I'll leave that up to you—if you think there's anything that might be revealed about the DSF format with images (e.g., when tags get much larger than in the plain-text case), then let's do it. But if you think it's totally redundant with the MP3 tests, there's no need. |
Ok. Let's keep it the way it is then. |
Sounds good! Thank you again for all your work on this. ✨ |
Adds support for DSF Files to beets, based on the work in quodlibet/mutagen#283. This should resolve #459.
Although this works locally, I am not sure if this is all that needs to be done. So please review and let me know if there will be additional changes required.
Please do not merge before quodlibet/mutagen#283 has been accepted.