mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-04 19:30:13 +00:00
handle findPlaylists notification and fix spacing
This commit is contained in:
parent
8874168291
commit
7516090e14
@ -277,14 +277,13 @@ def index_channel_playlists(channel_id):
|
|||||||
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]
|
||||||
|
|
||||||
counter = 1
|
for idx, (playlist_id, playlist_title) in enumerate(all_playlists):
|
||||||
for playlist_id, playlist_title in all_playlists:
|
|
||||||
# notify
|
# notify
|
||||||
mess_dict = {
|
mess_dict = {
|
||||||
"status": "message:playlistscan",
|
"status": "message:playlistscan",
|
||||||
"level": "info",
|
"level": "info",
|
||||||
"title": "Scanning channel for playlists",
|
"title": "Scanning channel for playlists",
|
||||||
"message": f"Progress: {counter}/{len(all_playlists)}",
|
"message": f"Progress: {idx + 1}/{len(all_playlists)}",
|
||||||
}
|
}
|
||||||
RedisArchivist().set_message("message:playlistscan", mess_dict)
|
RedisArchivist().set_message("message:playlistscan", mess_dict)
|
||||||
print("add playlist: " + playlist_title)
|
print("add playlist: " + playlist_title)
|
||||||
@ -305,7 +304,6 @@ def index_channel_playlists(channel_id):
|
|||||||
continue
|
continue
|
||||||
playlist_handler.upload_to_es()
|
playlist_handler.upload_to_es()
|
||||||
playlist_handler.add_vids_to_playlist()
|
playlist_handler.add_vids_to_playlist()
|
||||||
counter = counter + 1
|
|
||||||
|
|
||||||
if all_playlists:
|
if all_playlists:
|
||||||
handler = ThumbManager()
|
handler = ThumbManager()
|
||||||
|
@ -808,7 +808,7 @@ button:hover {
|
|||||||
.dl-control-icons {
|
.dl-control-icons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10px 0;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dl-control-icons img {
|
.dl-control-icons img {
|
||||||
@ -835,7 +835,7 @@ button:hover {
|
|||||||
background-color: var(--highlight-bg);
|
background-color: var(--highlight-bg);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 30px 0 15px 0;
|
padding: 30px 0 15px 0;
|
||||||
margin-bottom: 1rem;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification.info {
|
.notification.info {
|
||||||
|
@ -225,6 +225,9 @@ function findPlaylists(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';
|
||||||
document.getElementById("find-playlists-button").replaceWith(message);
|
document.getElementById("find-playlists-button").replaceWith(message);
|
||||||
|
setTimeout(function(){
|
||||||
|
checkMessages();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete from file system
|
// delete from file system
|
||||||
|
Loading…
Reference in New Issue
Block a user