.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This removes the 10s interval between saving and instead saves the
reading progress for pdf files every time.
As a side effect, the pdf will appear in the "Continue Watching" section
of Jellyfin. Before this commit, there was no indication that someone
started reading the pdf book.
Update the resume button after stopping for the pdf player.