Skip to content

Commit

Permalink
Merge branch 'public/9.0' into public/9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Feb 8, 2025
2 parents 2c8f7a6 + 41deed8 commit ab195f6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Changelog9.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2><a name="v9.0.2" id="v9.0.2"></a>Version 9.0.2</h2>
<li><a href="https://github.com/LMS-Community/slimserver/pull/1309">#1309</a> - Limit works advanced search to discovered albums. (@darrel-k)</li>
<li><a href="https://github.com/LMS-Community/slimserver/issue/1314">#1314</a> - The server would seemingly hang when trying to connect to the Material skin as long as no work has been found.</li>
<li><a href="https://github.com/LMS-Community/slimserver/pull/1319">#1319</a> - Don't filter by release types if user pref is ignoreReleaseTypes (@darrel-k).</li>
<li></li>
<li>Improve compatibility with modern HTML/JS and more strict browsers (eg. Safari).</li>
</ul>
<br />

Expand Down
9 changes: 5 additions & 4 deletions HTML/Default/html/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ Main = {
playerobj = SqueezeJS.getPlayer();

// set the browser frame to use the selected player
if (frames.browser && frames.browser.location && frames.browser.location.protocol.match(/^http/)) {
frames.browser.location = SqueezeJS.Utils.replacePlayerIDinUrl(frames.browser.location, playerobj);
const location = frames.browser && frames.browser.location || document.browser.location;
if (location.protocol.match(/^http/)) {
SqueezeJS.Utils.setBrowseLocation(SqueezeJS.Utils.replacePlayerIDinUrl(location, playerobj));
}

// make the settings link use the new player ID
Expand Down Expand Up @@ -424,8 +425,8 @@ Main = {
tooltip: SqueezeJS.string('save'),
minWidth: 32,
noText: true,
handler: function(){
frames.browser.location = webroot + 'edit_playlist.html?player=' + SqueezeJS.Controller.getPlayer() + '&saveCurrentPlaylist=1';
handler: function() {
SqueezeJS.Utils.setBrowseLocation(webroot + 'edit_playlist.html?player=' + SqueezeJS.Controller.getPlayer() + '&saveCurrentPlaylist=1');
}
});

Expand Down
5 changes: 1 addition & 4 deletions HTML/Default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@
}
}

if (frames.browser.location)
frames.browser.location.href = navigationUrl;
else if (document.browser.location)
document.browser.location.href = navigationUrl;
SqueezeJS.Utils.setBrowseLocation(navigationUrl);

if (Ext.ux.Lightbox) {
Ext.ux.Lightbox.labelOf = '[% "OF" | string %]';
Expand Down
9 changes: 8 additions & 1 deletion HTML/EN/html/SqueezeJS/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ SqueezeJS.SonginfoParser = {

SqueezeJS.Utils = {
replacePlayerIDinUrl : function(url, id){
if (!id)
if (!id || !url)
return url;

if (typeof url == 'object' && url.search != null) {
Expand Down Expand Up @@ -898,6 +898,13 @@ SqueezeJS.Utils = {
});

return parts;
},

setBrowseLocation: function(url) {
if (frames.browser.location)
frames.browser.location.href = url;
else if (document.browser.location)
document.browser.location.replace(url);
}
};

Expand Down

0 comments on commit ab195f6

Please sign in to comment.