Mercurial > vixm
annotate vixm/song.py @ 21:dfcf1a46fc56 v0.20
Added GPLv2 file & copyright headers
author  Josef "Jeff" Sipek <jeffpc@josefsipek.net> 

date  Sun, 20 Aug 2006 12:30:19 0400 
parents  ae3451bedeb6 
children  860c891de6bb 
rev  line source 

21
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

1 # song.py  song class 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

2 # 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

3 # Copyright (C) 2006 Josef "Jeff" Sipek <jeffpc@josefsipek.net> 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

4 # 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

5 # This program is free software; you can redistribute it and/or modify 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

6 # it under the terms of the GNU General Public License version 2 as 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

7 # published by the Free Software Foundation. 
dfcf1a46fc56
Added GPLv2 file & copyright headers
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
15
diff
changeset

8 
1
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

9 import xmms 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

10 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

11 class song(dict): 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

12 def __init__(self, pos): 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

13 self["file"] = xmms.control.get_playlist_file(pos) 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

14 self["time"] = xmms.control.get_playlist_time(pos) 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

15 self["pos"] = pos 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

16 self["title"] = xmms.control.get_playlist_title(pos) 
6c5b9827b117
Trivial definition of a song class
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
diff
changeset

17 
15
ae3451bedeb6
Implemented playlist searching
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
1
diff
changeset

18 def __str__(self): 
ae3451bedeb6
Implemented playlist searching
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
1
diff
changeset

19 return self["title"] 