File: playlist.py

package info (click to toggle)
lastfmproxy 1.3b-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 240 kB
  • ctags: 75
  • sloc: python: 1,015; sh: 109; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

import xspf

class playlist:

    def __init__(self, string = None):

        self.pos = 0
        self.data = None

        if string:
            self.parse(string)

    def parse(self, string):
       
        self.data = xspf.XSPFParser()
        self.data.parseBuff(string)
        self.pos = 0

        # debug
        #for t in self.data.tracks:
        #    print "* " + t["creator"] + " - " + t["title"]