For a couple of weeks at least now, I've found several pieces where there's a Peachnote preview that works (e.g. of the Score), but ViewerJS previews that fail (e.g. of the Parts). I've confirmed this in Chrome, Edge and Firefox.
Looking into the source, it seems the ViewerJS bits are trying to pull in files via URLs such as https://imslp.org/extensions/common/vie ... e_op79.pdf
Trying to visit the imslp.simssa.ca link directly (https://imslp.simssa.ca/files/imglnks/u ... e_op79.pdf) also fails.
Hence, it's unclear (to me) whether it's ViewerJS itself that's failing, or if it's simply getting stuck trying to retrieve a file on SIMSAA that is no longer there (but it's shame no error message is displayed). Did SIMSAA use to host lots of IMSLP files that have now been deleted/moved, perhaps?
Given that the download files are still available on non-SIMSAA servers (e.g. in the case above, https://ks4.imslp.net/files/imglnks/usi ... e_op79.pdf), could all preview links to "/extensions/common/viewerjs/index.nofs.html#https://imslp.simssa.ca/..." simply be rewritten to "/extensions/common/viewerjs/index.nofs.html#https://ks4.imslp.net/ ..."?
Alternatively, could the inoperative viewer buttons not be rewritten to use Peachnote and/or grab the files via https://www.peachnote.com/rest/api/v1/image?sid= + IMSLP no.?
Preview failing with ViewerJS (or with SIMSSA?)
Moderators: kcleung, Wiki Admins
Re: Preview failing with ViewerJS (or with SIMSSA?)
Looking at some other pieces, it doesn't look that easy to change which previewer is used. For example, at https://imslp.org/wiki/Piano_Sonata_No. ... udwig_van) I see
- Complete Score (Preview) #51723 -> displays with Peachnote, OK
- Complete Score (scan) (Preview) #243297 -> displays with ViewerJS, fails
Can anyone clarify how IMSLP decides which inline viewer to use? Is there no way to 'force' Peachnote?function() {
if (o == a) return s ? $("#peachnoteScoreViewerRoot").slideUp() : $("#nativePDFViewer").slideUp("normal", function() {
$(this).remove()
}), void(s = o = !1);
var e, i;
viewerDisclaimer() && (_pnq.push(["copyrightDisclaimerAcknowledged"]), -1 != $.inArray(a, JGPrevState.pn) ? (s ? $("#peachnoteScoreViewerRoot").hide() : $("#nativePDFViewer").remove(), $("#peachnoteScoreViewerRoot").detach().appendTo($("#" + t)).width(_pnqw + 4).css("margin", "auto").css("margin-top", "10px").slideDown(), (_pnq = _pnq || []).push(["loadScore", t]), $.get("/imslpscripts/UpdateDLCount.ISCR.php?viewer/" + a)) : (s ? $("#peachnoteScoreViewerRoot").hide() : $("#nativePDFViewer").remove(), e = $("#" + t), i = e.width() - 24, $.getJSON("/wiki/Special:GP/" + JGFileOpts[a].pl, function(t) {
t && (t = t.replace("http://", "//"), $("<div id='nativePDFViewer' style='width:" + (2 + i) + "px;margin:10px auto auto;display:block;' />").html(mw.config.values.userIsMember ? "<iframe src='/extensions/common/viewerjs/index.html#" + t + "' width='" + i + "' height='700' allowfullscreen webkitallowfullscreen></iframe>" : "<iframe src='/extensions/common/viewerjs/index.nofs.html#" + t + "' width='" + i + "' height='700'></iframe>").hide().appendTo(e).slideDown())
})), o = a, s = -1 != $.inArray(o, JGPrevState.pn))
}