mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +00:00
cleaner handeling of findPlaylists
This commit is contained in:
parent
64c9269ee2
commit
b8f7aa3298
@ -228,6 +228,10 @@ def index_channel_playlists(channel_id):
|
|||||||
channel_handler = YoutubeChannel(channel_id)
|
channel_handler = YoutubeChannel(channel_id)
|
||||||
all_playlists = channel_handler.get_all_playlists()
|
all_playlists = channel_handler.get_all_playlists()
|
||||||
|
|
||||||
|
if not all_playlists:
|
||||||
|
print(f"no playlists found for channel {channel_id}")
|
||||||
|
return
|
||||||
|
|
||||||
all_indexed = PendingList().get_all_indexed()
|
all_indexed = PendingList().get_all_indexed()
|
||||||
all_youtube_ids = [i["youtube_id"] for i in all_indexed]
|
all_youtube_ids = [i["youtube_id"] for i in all_indexed]
|
||||||
|
|
||||||
@ -255,3 +259,5 @@ def index_channel_playlists(channel_id):
|
|||||||
handler = ThumbManager()
|
handler = ThumbManager()
|
||||||
missing_playlists = handler.get_missing_playlists()
|
missing_playlists = handler.get_missing_playlists()
|
||||||
handler.download_playlist(missing_playlists)
|
handler.download_playlist(missing_playlists)
|
||||||
|
|
||||||
|
return
|
||||||
|
@ -224,9 +224,7 @@ function findPlaylists(button) {
|
|||||||
// clear button
|
// clear button
|
||||||
var message = document.createElement('p');
|
var message = document.createElement('p');
|
||||||
message.innerText = 'Scraping for playlists in progress';
|
message.innerText = 'Scraping for playlists in progress';
|
||||||
var toReplace = document.getElementById('find-playlists-button');
|
document.getElementById("find-playlists-button").replaceWith(message);
|
||||||
toReplace.innerHTML = '';
|
|
||||||
toReplace.appendChild(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete from file system
|
// delete from file system
|
||||||
|
Loading…
Reference in New Issue
Block a user