mirror of
https://github.com/beetbox/beets.git
synced 2026-01-01 13:33:02 +01:00
cleaned up gratuitous comment blocks and unnecessary shebang lines
--HG-- extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%404
This commit is contained in:
parent
fb63de437c
commit
2651b1c2b5
5 changed files with 6 additions and 36 deletions
|
|
@ -1,2 +1 @@
|
|||
#!/usr/bin/env python
|
||||
from beets.library import Library
|
||||
from beets.library import Library
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
import sqlite3, os, sys, operator
|
||||
from beets.tag import MediaFile, FileTypeError
|
||||
from string import Template
|
||||
|
|
@ -35,11 +34,6 @@ class LibraryError(Exception):
|
|||
|
||||
|
||||
|
||||
|
||||
##############
|
||||
#### ITEM ####
|
||||
##############
|
||||
|
||||
class Item(object):
|
||||
def __init__(self, values, library=None):
|
||||
self.library = library
|
||||
|
|
@ -185,10 +179,6 @@ class Item(object):
|
|||
|
||||
|
||||
|
||||
#################
|
||||
#### LIBRARY ####
|
||||
#################
|
||||
|
||||
class Library(object):
|
||||
def __init__(self, path='library.blb'):
|
||||
self.path = path
|
||||
|
|
@ -260,4 +250,3 @@ class Library(object):
|
|||
def save(self):
|
||||
"""Writes the library to disk (completing a sqlite transaction)."""
|
||||
self.conn.commit()
|
||||
|
||||
25
beets/tag.py
25
beets/tag.py
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python
|
||||
"""Handles low-level interfacing for files' tags. Wraps mutagen to
|
||||
automatically detect file types and provide a unified interface for the
|
||||
specific tags Beets is interested in."""
|
||||
|
|
@ -15,13 +14,7 @@ class FileTypeError(IOError):
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###########################
|
||||
#### UTILITY FUNCTIONS ####
|
||||
###########################
|
||||
# For dealing with the sort of weirdnesses we find in metadata fields.
|
||||
#### utility functions ####
|
||||
|
||||
def fromslashed(slashed, sep=u'/'):
|
||||
"""Extract a pair of items from a slashed string. If only one
|
||||
|
|
@ -84,10 +77,6 @@ def normalize_pair(pair, noneval=None):
|
|||
|
||||
|
||||
|
||||
###############################
|
||||
#### MediaField descriptor ####
|
||||
###############################
|
||||
|
||||
class MediaField(object):
|
||||
"""A descriptor providing access to a particular (abstract) metadata
|
||||
field. The various messy parameters control the translation to concrete
|
||||
|
|
@ -295,11 +284,6 @@ class MediaField(object):
|
|||
|
||||
|
||||
|
||||
|
||||
#########################
|
||||
#### MediaFile class ####
|
||||
#########################
|
||||
|
||||
class MediaFile(object):
|
||||
"""Represents a multimedia file on disk and provides access to its
|
||||
metadata."""
|
||||
|
|
@ -318,9 +302,8 @@ class MediaFile(object):
|
|||
def save_tags(self):
|
||||
self.tags.save()
|
||||
|
||||
###########################
|
||||
#### FIELD DEFINITIONS ####
|
||||
###########################
|
||||
|
||||
#### field definitions ####
|
||||
|
||||
title = MediaField('TIT2', "\xa9nam")
|
||||
artist = MediaField('TPE1', "\xa9ART")
|
||||
|
|
@ -357,4 +340,4 @@ class MediaFile(object):
|
|||
comp = MediaField('TCMP', 'cpil',
|
||||
id3style=MediaField.STYLE_BOOLEAN,
|
||||
mp4type=MediaField.TYPE_BOOLEAN,
|
||||
mp4style=MediaField.STYLE_BOOLEAN)
|
||||
mp4style=MediaField.STYLE_BOOLEAN)
|
||||
|
|
|
|||
1
bts.py
1
bts.py
|
|
@ -44,4 +44,3 @@ command is one of: add, remove, update, write, list, help"""
|
|||
|
||||
# no command matched
|
||||
op.error('invalid command "' + cmd + '"')
|
||||
|
||||
|
|
@ -132,4 +132,4 @@ def suite():
|
|||
return s
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
|
|
|
|||
Loading…
Reference in a new issue