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