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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
diff --git a/settings.py b/settings.py
index eb210c5..fce9c56 100644
--- a/settings.py
+++ b/settings.py
@@ -589,6 +589,6 @@ def settings_page():
for func, old_value, value in to_call:
func(old_value, value)
- return flask.redirect(util.URL_ORIGIN + '/settings', 303)
+ return flask.redirect(util.URL_ORIGIN)
else:
flask.abort(400)
diff --git a/youtube/__init__.py b/youtube/__init__.py
index 64aed56..437c5ad 100644
--- a/youtube/__init__.py
+++ b/youtube/__init__.py
@@ -14,9 +14,6 @@ yt_app.url_map.strict_slashes = False
# yt_app.jinja_env.lstrip_blocks = True
-yt_app.add_url_rule('/settings', 'settings_page', settings.settings_page, methods=['POST', 'GET'])
-
-
@yt_app.route('/')
def homepage():
return flask.render_template('home.html', title="YT Local")
diff --git a/youtube/static/channel.css b/youtube/static/channel.css
index 030bc11..29f0c05 100644
--- a/youtube/static/channel.css
+++ b/youtube/static/channel.css
@@ -268,11 +268,9 @@ hr {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/static/local_playlist.css b/youtube/static/local_playlist.css
index dedd2dd..9aa8811 100644
--- a/youtube/static/local_playlist.css
+++ b/youtube/static/local_playlist.css
@@ -243,11 +243,9 @@ hr {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/static/playlist.css b/youtube/static/playlist.css
index e6ae0f9..1f0211c 100644
--- a/youtube/static/playlist.css
+++ b/youtube/static/playlist.css
@@ -253,11 +253,9 @@ hr {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/static/search.css b/youtube/static/search.css
index 9b7bf8d..25af37c 100644
--- a/youtube/static/search.css
+++ b/youtube/static/search.css
@@ -271,11 +271,9 @@ hr {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/static/subscription.css b/youtube/static/subscription.css
index e4e9c8b..8acb9b1 100644
--- a/youtube/static/subscription.css
+++ b/youtube/static/subscription.css
@@ -247,11 +247,9 @@ hr {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/static/watch.css b/youtube/static/watch.css
index 460bba3..181fb94 100644
--- a/youtube/static/watch.css
+++ b/youtube/static/watch.css
@@ -398,11 +398,9 @@ figure.sc-video {
.item-box {
display: grid;
- grid-template-columns: 1.9fr 0.1fr;
+ grid-template-columns: 1fr;
grid-template-rows: 1fr;
- grid-gap: 1px;
- grid-template-areas:
- "item-video item-checkbox";
+ grid-template-areas: "item-video";
}
.item-video {
diff --git a/youtube/templates/base.html b/youtube/templates/base.html
index 393cc52..52660f4 100644
--- a/youtube/templates/base.html
+++ b/youtube/templates/base.html
@@ -131,22 +131,6 @@
</div>
</form>
- {% if header_playlist_names is defined %}
- <form class="playlist" id="playlist-edit" action="/youtube.com/edit_playlist" method="post" target="_self">
- <input class="play-box" name="playlist_name" id="playlist-name-selection" list="playlist-options" type="search" placeholder="Add name of your playlist...">
- <datalist class="play-hidden" id="playlist-options">
- {% for playlist_name in header_playlist_names %}
- <option value="{{ playlist_name }}">{{ playlist_name }}</option>
- {% endfor %}
- </datalist>
- <button class="play-add" type="submit" id="playlist-add-button" name="action" value="add">+List</button>
- <div class="play-clean">
- <button type="reset" id="item-selection-reset">Clear</button>
- </div>
- </form>
- <script src="/youtube.com/static/js/playlistadd.js"></script>
- {% endif %}
-
</header>
<main class="main">
diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html
index c43f488..bd0f733 100644
--- a/youtube/templates/channel.html
+++ b/youtube/templates/channel.html
@@ -21,14 +21,6 @@
<div class="summary">
<p>{{ short_description }}</p>
</div>
- <div class="subscribe">
- <form method="POST" action="/youtube.com/subscriptions" class="subscribe-unsubscribe">
- <input class="btn-subscribe" type="submit" value="{{ 'Unsubscribe' if subscribed else 'Subscribe' }}">
- <input type="hidden" name="channel_id" value="{{ channel_id }}">
- <input type="hidden" name="channel_name" value="{{ channel_name }}">
- <input type="hidden" name="action" value="{{ 'unsubscribe' if subscribed else 'subscribe' }}">
- </form>
- </div>
</div>
<hr/>
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html
index bacc513..2773ed6 100644
--- a/youtube/templates/common_elements.html
+++ b/youtube/templates/common_elements.html
@@ -70,9 +70,6 @@
{% endif %}
</div>
</div>
- {% if info['type'] == 'video' %}
- <input class="item-checkbox" type="checkbox" name="video_info_list" value="{{ info['video_info'] }}" form="playlist-edit">
- {% endif %}
{% endif %}
</article>
{% endmacro %}
diff --git a/youtube/templates/home.html b/youtube/templates/home.html
index 0adac56..4a56af2 100644
--- a/youtube/templates/home.html
+++ b/youtube/templates/home.html
@@ -4,10 +4,4 @@
<link href="/youtube.com/static/home.css" rel="stylesheet">
{% endblock style %}
{% block main %}
- <ul>
- <li><a href="/youtube.com/playlists">Local playlists</a></li>
- <li><a href="/youtube.com/subscriptions">Subscriptions</a></li>
- <li><a href="/youtube.com/subscription_manager">Subscription Manager</a></li>
- <li><a href="/youtube.com/settings">Settings</a></li>
- </ul>
{% endblock main %}
diff --git a/youtube/templates/settings.html b/youtube/templates/settings.html
deleted file mode 100644
index a4ebabf..0000000
--- a/youtube/templates/settings.html
+++ /dev/null
@@ -1,47 +0,0 @@
-{% set page_title = 'Settings' %}
-{% extends "base.html" %}
-{% block style %}
- <link href="/youtube.com/static/settings.css" rel="stylesheet">
-{% endblock style %}
-
-{% block main %}
- <form method="POST" class="settings-form">
- {% for categ in categories %}
- <h2>{{ categ|capitalize }}</h2>
- <ul class="settings-list">
- {% for setting_name, setting_info, value in settings_by_category[categ] %}
- {% if not setting_info.get('hidden', false) %}
- <li class="setting-item">
- {% if 'label' is in(setting_info) %}
- <label for="{{ 'setting_' + setting_name }}" {% if 'comment' is in(setting_info) %}title="{{ setting_info['comment'] }}" {% endif %}>{{ setting_info['label'] }}</label>
- {% else %}
- <label for="{{ 'setting_' + setting_name }}" {% if 'comment' is in(setting_info) %}title="{{ setting_info['comment'] }}" {% endif %}>{{ setting_name.replace('_', ' ')|capitalize }}</label>
- {% endif %}
-
- {% if setting_info['type'].__name__ == 'bool' %}
- <input type="checkbox" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" {{ 'checked' if value else '' }}>
- {% elif setting_info['type'].__name__ == 'int' %}
- {% if 'options' is in(setting_info) %}
- <select id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}">
- {% for option in setting_info['options'] %}
- <option value="{{ option[0] }}" {{ 'selected' if option[0] == value else '' }}>{{ option[1] }}</option>
- {% endfor %}
- </select>
- {% else %}
- <input type="number" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}" step="1">
- {% endif %}
- {% elif setting_info['type'].__name__ == 'float' %}
-
- {% elif setting_info['type'].__name__ == 'str' %}
- <input type="text" id="{{ 'setting_' + setting_name }}" name="{{ setting_name }}" value="{{ value }}">
- {% else %}
- <span>Error: Unknown setting type: setting_info['type'].__name__</span>
- {% endif %}
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- {% endfor %}
- <input type="submit" value="Save settings">
- </form>
-{% endblock main %}
diff --git a/youtube/templates/subscriptions.html b/youtube/templates/subscriptions.html
index 2823e8d..4aefee2 100644
--- a/youtube/templates/subscriptions.html
+++ b/youtube/templates/subscriptions.html
@@ -13,71 +13,5 @@
{% block main %}
- <div class="subscriptions-sidebar">
- <div class="sidebar-links">
- <a class="sidebar-title" href="/youtube.com/subscription_manager" class="sub-manager-link">Subscription Manager</a>
- <form class="sidebar-action" method="POST" class="refresh-all">
- <input type="submit" value="Check All">
- <input type="hidden" name="action" value="refresh">
- <input type="hidden" name="type" value="all">
- </form>
- </div>
-
- <ol class="sidebar-list tags">
- {% if current_tag %}
- <li class="sidebar-list-item">
- <a href="/youtube.com/subscriptions" class="sidebar-item-name">Any tag</a>
- </li>
- {% endif %}
-
- {% for tag in tags %}
- <li class="sidebar-list-item">
- {% if tag == current_tag %}
- <span class="sidebar-item-name">{{ tag }}</span>
- {% else %}
- <a href="?tag={{ tag|urlencode }}" class="sidebar-item-name">{{ tag }}</a>
- {% endif %}
- <form method="POST" class="sidebar-item-refresh">
- <input type="submit" value="Check">
- <input type="hidden" name="action" value="refresh">
- <input type="hidden" name="type" value="tag">
- <input type="hidden" name="tag_name" value="{{ tag }}">
- </form>
- </li>
- {% endfor %}
- </ol>
-
- <hr>
- <ol class="sidebar-list sub-refresh-list">
- {% for subscription in subscription_list %}
- <li class="sidebar-list-item {{ 'muted' if subscription['muted'] else '' }}">
- <a href="{{ subscription['channel_url'] }}" class="sidebar-item-name" title="{{ subscription['channel_name'] }}">{{ subscription['channel_name'] }}</a>
- <form method="POST" class="sidebar-item-refresh">
- <input type="submit" value="Check">
- <input type="hidden" name="action" value="refresh">
- <input type="hidden" name="type" value="channel">
- <input type="hidden" name="channel_id" value="{{ subscription['channel_id'] }}">
- </form>
- </li>
- {% endfor %}
- </ol>
- </div>
-
- {% if current_tag %}
- <h2 class="current-tag">{{ current_tag }}</h2>
- {% endif %}
-
- <div class="video-container">
- {% for video_info in videos %}
- {{ common_elements.item(video_info) }}
- {% endfor %}
- </div>
- <hr/>
-
- <footer class="pagination-container">
- <nav class="pagination-list">
- {{ common_elements.page_buttons(num_pages, '/youtube.com/subscriptions', parameters_dictionary) }}
- </nav>
- </footer>
{% endblock main %}
diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html
index 0991457..06c5f1d 100644
--- a/youtube/templates/watch.html
+++ b/youtube/templates/watch.html
@@ -87,7 +87,6 @@
</select>
{% endif %}
</div>
- <input class="v-checkbox" name="video_info_list" value="{{ video_info }}" form="playlist-edit" type="checkbox">
<span class="v-direct-link"><a href="https://youtu.be/{{ video_id }}" rel="noopener noreferrer" target="_blank">Direct Link</a></span>
|