File: play_with_ipod_api.py

package info (click to toggle)
libgpod 0.8.2-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,532 kB
  • sloc: ansic: 26,876; sh: 11,215; cs: 1,399; python: 1,251; makefile: 472; cpp: 296; xml: 100
file content (21 lines) | stat: -rwxr-xr-x 292 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python

import gpod
import sys

if len(sys.argv) > 1:
    db = gpod.Database(sys.argv[1])
else:
    db = gpod.Database()


print db

for track in db[4:20]:
    print track
    print track['title']

for pl in db.Playlists:
    print pl
    for track in pl:
        print " ", track