diff --git a/src/components/appRouter.js b/src/components/appRouter.js index 2119d2095..3b5f35665 100644 --- a/src/components/appRouter.js +++ b/src/components/appRouter.js @@ -73,9 +73,13 @@ class AppRouter { async show(path, options) { if (this.promiseShow) await this.promiseShow; - // ensure the path does not start with '#!' since the router adds this - if (path.startsWith('#!')) { - path = path.substring(2); + // ensure the path does not start with '#' since the router adds this + if (path.startsWith('#')) { + path = path.substring(1); + } + // Support legacy '#!' routes since people may have old bookmarks, etc. + if (path.startsWith('!')) { + path = path.substring(1); } if (path.indexOf('/') !== 0 && path.indexOf('://') === -1) { @@ -515,27 +519,27 @@ class AppRouter { const serverId = item.ServerId || options.serverId; if (item === 'settings') { - return '#!/mypreferencesmenu.html'; + return '#/mypreferencesmenu.html'; } if (item === 'wizard') { - return '#!/wizardstart.html'; + return '#/wizardstart.html'; } if (item === 'manageserver') { - return '#!/dashboard.html'; + return '#/dashboard.html'; } if (item === 'recordedtv') { - return '#!/livetv.html?tab=3&serverId=' + options.serverId; + return '#/livetv.html?tab=3&serverId=' + options.serverId; } if (item === 'nextup') { - return '#!/list.html?type=nextup&serverId=' + options.serverId; + return '#/list.html?type=nextup&serverId=' + options.serverId; } if (item === 'list') { - let url = '#!/list.html?serverId=' + options.serverId + '&type=' + options.itemTypes; + let url = '#/list.html?serverId=' + options.serverId + '&type=' + options.itemTypes; if (options.isFavorite) { url += '&IsFavorite=true'; @@ -546,61 +550,61 @@ class AppRouter { if (item === 'livetv') { if (options.section === 'programs') { - return '#!/livetv.html?tab=0&serverId=' + options.serverId; + return '#/livetv.html?tab=0&serverId=' + options.serverId; } if (options.section === 'guide') { - return '#!/livetv.html?tab=1&serverId=' + options.serverId; + return '#/livetv.html?tab=1&serverId=' + options.serverId; } if (options.section === 'movies') { - return '#!/list.html?type=Programs&IsMovie=true&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsMovie=true&serverId=' + options.serverId; } if (options.section === 'shows') { - return '#!/list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId=' + options.serverId; } if (options.section === 'sports') { - return '#!/list.html?type=Programs&IsSports=true&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsSports=true&serverId=' + options.serverId; } if (options.section === 'kids') { - return '#!/list.html?type=Programs&IsKids=true&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsKids=true&serverId=' + options.serverId; } if (options.section === 'news') { - return '#!/list.html?type=Programs&IsNews=true&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsNews=true&serverId=' + options.serverId; } if (options.section === 'onnow') { - return '#!/list.html?type=Programs&IsAiring=true&serverId=' + options.serverId; + return '#/list.html?type=Programs&IsAiring=true&serverId=' + options.serverId; } if (options.section === 'channels') { - return '#!/livetv.html?tab=2&serverId=' + options.serverId; + return '#/livetv.html?tab=2&serverId=' + options.serverId; } if (options.section === 'dvrschedule') { - return '#!/livetv.html?tab=4&serverId=' + options.serverId; + return '#/livetv.html?tab=4&serverId=' + options.serverId; } if (options.section === 'seriesrecording') { - return '#!/livetv.html?tab=5&serverId=' + options.serverId; + return '#/livetv.html?tab=5&serverId=' + options.serverId; } - return '#!/livetv.html?serverId=' + options.serverId; + return '#/livetv.html?serverId=' + options.serverId; } if (itemType == 'SeriesTimer') { - return '#!/details?seriesTimerId=' + id + '&serverId=' + serverId; + return '#/details?seriesTimerId=' + id + '&serverId=' + serverId; } if (item.CollectionType == 'livetv') { - return '#!/livetv.html'; + return '#/livetv.html'; } if (item.Type === 'Genre') { - url = '#!/list.html?genreId=' + item.Id + '&serverId=' + serverId; + url = '#/list.html?genreId=' + item.Id + '&serverId=' + serverId; if (context === 'livetv') { url += '&type=Programs'; @@ -614,7 +618,7 @@ class AppRouter { } if (item.Type === 'MusicGenre') { - url = '#!/list.html?musicGenreId=' + item.Id + '&serverId=' + serverId; + url = '#/list.html?musicGenreId=' + item.Id + '&serverId=' + serverId; if (options.parentId) { url += '&parentId=' + options.parentId; @@ -624,7 +628,7 @@ class AppRouter { } if (item.Type === 'Studio') { - url = '#!/list.html?studioId=' + item.Id + '&serverId=' + serverId; + url = '#/list.html?studioId=' + item.Id + '&serverId=' + serverId; if (options.parentId) { url += '&parentId=' + options.parentId; @@ -635,7 +639,7 @@ class AppRouter { if (context !== 'folders' && !itemHelper.isLocalItem(item)) { if (item.CollectionType == 'movies') { - url = '#!/movies.html?topParentId=' + item.Id; + url = '#/movies.html?topParentId=' + item.Id; if (options && options.section === 'latest') { url += '&tab=1'; @@ -645,7 +649,7 @@ class AppRouter { } if (item.CollectionType == 'tvshows') { - url = '#!/tv.html?topParentId=' + item.Id; + url = '#/tv.html?topParentId=' + item.Id; if (options && options.section === 'latest') { url += '&tab=1'; @@ -655,7 +659,7 @@ class AppRouter { } if (item.CollectionType == 'music') { - url = '#!/music.html?topParentId=' + item.Id; + url = '#/music.html?topParentId=' + item.Id; if (options?.section === 'latest') { url += '&tab=1'; @@ -668,24 +672,24 @@ class AppRouter { const itemTypes = ['Playlist', 'TvChannel', 'Program', 'BoxSet', 'MusicAlbum', 'MusicGenre', 'Person', 'Recording', 'MusicArtist']; if (itemTypes.indexOf(itemType) >= 0) { - return '#!/details?id=' + id + '&serverId=' + serverId; + return '#/details?id=' + id + '&serverId=' + serverId; } const contextSuffix = context ? '&context=' + context : ''; if (itemType == 'Series' || itemType == 'Season' || itemType == 'Episode') { - return '#!/details?id=' + id + contextSuffix + '&serverId=' + serverId; + return '#/details?id=' + id + contextSuffix + '&serverId=' + serverId; } if (item.IsFolder) { if (id) { - return '#!/list.html?parentId=' + id + '&serverId=' + serverId; + return '#/list.html?parentId=' + id + '&serverId=' + serverId; } return '#'; } - return '#!/details?id=' + id + '&serverId=' + serverId; + return '#/details?id=' + id + '&serverId=' + serverId; } showLocalLogin(serverId) { diff --git a/src/components/dashboard/users/UserCardBox.tsx b/src/components/dashboard/users/UserCardBox.tsx index ebfbc5998..28d38cce5 100644 --- a/src/components/dashboard/users/UserCardBox.tsx +++ b/src/components/dashboard/users/UserCardBox.tsx @@ -9,7 +9,7 @@ const createLinkElement = ({ user, renderImgUrl }: { user: UserDto, renderImgUrl __html: ` ${renderImgUrl} ` diff --git a/src/components/favoriteitems.js b/src/components/favoriteitems.js index c82910743..67137b917 100644 --- a/src/components/favoriteitems.js +++ b/src/components/favoriteitems.js @@ -148,7 +148,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer'; html += '
';
+ html += ' ';
html += globalize.translate('MessageBrowsePluginCatalog');
html += '