mirror of
https://github.com/beetbox/beets.git
synced 2026-01-06 07:53:40 +01:00
merge
This commit is contained in:
commit
3c7cfe1820
2 changed files with 50 additions and 0 deletions
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
# general hidden files/directories
|
||||
|
||||
.DS_Store
|
||||
.sconsign*
|
||||
.svn
|
||||
|
||||
# file patterns
|
||||
|
||||
*.dylib
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.so
|
||||
*.tar.gz
|
||||
*.tar.bz2
|
||||
*~
|
||||
*.project
|
||||
*.pydevproject
|
||||
|
||||
# Project Specific patterns
|
||||
|
||||
dist/*
|
||||
beets.egg-info/*
|
||||
build/*
|
||||
docs/_build/*
|
||||
|
||||
|
|
@ -945,6 +945,27 @@ class MediaFile(object):
|
|||
return self.mgfile.info.length
|
||||
|
||||
@property
|
||||
def samplerate(self):
|
||||
if hasattr(self.mgfile.info, 'sample_rate'):
|
||||
# Reasonably sure from checking mutagen source that all
|
||||
# formats will return this information
|
||||
return self.mgfile.info.sample_rate
|
||||
|
||||
@property
|
||||
def bitdepth(self):
|
||||
if hasattr(self.mgfile.info, 'bits_per_sample'):
|
||||
# Reasonably sure from checking mutagen source that all
|
||||
# formats will return this information
|
||||
return self.mgfile.info.bits_per_sample
|
||||
|
||||
@property
|
||||
def channels(self):
|
||||
if hasattr(self.mgfile.info, 'channels'):
|
||||
# Reasonably sure from checking mutagen source that all
|
||||
# formats will return this information
|
||||
return self.mgfile.info.channels
|
||||
|
||||
@property
|
||||
def bitrate(self):
|
||||
if hasattr(self.mgfile.info, 'bitrate'):
|
||||
# Many formats provide it explicitly.
|
||||
|
|
|
|||
Loading…
Reference in a new issue