« get me outta code hell

todo.txt - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/todo.txt
blob: f4bd4fd40cbb5dc8037508c9e90210fb430c219f (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
TODO: Get `avconv` working. Oftentimes `play` won't be able to play
      some tracks due to an unsupported format; we'll need to use
      `avconv` to convert them (to WAV).
      (Done!)

TODO: Get `play` working.
      (Done!)

TODO: Get play-next working; probably just act like a shuffle. Will
      need to keep an eye out for the `play` process finishing.
      (Done!)

TODO: Preemptively download and process the next track, while the
      current one is playing, to eliminate the silent time between
      tracks.
      (Done!)

TODO: Delete old tracks! Since we aren't overwriting files, we
      need to manually delete files once we're done with them.
      (Done!)

TODO: Get library filter path from stdin.
      (Done!)

TODO: Show library tree. Do this AFTER filtering, so that people
      can e.g. see all albums by a specific artist.
      (Done!)

TODO: Ignore .DS_Store.
      (Done!)

TODO: Have a download timeout, somehow.

TODO: Fix the actual group format. Often times we get single-letter
      files being downloaded (which don't exist); I'm guessing that's
      related to folder names (which are just strings, not title-href
      arrays) still being in the group array. (Update: that's defin-
      itely true; 'Saucey Sounds'[0] === 'S', and 'Unofficial'[0]
      === 'U', which are the two "files" it crashes on while playing
      -g 'Jake Chudnow'.)
      (Done!)

TODO: A way to exclude a specific group path.
      (Done!)

TODO: Better argv handling.
      (Done!)

TODO: Option to include a specific path from the source playlist.
      (Done!)

TODO: Make a playlist generator that parses http://billwurtz.com
      instrumentals.html.
      (Done!)

TODO: Make crawl-itunes.js a bit more general, more command-line
      friendly (i.e. don't require editing the script itself), and
      make it use the getHTMLLinks function defined in the new
      crawl-links.js script.
      (Done!)

TODO: Play-in-order track picker.
      (Done!)

TODO: Volume controls. Who knows how to do this? It might have to be an
      argument passed to `play`. Being able to change the volume while it's
      playing would be nice, but I'm not sure if that's really possible.
      (Done! - To the greatest current ability.)

TODO: Tempfiles, maybe?
      (Done!)

TODO: Use NOT the internet as its source, so that it's a bit more general
      purpose. This would only take adding a new downloader.
      (Done!)

TODO: Recursive local file playlist crawler.
      (Done!)

TODO: *Requiring* a literal `playlist.json` file doesn't seem quite right,
      especially since there's the `--open` option.
      (Done!)

TODO: Make local downlaoder sort more natural - that is, 10 comes immediately
      after 9, not 1. (1, 5, 9, 10, 12; not 1, 10, 12, 5, 9.)
      (Done!)

TODO: Make a way to skip tracks while playing. Currently the only way is to
      kill and restart the http-music process; this is bad for numerous
      reasons, particularly because it gets rid of the pre-downloaded track and
      forces the user to wait for another one to be downloaded.
      (Done!)

TODO: Make a --help/-h/-? option that directs helpless users to the man page.
      (Done!)

TODO: Make a way to write the current playlist to a file. I think just renaming
      the debug-playlist-log option could work, since you could pipe that to a
      file through your shell.
      (Done!)

TODO: Figure out a less "hacky" way to kill the process. Ideally we shouldn't
      have to handle ^C and ^D ourselves; for instance right now ^Z is actually
      broken, since we aren't using the shell's normal way of handling any
      keyboard controls such as those!

TODO: Separate the code in loop-play.js to be a bit nicer.
      (Done!)

TODO: Cleaning up http-music.js would be nice as well!

TODO: A way to kill the up-next song.
      (Done!)

TODO: A way to see information about the currently playing song, as well as
      the up-next song.
      (Done!)

TODO: A way to see the previously played songs, and to skip back (or forwards).

TODO: Exit on loop-play end. (Since it listens to stdin for input right now,
      it won't automatically stop.)

TODO: Figure out how to attempt to avoid being forced to convert every file..
      converting a 10MB MP3 into an 80MB WAV is never good, even if we're
      storing it as a tempfile!
      (Done!)

TODO: Let playlist filter match things lowercase. '72 Minutes Of Fame' should
      be matched if '72 Minutes of Fame' can't be! (However, it would also be
      best to prioritize a case-sensitive match before a non-case-sensitive
      one. Given the input 'FoObAR', prioritize 'FoObAR' over 'Foobar'.)
      (Done!)

TODO: Figure out why written track files (when using HTTP downloader) are
      URL-encoded. It's probably writing a file based on the href-file name,
      rather than the title. That's alright, but maybe we should URL-decode
      and then sanitize the href-file name, so that we get 'Foo Bar.mp3'
      instead of 'Foo%20Bar.mp3'.
      (Done!)

TODO: Make max download attempts variable by the user (without requiring
      source editing, obviously).
      (Done!)

TODO: Update HTTP crawl man page to include new options, and maybe update
      the HTTP crawler itself to reveal more options to the command line.

TODO: Fix the bug in loop-play.js where wasDestroyed doesn't exist!
      (Done!)

TODO: Use `mpv` instead of `play`!!!!!!!!! This would fix every problem ever.
      (Done!)

TODO: It looks like up-next doesn't seem to work properly when using the
      YouTube downloader; though it's possible we'll be scrapping downloaders
      altogether..
      (Done! - Removed downloaders.)

TODO: The results of pressing key commands aren't very clear currently. Useful
      things that come to mind would be presenting the volume when it's
      changed; making it clear that a song is being skipped when it is; and
      having "paused" be part of the status bar.

TODO: Figure out a way to make the same mpv process be reused, so that options
      such as volume can be remembered. (At the moment volume is reset to the
      default whenever a new track is played!)

TODO: Figure out how to stream audio data directly, or at least at a lower
      level (and stupider, as in "man git" stupid).

TODO: Validate local file paths in getDownloaderFor, maybe?

TODO: Figure out the horrible, evil cause of the max listeners warning
      I'm getting lately.. current repro: play a bunch of files locally.
      Skipping tracks still leads to issue. Wait for them to start playing
      before skipping, though.
      (Done!)

TODO: Something's requesting avprobe, and I'm not sure why. (While playing
      flora.json/YouTube videos.) Perhaps it's youtube-dl..?

TODO: Re-implement skip.
      (Done!)

TODO: Re-implement skip and view up-next track.
      (Done!)

TODO: In the playlist downloader, we can't guarantee filenames - the OS likes
      to do its own verification, e.g. by removing colons. Maybe we can use
      sanitize file name?
      (Done!)

TODO: In the playlist downloader, it would be nice if we skipped past existing
      files before trying to do any old files, so that the 'percent complete'
      status is more accurate. After all, we might skip 20% of the total track
      count because 20% were downloaded, and then we'd download one track,
      which makes up 10%, and then the rest would still be downloaded, which
      take up 70%. It would be better if we went from 0%, skipped ALL complete
      tracks to get to 90%, then did the 10% for the downloaded tracks.

TODO: Tracks should be able to contain more data than the title and downloader
      argument, by being stored as objects instead of arrays. This would also
      make it easier to implement things such as temporary state stored on
      tracks by sticking Symbols onto the track objects. It'd be particularly
      useful to store the original group path for tracks in flattenGroup, for
      example.
      (Done!)

TODO: Piping the output of a crawl command into the http-music command would
      be nifty!
      (Done! - try '-o /dev/stdin'. This was apparently always a feature.)

TODO: Having all the http-music commands be stuck into one main command might
      be nice, like the way git does it..
      (Done!)

TODO: Figure out how man pages work, and update the syntax in those files.
      Particularly I'd like to make the number of blank lines between headings
      more consistent, and figure out when to use '\-' or '-'.

TODO: Fix skip up-next..!

TODO: Make iTunes crawler prefer album artist over artist.
      (Done!)

TODO: Make iTunes crawler take into account track numbers.

TODO: Make a YouTube playlist crawler.
      (Done!)

TODO: The filter utility function shouldn't work at all if it fails to find
      what it's looking for.

TODO: Make the filter/remove/keep options do a search of some sort.

TODO: Make those options also work with tracks!

TODO: The URL 'http://somesite.com/youtube.com.mp3' would probably
      automatically assume the YouTube downloader. Instead of checking for the
      string 'youtube.com' included in the downloader arg, check if it is a
      valid URL and that the URL's domain is 'youtube.com'.

TODO: Figure out when to process.exit(1). In cli.js?

TODO: Change usages of "/example/path" to a more specific "/path/to/playlist"
      (for example).

TODO: Support smart playlists right inside of play - and ideally any other
      usage, e.g. download-playlist. For now the user can just run
      smart-playlist, save the result, and load that in whatever command
      they're using.

TODO: Markdown documentation? Man pages are nice, but aren't really all that
      user-friendly (citation needed); for example you can't easily read them
      online. (Whereas Markdown documents are easily viewed online, and aren't
      hard to read by hand, e.g. with `less doc/foo.md`.)

TODO: Handle avconv failing (probably handle downloader rejections from within
      DownloadController). Less important now that only music file extensions
      are loaded, but still relevant (for old playlists which may contain
      .DS_Stores or album cover arts, etc).
      (Done!)