diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 8c59f4a..fde912d 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -27,7 +27,7 @@ jobs: - name: Install Node, NPM and Yarn uses: actions/setup-node@v1 with: - node-version: '14.16.1' + node-version: '14.18.0' - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/.github/workflows/publish-linux.yml b/.github/workflows/publish-linux.yml index 1d26c27..8f6d04e 100644 --- a/.github/workflows/publish-linux.yml +++ b/.github/workflows/publish-linux.yml @@ -18,7 +18,7 @@ jobs: - name: Install Node, NPM and Yarn uses: actions/setup-node@v1 with: - node-version: '14.16.1' + node-version: '14.18.0' - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/.github/workflows/publish-macos.yml b/.github/workflows/publish-macos.yml index e6c1f4b..468016e 100644 --- a/.github/workflows/publish-macos.yml +++ b/.github/workflows/publish-macos.yml @@ -18,7 +18,7 @@ jobs: - name: Install Node, NPM and Yarn uses: actions/setup-node@v1 with: - node-version: '14.16.1' + node-version: '14.18.0' - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/.github/workflows/publish-windows.yml b/.github/workflows/publish-windows.yml index b25e759..2bc3232 100644 --- a/.github/workflows/publish-windows.yml +++ b/.github/workflows/publish-windows.yml @@ -18,7 +18,7 @@ jobs: - name: Install Node, NPM uses: actions/setup-node@v1 with: - node-version: '14.16.1' + node-version: '14.18.0' - name: Setup yarn run: npm install -g yarn diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a0bca19..7f83be6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: - name: Install Node.js, NPM and Yarn uses: actions/setup-node@v1 with: - node-version: '14.16.1' + node-version: '14.18.0' - name: yarn install run: | diff --git a/README.md b/README.md index db73a0c..3a073a9 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ To package apps for the local platform: yarn package ``` -If you receive errors while packaging the application, try upgrading/downgrading your Node version (tested on v14.16.1). +If you receive errors while packaging the application, try upgrading/downgrading your Node version (tested on v14.18.0). If you are unable to run via debug in VS Code, check troubleshooting steps [here](https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues/2757#issuecomment-784200527). diff --git a/package.json b/package.json index a0b5935..20ed255 100644 --- a/package.json +++ b/package.json @@ -174,16 +174,16 @@ "@types/jest": "^26.0.15", "@types/lodash": "^4.14.172", "@types/md5": "^2.3.1", - "@types/node": "14.14.10", + "@types/node": "14.18.0", "@types/randomstring": "^1.1.7", - "@types/react": "^16.9.44", + "@types/react": "^17.0.2", "@types/react-chartjs-2": "^2.5.7", "@types/react-dnd": "^3.0.2", - "@types/react-dom": "^16.9.9", + "@types/react-dom": "^17.0.2", "@types/react-lazy-load-image-component": "^1.5.2", "@types/react-redux": "^7.1.18", "@types/react-router-dom": "^5.1.6", - "@types/react-test-renderer": "^16.9.3", + "@types/react-test-renderer": "^17.0.1", "@types/react-transition-group": "^4.4.4", "@types/react-virtualized": "^9.21.13", "@types/react-virtualized-auto-sizer": "^1.0.1", @@ -292,7 +292,6 @@ "react-query": "^3.19.1", "react-redux": "^7.2.4", "react-router-dom": "^5.2.0", - "react-transition-group": "^4.4.2", "react-use": "^17.3.2", "react-virtualized-auto-sizer": "^1.0.6", "react-window": "^1.8.6", @@ -325,4 +324,4 @@ "pre-commit": "lint-staged" } } -} \ No newline at end of file +} diff --git a/src/api/jellyfinApi.ts b/src/api/jellyfinApi.ts index 7b4568b..c58dfdf 100644 --- a/src/api/jellyfinApi.ts +++ b/src/api/jellyfinApi.ts @@ -629,12 +629,12 @@ export const getStarred = async (options: { musicFolderId?: string }) => { }); return { - album: ( - songAndAlbumData.Items.filter((data: any) => data.Type === 'MusicAlbum') || [] - ).map((entry: any) => normalizeAlbum(entry)), - song: ( - songAndAlbumData.Items.filter((data: any) => data.Type === 'Audio') || [] - ).map((entry: any) => normalizeSong(entry)), + album: (songAndAlbumData.Items.filter((data: any) => data.Type === 'MusicAlbum') || []).map( + (entry: any) => normalizeAlbum(entry) + ), + song: (songAndAlbumData.Items.filter((data: any) => data.Type === 'Audio') || []).map( + (entry: any) => normalizeSong(entry) + ), artist: (artistData.Items || []).map((entry: any) => normalizeArtist(entry)), }; }; diff --git a/src/components/debug/DebugWindow.tsx b/src/components/debug/DebugWindow.tsx index b00b210..ccad1ca 100644 --- a/src/components/debug/DebugWindow.tsx +++ b/src/components/debug/DebugWindow.tsx @@ -35,29 +35,6 @@ const DebugWindow = ({ ...rest }) => { ], }; - const fadeChartOptions = { - scales: { - yAxes: [ - { - ticks: { - beginAtZero: true, - }, - }, - ], - }, - plugins: { - title: { - display: true, - text: `${playQueue.player1.fadeData.volumeData.length} fades`, - position: 'bottom', - }, - legend: { - display: false, - }, - }, - animation: false, - }; - return ( { - + diff --git a/src/components/layout/GenericPage.tsx b/src/components/layout/GenericPage.tsx index d0503a4..7cc4152 100644 --- a/src/components/layout/GenericPage.tsx +++ b/src/components/layout/GenericPage.tsx @@ -13,10 +13,8 @@ const GenericPage = ({ header, children, hideDivider, ...rest }: any) => { if (misc.dynamicBackground) { const cachedImagePath = `${misc.imageCachePath}album_${playQueue.current?.albumId}.jpg`; const serverImagePath = playQueue.current?.image.replace(/size=\d+/, 'size=500'); - const cssBackgroundImagePath = `${misc.imageCachePath}album_${playQueue.current?.albumId}.jpg`.replaceAll( - '\\', - '/' - ); + const cssBackgroundImagePath = + `${misc.imageCachePath}album_${playQueue.current?.albumId}.jpg`.replaceAll('\\', '/'); if (!isCached(cachedImagePath)) { const preloadImage = new Image(); diff --git a/src/components/library/AlbumList.tsx b/src/components/library/AlbumList.tsx index d27093c..c36d89a 100644 --- a/src/components/library/AlbumList.tsx +++ b/src/components/library/AlbumList.tsx @@ -81,7 +81,12 @@ const AlbumList = () => { } }, [config.serverType, musicFolder.id, view.album.filter, view.album.pagination]); - const { isLoading, isError, data: albums, error }: any = useQuery( + const { + isLoading, + isError, + data: albums, + error, + }: any = useQuery( currentQueryKey, () => view.album.filter === 'random' || @@ -166,14 +171,8 @@ const AlbumList = () => { 'year', ]); - const { - filteredData, - byArtistData, - byArtistBaseData, - byGenreData, - byStarredData, - byYearData, - } = useAdvancedFilter(albums?.data, view.album.advancedFilters); + const { filteredData, byArtistData, byArtistBaseData, byGenreData, byStarredData, byYearData } = + useAdvancedFilter(albums?.data, view.album.advancedFilters); const { sortColumns, sortedData } = useColumnSort(filteredData, Item.Album, view.album.sort); diff --git a/src/components/library/ArtistList.tsx b/src/components/library/ArtistList.tsx index 62cc1fd..640208d 100644 --- a/src/components/library/ArtistList.tsx +++ b/src/components/library/ArtistList.tsx @@ -40,7 +40,12 @@ const ArtistList = () => { } }, [folder]); - const { isLoading, isError, data: artists, error }: any = useQuery( + const { + isLoading, + isError, + data: artists, + error, + }: any = useQuery( ['artistList', musicFolder], () => apiController({ diff --git a/src/components/library/FolderList.tsx b/src/components/library/FolderList.tsx index cd8dc71..81034a7 100644 --- a/src/components/library/FolderList.tsx +++ b/src/components/library/FolderList.tsx @@ -34,14 +34,17 @@ const FolderList = () => { const [musicFolder, setMusicFolder] = useState(folder.musicFolder); const folderPickerContainerRef = useRef(null); - const { isLoading, isError, data: indexData, error }: any = useQuery( - ['indexes', musicFolder], - () => - apiController({ - serverType: config.serverType, - endpoint: 'getIndexes', - args: config.serverType === Server.Subsonic ? { musicFolderId: musicFolder } : null, - }) + const { + isLoading, + isError, + data: indexData, + error, + }: any = useQuery(['indexes', musicFolder], () => + apiController({ + serverType: config.serverType, + endpoint: 'getIndexes', + args: config.serverType === Server.Subsonic ? { musicFolderId: musicFolder } : null, + }) ); const { isLoading: isLoadingFolderData, data: folderData }: any = useQuery( diff --git a/src/components/library/GenreList.tsx b/src/components/library/GenreList.tsx index 49f6ae0..7f2bc4a 100644 --- a/src/components/library/GenreList.tsx +++ b/src/components/library/GenreList.tsx @@ -22,7 +22,12 @@ const GenreList = () => { const config = useAppSelector((state) => state.config); const misc = useAppSelector((state) => state.misc); const folder = useAppSelector((state) => state.folder); - const { isLoading, isError, data: genres, error }: any = useQuery(['genrePageList'], async () => { + const { + isLoading, + isError, + data: genres, + error, + }: any = useQuery(['genrePageList'], async () => { const res = await apiController({ serverType: config.serverType, endpoint: 'getGenres', diff --git a/src/components/library/MusicList.tsx b/src/components/library/MusicList.tsx index 6c9f7bf..7c1612a 100644 --- a/src/components/library/MusicList.tsx +++ b/src/components/library/MusicList.tsx @@ -70,7 +70,12 @@ const MusicList = () => { } }, [musicFolder.id, view.music.filter, view.music.pagination]); - const { isLoading, isError, data: songs, error }: any = useQuery( + const { + isLoading, + isError, + data: songs, + error, + }: any = useQuery( currentQueryKey, () => view.music.filter === 'random' || diff --git a/src/components/player/NowPlayingInfoView.tsx b/src/components/player/NowPlayingInfoView.tsx index dd251e3..c954f52 100644 --- a/src/components/player/NowPlayingInfoView.tsx +++ b/src/components/player/NowPlayingInfoView.tsx @@ -5,7 +5,6 @@ import { LazyLoadImage } from 'react-lazy-load-image-component'; import { useQuery, useQueryClient } from 'react-query'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; -import { CSSTransition } from 'react-transition-group'; import { apiController } from '../../api/controller'; import { useAppDispatch, useAppSelector } from '../../redux/hooks'; @@ -129,13 +128,7 @@ const NowPlayingInfoView = () => { } return ( - +
{currentArtist && playQueue.entry?.length > 0 && ( <> @@ -353,7 +346,7 @@ const NowPlayingInfoView = () => { )} )} - +
); }; diff --git a/src/components/playlist/PlaylistList.tsx b/src/components/playlist/PlaylistList.tsx index dd4f634..e2e9d75 100644 --- a/src/components/playlist/PlaylistList.tsx +++ b/src/components/playlist/PlaylistList.tsx @@ -33,7 +33,12 @@ const PlaylistList = () => { const playlistTriggerRef = useRef(); const [newPlaylistName, setNewPlaylistName] = useState(''); const [viewType, setViewType] = useState(settings.getSync('playlistViewType') || 'list'); - const { isLoading, isError, data: playlists, error }: any = useQuery(['playlists'], () => + const { + isLoading, + isError, + data: playlists, + error, + }: any = useQuery(['playlists'], () => apiController({ serverType: config.serverType, endpoint: 'getPlaylists' }) ); const filteredData = useSearchQuery(misc.searchQuery, playlists, ['title', 'comment', 'owner']); diff --git a/src/components/search/SearchView.tsx b/src/components/search/SearchView.tsx index 5a48b8f..bfe1a03 100644 --- a/src/components/search/SearchView.tsx +++ b/src/components/search/SearchView.tsx @@ -198,19 +198,15 @@ const SearchView = () => { }, }); - const { - handleRowClick: handleAlbumRowClick, - handleRowDoubleClick: handleAlbumRowDoubleClick, - } = useListClickHandler({ - doubleClick: (rowData: any) => history.push(`/library/album/${rowData.id}`), - }); + const { handleRowClick: handleAlbumRowClick, handleRowDoubleClick: handleAlbumRowDoubleClick } = + useListClickHandler({ + doubleClick: (rowData: any) => history.push(`/library/album/${rowData.id}`), + }); - const { - handleRowClick: handleArtistRowClick, - handleRowDoubleClick: handleArtistRowDoubleClick, - } = useListClickHandler({ - doubleClick: (rowData: any) => history.push(`/library/artist/${rowData.id}`), - }); + const { handleRowClick: handleArtistRowClick, handleRowDoubleClick: handleArtistRowDoubleClick } = + useListClickHandler({ + doubleClick: (rowData: any) => history.push(`/library/artist/${rowData.id}`), + }); return (