aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/subscription_manager.html
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-09-19 15:33:11 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-09-19 15:33:11 +0530
commita4e01da27c08e43a67b2618ad1e71c1f8f86d5cd (patch)
tree5b8f407dbb7e9d1ab2106ac0cc8564897e7a2098 /youtube/templates/subscription_manager.html
downloadyt-local-master.tar.gz
yt-local-master.tar.bz2
yt-local-master.zip
youtube fronendHEADmaster
Diffstat (limited to 'youtube/templates/subscription_manager.html')
-rw-r--r--youtube/templates/subscription_manager.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/youtube/templates/subscription_manager.html b/youtube/templates/subscription_manager.html
new file mode 100644
index 0000000..96082c3
--- /dev/null
+++ b/youtube/templates/subscription_manager.html
@@ -0,0 +1,78 @@
+{% set page_title = 'Subscription Manager' %}
+{% extends "base.html" %}
+{% block style %}
+ <link href="/youtube.com/static/subscription_manager.css" rel="stylesheet">
+{% endblock style %}
+
+
+{% macro subscription_list(sub_list) %}
+ {% for subscription in sub_list %}
+ <li class="sub-list-item {{ 'muted' if subscription['muted'] else '' }}">
+ <input class="sub-list-checkbox" name="channel_ids" value="{{ subscription['channel_id'] }}" form="subscription-manager-form" type="checkbox">
+ <a href="{{ subscription['channel_url'] }}" class="sub-list-item-name" title="{{ subscription['channel_name'] }}">{{ subscription['channel_name'] }}</a>
+ <span class="tag-list">{{ ', '.join(subscription['tags']) }}</span>
+ </li>
+ {% endfor %}
+{% endmacro %}
+
+{% block main %}
+ <div class="import-export">
+ <form class="subscriptions-import-form" enctype="multipart/form-data" action="/youtube.com/import_subscriptions" method="POST">
+ <h2>Import subscriptions</h2>
+ <div class="subscriptions-import-options">
+ <input type="file" id="subscriptions-import" accept="application/json, application/xml, text/x-opml, text/csv" name="subscriptions_file" required>
+ <input type="submit" value="Import">
+ </div>
+ </form>
+
+ <form class="subscriptions-export-form" action="/youtube.com/export_subscriptions" method="POST">
+ <h2>Export subscriptions</h2>
+ <div class="subscriptions-export-options">
+ <select id="export-type" name="export_format" title="Export format">
+ <option value="json_newpipe">JSON (NewPipe)</option>
+ <option value="json_google_takeout">JSON (Old Google Takeout Format)</option>
+ <option value="opml">OPML (RSS, no tags)</option>
+ </select>
+ <label for="include-muted">Include muted</label>
+ <input id="include-muted" type="checkbox" name="include_muted" checked>
+ <input type="submit" value="Export">
+ </div>
+ </form>
+ </div>
+
+ <hr>
+
+ <form id="subscription-manager-form" class="sub-list-controls" method="POST">
+ {% if group_by_tags %}
+ <a class="sort-button" href="/https://www.youtube.com/subscription_manager?group_by_tags=0">Don't group</a>
+ {% else %}
+ <a class="sort-button" href="/https://www.youtube.com/subscription_manager?group_by_tags=1">Group by tags</a>
+ {% endif %}
+ <input type="text" name="tags">
+ <button type="submit" name="action" value="add_tags">Add tags</button>
+ <button type="submit" name="action" value="remove_tags">Remove tags</button>
+ <button type="submit" name="action" value="unsubscribe_verify">Unsubscribe</button>
+ <button type="submit" name="action" value="mute">Mute</button>
+ <button type="submit" name="action" value="unmute">Unmute</button>
+ <input type="reset" value="Clear Selection">
+ </form>
+
+
+ {% if group_by_tags %}
+ <ul class="tag-group-list">
+ {% for tag_name, sub_list in tag_groups %}
+ <li class="tag-group">
+ <h2 class="tag-group-name">{{ tag_name }}</h2>
+ <ol class="sub-list">
+ {{ subscription_list(sub_list) }}
+ </ol>
+ </li>
+ {% endfor %}
+ </ul>
+ {% else %}
+ <ol class="sub-list">
+ {{ subscription_list(sub_list) }}
+ </ol>
+ {% endif %}
+
+{% endblock main %}