Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
picard
bonusdisc.py
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bonusdisc.py of Package picard
# -*- coding: utf-8 -*- PLUGIN_NAME = 'Bonus Disc' PLUGIN_AUTHOR = 'Jan van Thiel' PLUGIN_DESCRIPTION = '''Based on a script by Lukas Lalinsky.<br/> <br/> Moves bonus disc and bonus disc titles from album titles to separate tags. For example:<br/> <em>"Sleeping With Ghosts (bonus disc: Covers)"</em> <ul> <li>album = <em>"Sleeping With Ghosts"</em></li> <li>bonusdisc = <em>"bonus"</em></li> <li>bonusdisctitle = <em>"Covers"</em></li> </ul>''' PLUGIN_VERSION = "0.1" PLUGIN_API_VERSIONS = ["0.9.0", "0.10"] from picard.metadata import register_album_metadata_processor import re _bonusdisc_re = re.compile(r"\s+\(bonus disc(?::\s+([^)]+))?\)") def remove_bonusdiscs(tagger, metadata, release): matches = _bonusdisc_re.search(metadata["album"]) if matches: metadata["bonusdisc"] = "bonus" if matches.group(1): metadata["bonusdisctitle"] = matches.group(1) metadata["album"] = _bonusdisc_re.sub('', metadata["album"]) register_album_metadata_processor(remove_bonusdiscs)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor