mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +00:00
add playlist discovery button to channel_id page
This commit is contained in:
parent
ac14cd5ebb
commit
c3ece970ee
@ -49,6 +49,7 @@
|
||||
<p>Total Videos archived: {{ max_hits }}</p>
|
||||
<p>Watched: <button title="Mark all videos from {{ channel_info.channel_name }} as watched" type="button" id="{{ channel_info.channel_id }}" onclick="isWatched(this.id)">Mark as watched</button></p>
|
||||
{% endif %}
|
||||
<button title="Find playlists for {{ channel_info.channel_name }}" type="button" id="find-playlists-button" data-id="{{ channel_info.channel_id }}" onclick="findPlaylists(this)">Find Playlists</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -187,6 +187,18 @@ function fsRescan() {
|
||||
toReplace.appendChild(message);
|
||||
}
|
||||
|
||||
function findPlaylists(button) {
|
||||
var channel_id = button.getAttribute("data-id");
|
||||
var payload = JSON.stringify({'find-playlists': channel_id});
|
||||
sendPost(payload);
|
||||
// clear button
|
||||
var message = document.createElement('p');
|
||||
message.innerText = 'Scraping for playlists in progress';
|
||||
var toReplace = document.getElementById('find-playlists-button');
|
||||
toReplace.innerHTML = '';
|
||||
toReplace.appendChild(message);
|
||||
}
|
||||
|
||||
// delete from file system
|
||||
function deleteConfirm() {
|
||||
to_show = document.getElementById("delete-button");
|
||||
|
Loading…
Reference in New Issue
Block a user