Commit graph

168 commits

Author SHA1 Message Date
be45de55f5 Use generator comprehension instead of list comprehension for ?q. 2020-08-11 21:50:38 -07:00
e90254cfeb Copy some common css from Etiquette. 2020-08-10 20:55:23 -07:00
0bbab4ae2c Lowercase the t in tube as I usually do. 2020-08-10 20:48:49 -07:00
b660d700b9 Add endpoint and gui button for deleting channels. 2020-08-10 18:30:56 -07:00
e42e4cac55 Add #toolbox_left and #toolbox_right where I can put more buttons. 2020-08-10 18:29:50 -07:00
59eab3f997 Rename directory -> download_directory; add queuefile_extension. 2020-08-10 05:46:18 -07:00
213278edcc Capitalize state filter links, remove commas from sorter links.
To make these two rows look similar. Rather than lowercasing the
sorters, let's capitalize the state filters. And rather than adding
a ','.join to the state filters, let's just remove commas from the
sorters. Good enough.
2020-08-09 17:54:38 -07:00
c13f02006b Let button_with_confirm inherit original CSS when not specified. 2020-08-08 18:59:17 -07:00
1eafdf5e5b Add skewer-case aliases for snake_case arguments. 2020-08-08 18:58:39 -07:00
d137f9a889 Don't use executescript, add explicit begins.
Today I discovered that the sqlite3 library executescript function
automatically, non-optionally performs a commit before running
the input script. I want to control transactions manually so the
database doesn't get left in a broken state.
2020-08-08 18:56:11 -07:00
0cf422977b If upload_playlist is not set during refresh, try to get it.
This is possible if a channel is temporarily suspended during the
time you tried to fetch the playlist id originally.
2020-07-26 18:47:34 -07:00
41c6a344fa Catch ChannelNotFound exception while updating db. 2020-07-20 19:04:27 -07:00
795aacb044 Add ChannelNotFound exception. 2020-07-20 19:03:53 -07:00
ff0d01fdda Add more to docstring about spinner delay attribute. 2020-07-10 16:34:32 -07:00
4911cee910 Use generators instead of lists for loading / searching videos.
Previously, creating the list meant that all database rows would be
loaded and objected even if you had a limit in place on your page
query, which was a huge waste.
2020-07-01 17:54:36 -07:00
de5992c906 Alphabetize methods. 2020-07-01 16:10:48 -07:00
4fe4ed9cb5 Database version 5. Store uploads_playlist id in database.
I am trying to cut down the API cost of refreshing all channels.
I hoped to find and endpoint that would give me videos from
multiple playlists at once, but Youtube doesn't seem to support
that. Next best option is to at least store the ID of the uploads
playlist, saving 2 api points each.
2020-07-01 16:09:11 -07:00
3c432c51f0 Add database user_version check to merge_db. 2020-07-01 16:00:09 -07:00
5d000f87c3 Fix DatabaseOutOfDate exception using wrong variable names. 2020-07-01 15:59:49 -07:00
215a46591e Remove support for username argument in get_user_videos.
Just get their id first with get_user_id.
2020-07-01 15:56:44 -07:00
e1eb53a114 Add method get_user_uploads_playlist. 2020-07-01 15:54:40 -07:00
3ff5de67bc Remove redundant _iter_playlist, just use get_playlist_videos. 2020-07-01 15:52:59 -07:00
f2e8aeb568 Improve these docstrings. 2020-07-01 15:47:27 -07:00
d0f041c694 Let database upgrader functions take actual ycdldb, not plain sql.
Like Etiquette. This gives us access to the ycdl methods rather
than being limited to just sql operations.
2020-07-01 15:47:15 -07:00
6919f39e81 Rearrange upgraders in ascending order. 2020-07-01 15:25:29 -07:00
bacdad07a6 Add docstring to bind_box_to_button, and some small linting. 2020-06-30 20:32:29 -07:00
6a41b18ba7 Dedent by using early returns. 2020-06-28 17:07:12 -07:00
3044907264 Use dot notation instead of subscript on response. 2020-06-28 16:57:32 -07:00
1e4f4441bb Use dot notation instead of subscript. 2020-06-28 16:55:37 -07:00
fcbb128f47 Add attribute "completed" to response object. 2020-06-28 16:47:54 -07:00
27219d74c4 Add spinner when setting automark. 2020-06-26 20:59:55 -07:00
8d28484240 Add multicolumn index on download, published.
This helps generate the "sub box" page more quickly, which
was previously using temp b-tree for sorting.
2020-06-24 22:28:57 -07:00
226bc03bff Add methods Channel.delete and Video.delete. 2020-06-18 09:01:05 -07:00
3f9565b874 Add video id to this print statement. 2020-06-17 15:55:30 -07:00
e3abf5f39d Fix automark:download by marking state after calling download.
The previous order of operations was wrongly triggering the
"video already downloaded" check in ycdldb.
2020-06-17 15:54:59 -07:00
f1e80dac94 Add spinners to channel refresh buttons. 2020-06-17 14:15:50 -07:00
235bc2501d Add spinner.js, synced with Etiquette. 2020-06-17 14:15:13 -07:00
dd59fd2c36 Import common.js before api.js. 2020-06-17 14:13:33 -07:00
e420d92f6c Add more docstring to button_with_confirm data-onclick parameter. 2020-06-17 14:09:02 -07:00
d2d8a69d39 Synchronize Etiquette common.js and YCDL common.js. 2020-06-17 13:38:01 -07:00
b3d3e4ae6c Use .get instead of [] to handle missing some attributes.
Some of these are ones I've experienced first-hand, others are
defensive because I realized I don't know what kind of weird
things might be out there. Can do more if necessary.
2020-06-17 08:40:18 -07:00
ff1b043279 Arrange the state filters horizontally instead of vertically.
The "New videos are" dropdown and the sorting options are both
horizontal, so this one being vertical stuck out badly visually.
This is a little better.
2020-06-10 23:09:17 -07:00
b467304ea8 Add instructions for getting youtube API key to readme. 2020-06-10 23:05:17 -07:00
9c629d53b1 Remove some useless functions from common.js. 2020-06-04 19:04:51 -07:00
66f499c232 Move functions mark_state, start_download to api.js. 2020-06-03 13:01:53 -07:00
d996101152 Move function set_automark to api.js. 2020-06-03 13:01:28 -07:00
ba1f17da75 Move function add_channel to api.js. 2020-06-03 13:00:44 -07:00
1f2c43278a Move function refresh_all_channels to api.js. 2020-06-03 13:00:16 -07:00
ab1a2364be Move function refresh_channel to api.js. 2020-06-03 12:59:29 -07:00
b76be18b6c Add CHANNEL_ID variable to js via jinja. 2020-06-03 12:58:33 -07:00