forked from Mirrors/Dispatcharr
added 'starting' notification for refresh, fixed typo
This commit is contained in:
parent
50f068c358
commit
5eb4cbfeb0
3 changed files with 6 additions and 4 deletions
|
|
@ -23,7 +23,7 @@ from asgiref.sync import async_to_sync
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
LOCK_EXPIRE = 300
|
||||
BATCH_SIZE = 10000
|
||||
BATCH_SIZE = 1000
|
||||
SKIP_EXTS = {}
|
||||
|
||||
def fetch_m3u_lines(account):
|
||||
|
|
@ -230,7 +230,7 @@ def process_m3u_batch(account_id, batch, group_names, hash_keys):
|
|||
obj.last_seen = timezone.now()
|
||||
if changed:
|
||||
streams_to_update.append(obj)
|
||||
del existig_streams[stream_hash]
|
||||
del existing_streams[stream_hash]
|
||||
else:
|
||||
existing_streams[stream_hash] = obj
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export default function M3URefreshNotification() {
|
|||
const playlist = playlists.find((pl) => pl.id == id);
|
||||
if (!progress[id]) {
|
||||
if (refreshProgress[id] == 100) {
|
||||
// This situation is if it refreshes so fast we only get the 100% complete notification
|
||||
const notificationId = notifications.show({
|
||||
loading: false,
|
||||
title: `M3U Refresh: ${playlist.name}`,
|
||||
|
|
@ -38,7 +39,7 @@ export default function M3URefreshNotification() {
|
|||
const notificationId = notifications.show({
|
||||
loading: true,
|
||||
title: `M3U Refresh: ${playlist.name}`,
|
||||
message: `Updating M3U: ${refreshProgress[id]}%`,
|
||||
message: `Starting...`,
|
||||
autoClose: false,
|
||||
withCloseButton: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const Example = () => {
|
|||
const [rowSelection, setRowSelection] = useState([]);
|
||||
const [activeFilterValue, setActiveFilterValue] = useState('all');
|
||||
|
||||
const playlists = usePlaylistsStore((state) => state.playlists);
|
||||
const { playlists, setRefreshProgress } = usePlaylistsStore();
|
||||
|
||||
const theme = useMantineTheme();
|
||||
|
||||
|
|
@ -109,6 +109,7 @@ const Example = () => {
|
|||
|
||||
const refreshPlaylist = async (id) => {
|
||||
await API.refreshPlaylist(id);
|
||||
setRefreshProgress(id, 0);
|
||||
};
|
||||
|
||||
const deletePlaylist = async (id) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue