~ubuntu-branches/ubuntu/karmic/quodlibet/karmic

« back to all changes in this revision

Viewing changes to formats/spc.py

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2009-01-30 23:55:34 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090130235534-l4e72ulw0vqfo17w
Tags: 2.0-1ubuntu1
* Merge from Debian experimental (LP: #276856), remaining Ubuntu changes:
  + debian/patches/40-use-music-profile.patch:
    - Use the "Music and Movies" pipeline per default.
* Refresh the above patch for new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2007 Joe Wreschnig
2
 
#
3
 
# This program is free software; you can redistribute it and/or modify
4
 
# it under the terms of the GNU General Public License version 2 as
5
 
# published by the Free Software Foundation
6
 
#
7
 
# $Id: spc.py 4047 2007-04-30 03:49:58Z piman $
8
 
 
9
 
import os
10
 
 
11
 
import gst
12
 
 
13
 
from formats._audio import AudioFile
14
 
 
15
 
extensions = [".spc"]
16
 
 
17
 
if gst.registry_get_default().find_plugin("spcdec") is None:
18
 
    extensions = []
19
 
 
20
 
class SPCFile(AudioFile):
21
 
    format = "SPC700 DSP Data"
22
 
 
23
 
    def __init__(self, filename):
24
 
        self["~#length"] = 0
25
 
        self.sanitize(filename)
26
 
 
27
 
    def sanitize(self, filename):
28
 
        super(SPCFile, self).sanitize(filename)
29
 
        self["title"] = os.path.basename(self["~filename"])[:-4]
30
 
 
31
 
    def write(self):
32
 
        pass
33
 
 
34
 
    def can_change(self, k=None):
35
 
        if k is None: return ["artist"]
36
 
        else: return k == "artist"
37
 
 
38
 
info = SPCFile