1 | * This is a scrap todo file while the new IPP server based Gutenbach is |
---|
2 | * being developed. Once this branch is released and becomes master, |
---|
3 | * items in this file will be merged into the Trac. |
---|
4 | |
---|
5 | - finish implementing a bunch of the IPP handlers |
---|
6 | [ ] print job |
---|
7 | [ ] validate job |
---|
8 | [ ] pause printer |
---|
9 | [ ] resume printer |
---|
10 | [ ] set printer attributes |
---|
11 | [ ] send uri |
---|
12 | [ ] set job attributes |
---|
13 | [ ] restart job |
---|
14 | [ ] promote job |
---|
15 | [ ] cups get document |
---|
16 | |
---|
17 | - add support in printer.py for: |
---|
18 | [ ] print job |
---|
19 | [ ] validate job |
---|
20 | [x] pause printer |
---|
21 | [x] resume printer |
---|
22 | [\] set printer attributes |
---|
23 | [\] send uri |
---|
24 | [\] set job attributes |
---|
25 | [X] restart job |
---|
26 | [\] promote job |
---|
27 | |
---|
28 | - add support in job.py for: |
---|
29 | [X] restart job |
---|
30 | [x] resume job |
---|
31 | |
---|
32 | - finish test cases for printer.py |
---|
33 | - write test cases for requests.py |
---|
34 | - write convenience client-side API |
---|
35 | - write test cases for future client API |
---|
36 | - all the documentation |
---|
37 | - deal with all the code marked 'XXX' |
---|
38 | - setuptools entry points for notification system (e.g. zephyr) |
---|
39 | - check test case coverage ( http://nedbatchelder.com/code/coverage/ ) |
---|
40 | - deal with queue management/reordering |
---|
41 | - add support for volume management |
---|
42 | - make sure all CUPS commands are compatible |
---|
43 | - rewrite gbr/gbq/etc. scripts to use client API |
---|
44 | - rewrite server-side queue display to use API |
---|
45 | - support authentication/security |
---|
46 | - why doesn't the bug tracker work?! relatedly, figure out a |
---|
47 | solution that makes it easier for non-MIT developers to contribute |
---|
48 | |
---|
49 | Ponies |
---|
50 | - gapless playback |
---|
51 | - display video |
---|
52 | - youtube |
---|
53 | - pandora |
---|
54 | - last.fm |
---|
55 | - local streaming |
---|
56 | - generic streaming |
---|
57 | - zephyr control (e.g. youtube link) |
---|
58 | |
---|
59 | Tickets that should be fixed by this new version: |
---|
60 | [ ] http://gutenbach.mit.edu/ticket/21 |
---|
61 | [ ] http://gutenbach.mit.edu/ticket/2 |
---|
62 | [ ] http://gutenbach.mit.edu/ticket/7 |
---|
63 | [ ] http://gutenbach.mit.edu/ticket/39 |
---|
64 | [ ] http://gutenbach.mit.edu/ticket/47 |
---|
65 | [ ] http://gutenbach.mit.edu/ticket/48 |
---|
66 | [ ] http://gutenbach.mit.edu/ticket/8 |
---|
67 | [ ] http://gutenbach.mit.edu/ticket/34 |
---|
68 | [x] http://gutenbach.mit.edu/ticket/38 |
---|
69 | [ ] http://gutenbach.mit.edu/ticket/41 |
---|
70 | [ ] http://gutenbach.mit.edu/ticket/18 |
---|
71 | |
---|
72 | === CONSIDERATIONS FOR MPD === |
---|
73 | |
---|
74 | We are considering using MPD (the Music Player Daemon) for playback, instead |
---|
75 | of mplayer. This gives us a pony (gapless playback), and makes some other |
---|
76 | things, like keeping track of the queue, much easier. There is a lot of work |
---|
77 | needed to make this work, though. |
---|
78 | |
---|
79 | THIS ADDS A DEPENDENCY: python-mpd |
---|
80 | |
---|
81 | We will have to re-implement all the functions in jobs.py, and completely |
---|
82 | re-structure player.py |
---|
83 | |
---|
84 | If we want video playback eventually (and we do), there will be some hackery |
---|
85 | involved. We will pause mpd playback, do the video playback completely |
---|
86 | separately, and then resume mpd playback. |
---|
87 | |
---|
88 | Some almost-pseudocode: |
---|
89 | |
---|
90 | startup: |
---|
91 | client = MPDClient() |
---|
92 | client.connect(**{'host':'/var/run/mpd/socket', 'port':'6600'}) |
---|
93 | |
---|
94 | adding a song to the queue: |
---|
95 | Receive job |
---|
96 | Put it into a file [gutenbach/FILENAME] |
---|
97 | Tell MPD to add it to the queue [client.addid('gutenbach/FILENAME')] |
---|
98 | Find out what the id is |
---|
99 | Store all the data [including the temporary filename] |
---|
100 | IF WE ARE SUPPOSED TO BE PLAYING, MAKE SURE WE *ARE* PLAYING |
---|
101 | In particular, if the queue was empty, start playback [gutenbach.play()] |
---|
102 | |
---|
103 | when a job completes playing: |
---|
104 | Remove the file [rm gutenbach/FILENAME] |
---|
105 | |
---|
106 | getting the queue: |
---|
107 | get playlist, parse return [client.playlistid()] |
---|
108 | |
---|
109 | removing a job: |
---|
110 | dequeue it [client.deleteid('NUMBER')] |
---|
111 | remove the file |
---|
112 | tell them what you did |
---|
113 | |
---|
114 | restart song: |
---|
115 | client.seek(0,1) [0% through song 1...] |
---|
116 | |
---|