Commit graph

208 commits

Author SHA1 Message Date
9b6af96b95
Use voussoirkit.flasktools for gzip_response. 2021-04-02 18:31:04 -07:00
e00bfa368b
Update docstring "launch ycdl_flask_dev, _prod". 2021-04-02 18:00:01 -07:00
fa363a33c7
Improve handling of livestreams, premieres with live_broadcast attr. 2021-03-31 17:24:57 -07:00
cfad775a0a
Move published_string to a property of the Video object. 2021-03-24 20:29:15 -07:00
b134a8783b
Remove unnecessary query_string argument. 2021-03-24 20:09:23 -07:00
9c5fb4fec1
Move jsonify methods to the objects instead of separate file. 2021-02-25 19:46:00 -08:00
65fdae97da
Store request.is_localhost like Etiquette. 2021-02-25 19:45:11 -08:00
6db7fe9a24
Punctuate pid line. 2021-01-30 04:34:46 -08:00
69ae0280f4
Wrap Channel RSS link in div so a-tag doesn't stretch all the way. 2021-01-30 04:31:54 -08:00
acf29b9e9f
Show pid when server starts. 2021-01-30 04:31:48 -08:00
5bedabdc66
Move site.debug to _dev, _prod launchers. 2021-01-28 16:46:54 -08:00
d3555dfbf3 Sync with Etiquette. 2021-01-11 15:36:16 -08:00
4bf27d4458 Sync with Etiquette. 2021-01-02 16:54:20 -08:00
56dfb6db19 Add the state filter's name into the "X items" line. 2020-11-26 18:24:15 -08:00
083e9dd2ee Add (p) link to pending videos from generic listing page. 2020-11-21 11:25:46 -08:00
8de342b054 Set log level by argv. 2020-11-20 16:23:36 -08:00
ced16d9063 Don't traceback.print_exc. 2020-11-15 21:10:01 -08:00
ca8a2a2d55 Add channel's RSS link to the settings tab. 2020-11-15 17:57:23 -08:00
e4b769336b Set ytrss log level during flask launch. 2020-11-15 17:57:07 -08:00
11414b4088 Add log_level param to constructor, like Etq. 2020-11-09 20:22:54 -08:00
8cdf18b987 Wrap long line. 2020-11-09 20:20:45 -08:00
5841279f9e Sync common.js with Etiquette. 2020-11-08 19:32:04 -08:00
be7c5982e9 Don't use a default refresh rate. User must provide --refresh_rate. 2020-11-03 00:04:32 -08:00
4b1fde386d Add some docstrings to the request code. 2020-11-03 00:03:59 -08:00
e09153c5e3 Alert response if download/ignore/pending action fails. 2020-10-29 16:14:58 -07:00
42417ed008 Sync common.js with Etiquette. 2020-10-23 07:44:18 -07:00
c5c67b9c69 Let select_all, deselect_all ignore hidden cards.
So that ctrl+a after filtering only selects the filter results.
2020-10-11 18:43:47 -07:00
67a3472aad Avoid creating emptystring promptclass. 2020-10-04 16:53:27 -07:00
14ab3f3b06 Reorganize a bunch of functions and other indulgences. 2020-10-02 19:46:36 -07:00
ed3942b943 Let response status be 0 even if request didn't complete.
Since meta.status would be undefined for an incomplete request,
I would have to check response.completed && response.meta.status,
which is too much burden. Let's set the status immediately, and
if a callback wants to do further diving we'll use completed then.
2020-10-02 19:43:25 -07:00
94e3bcd21d Set tabbed_container data-active-tab-id on tab change. 2020-10-02 13:17:38 -07:00
0f9fbfa6e8 Add synchronized hotkeys.js from Etiquette; add ctrl+a, ctrl+d. 2020-10-02 13:17:08 -07:00
d1b42b71cb Enforce keyword-only args, alphabetize args. 2020-09-30 15:17:27 -07:00
bb72c40c53 Add option --localhost_only. 2020-09-30 15:15:30 -07:00
038ce9cffb Rename flask launchers -> _dev, _prod.
I want to reduce some complexity around here, part of which is that
launch imported entrypoint imported backend, all to do some proxy
wrapping which isn't necessary for the dev case anyway. Less
layers of wrapping and importing is good. Plus I think this naming
is more clear.
Additionally, I realized that the entrypoint aka prod launcher was
never updated to init the ycdldb as that was only done by the argparse
launcher. Now it's hardcoded and I'll consider adding a config file.
2020-09-30 15:03:29 -07:00
f77809e793 Add top docstring and log format like Etiquette. 2020-09-30 14:47:05 -07:00
fb1d5d3e6e Add select_all. 2020-09-29 10:55:04 -07:00
ede7eab80b Replace this loop with a nice map. 2020-09-29 10:54:58 -07:00
16dc6066df Leverage live HTMLCollection for selections instead of separate array. 2020-09-29 10:54:31 -07:00
898be91538 Spread video embed string over multiple lines. 2020-09-29 01:17:05 -07:00
572612a282 Replace variable swap with a one-liner. 2020-09-29 01:16:35 -07:00
e584e05f5e Move color definitions from common.css to ycdl.css. 2020-09-25 16:25:39 -07:00
4f6080859a Synchronize Etiquette and YCDL. 2020-09-22 02:59:17 -07:00
69c1dd92e9 Synchronize --wide, --narrow with Etiquette. 2020-09-19 10:42:31 -07:00
34aafedf46 Synchronize with Etiquette. 2020-09-18 16:35:02 -07:00
741cddc2e4 Add set_queuefile_extension method, endpoint, and ui. 2020-09-16 10:23:38 -07:00
223d3d01fb Rename automark_hook -> _form; use more const. 2020-09-16 10:22:33 -07:00
76b1504353 Synchronize with Etiquette. 2020-09-15 15:04:50 -07:00
ec19301bcc Rewrite entry_with_history hook and use keydown instead of keyup. 2020-09-12 10:14:52 -07:00
f4455f5a82 Add return to onchange. 2020-09-12 10:14:06 -07:00
cd5106df59 Rename color_3d_shadow -> color_shadow. 2020-09-09 15:58:04 -07:00
0116d80740 Mark the current state and orderby links in bold. 2020-09-05 17:49:04 -07:00
d0e803aa66 Supply the orderby argument to channel.html template. 2020-09-05 17:48:29 -07:00
d140a580c3 Add .bold class. 2020-09-05 17:47:53 -07:00
37df5a6443 Remove spacer <p>s and embrace the grid-gap. 2020-09-05 09:31:37 -07:00
339fa6649f Remove useless one-tab container for sub box by better if placement. 2020-09-05 09:31:13 -07:00
e5910c55f2 Rename database column download to state. 2020-09-04 15:55:48 -07:00
0ae041f001 Add whitelist/blacklist functionality to merge_params. 2020-09-04 15:10:58 -07:00
7d3a9fe03e Add explanation of data-prompt-class et al.
I think I left these blank because I felt they should be obvious.
But I'd rather have it explicit.
2020-09-04 14:50:30 -07:00
fc4aebc4a4 Fix double "return return". 2020-09-04 14:48:50 -07:00
98fae96a8a Add spinner.BAIL for cancelling spinner without launching callback. 2020-09-04 11:24:08 -07:00
0518765f33 Add css/js class entry_with_history to automate adding the hook. 2020-09-04 11:18:41 -07:00
26704c238e Fix catch ytapi.ChannelNotFound and return json 404. 2020-09-04 10:48:08 -07:00
4af4985ac5 Add return to all onclicks, and ; to other javascript hooks. 2020-09-04 10:37:49 -07:00
afcea49135 Fine-tune use of let/const in spinner.js. 2020-09-03 15:57:07 -07:00
03c366fff8 Replace var with let/const. 2020-09-03 15:44:58 -07:00
2a5983b124 Change #content_body width from 95% to 98%. 2020-09-03 12:06:35 -07:00
a524249ab4 Improve color of tab buttons active/inactive/hover. 2020-09-03 12:03:53 -07:00
3a455d377b Rewrite channel.html as tabbed container, separate videos/settings. 2020-09-03 11:54:51 -07:00
f103447807 Add css/js class tabbed_container. 2020-09-03 11:54:00 -07:00
b8c25f217d Synchronize Etiquette common.css and YCDL common.css. 2020-09-03 11:52:51 -07:00
d4cad47b78 Add docstring to init_enable_on_pageload. 2020-09-03 11:51:30 -07:00
8dd7fb987d Add placeholder text to new_channel_textbox. 2020-09-03 11:44:49 -07:00
c37cd60d4d Compress responses with gzip. 2020-08-28 16:43:02 -07:00
65e0d58576 Disable filter textbox until pageload.
For channels with many thousands of videos, it can be a while
before the DOM is fully parsed and ready to go. It is annoying
to type in the box and find that it doesn't work yet, since the
script tag comes after body.
Why not move the script above body? Because I don't want to,
and because you'd be filtering from an incomplete list of
videos anyway.
2020-08-28 16:21:42 -07:00
25e9975926 Add css/js class enable_on_pageload. 2020-08-28 16:18:51 -07:00
25a611e39e Add 200ms timeout before filtering while you type your query. 2020-08-27 17:11:52 -07:00
7b197c867b Speed up filtering by hiding #video_cards first.
On large channels, filter_video_cards is painfully slow because of all
the forced reflows. I'm currently trying to find a better solution.
In the meantime, hiding the containing div does prevent those reflows
until the end, but itself is also quite slow.
2020-08-27 16:53:51 -07:00
412d324352 Remove unused parameter event. 2020-08-20 15:09:37 -07:00
e083223cfc Add button_with_spinner class to add channel button. 2020-08-20 15:09:23 -07:00
17cd98fa50 Let image thumbnails lazy load. 2020-08-15 22:28:53 -07:00
de5aba4895 Remove unnecessary spacer when channel is none. 2020-08-15 22:28:27 -07:00
5610d756c2 Fix video_cards variable name being used twice, breaking filter. 2020-08-15 22:27:47 -07:00
6bd4997f3f Simplify logging.getLogger because they are hierarchical. 2020-08-12 11:25:59 -07:00
3f3eda58b1 Move logging basicconfig effort to frontmost application layer. 2020-08-12 11:17:10 -07:00
ee89582a1b Return 404 when channel could not be added and still does not exist. 2020-08-12 10:28:06 -07:00
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
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
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
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
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