Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db6249f71 | ||
|
|
2926e845d2 | ||
|
|
ec6d5850d0 | ||
|
|
72a9f2cd39 | ||
|
|
874646a6dc | ||
|
|
d84073ee03 |
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"notes": "See the assets to download and install this version.",
|
||||
"pub_date": "2023-12-08T10:15:47.030Z",
|
||||
"platforms": {
|
||||
"darwin-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWVlb2tUSWF6NlRYL0dDYWVHK2hhWVpHVjkyeTFLMU9uM01QS0RhQ0huTnpsNDY5eUpiaHIzRlJxS0tGT3VPTWNkWlJWNCtPaXRlWlljZ1VFeEpSNUE4PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwNDI0CWZpbGU6SmVsbHlQbGF5ZXIuYXBwLnRhci5negpzMEx6WDlybVJkTmM4cE1oQThYKzhKT1BsNUlGUjB1MnNGUk4rYXVkNVJMMmoySks4VGp4bTd3a2Jtbm1kTnh2TDFKTXFRZXMzbTQyeXh6L2h3WjBEQT09Cg==",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/JellyPlayer_x64.app.tar.gz"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bWNQRlIzaTlNa2l4dHRGQk1hcVNIRUI5Z0Z4L0lEMktIWmhRT0RlS2RHMjBib240NHNlTWltbGZFY242cTNLM2xlTFpMdVh3WWw5a240QnVYNjF0Z2dzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwMzE0CWZpbGU6amVsbHktcGxheWVyXzAuMC4xX2FtZDY0LkFwcEltYWdlLnRhci5negpBQWhWcDhjZGJTdHYxSG95WUpYZE81WmFrWS8zeDYvNFJpYVRzV1ZKNnVNVXUvL3A0a21YOHV0aHFQR3cwU3Fka2ZNb2dYQkR6OHlIWTRtdnc3T2RCdz09Cg==",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/jelly-player_0.0.1_amd64.AppImage.tar.gz"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVROHVTNk5NMHU2bVJSTzNJTklhOGFjZUlwTnlPa1d3Zk5WazRzcWUrV0RqSWlvM2ZIWjYweVQ0TWtJK3ZtWEVPdmorbFpMN2M4TDhLdmR4QlJjdDAzWjV2T2NqcTQ3MkFvPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyMDMwNTIzCWZpbGU6SmVsbHlQbGF5ZXJfMC4wLjFfeDY0X2VuLVVTLm1zaS56aXAKU054eGZNSDlKeHJsOEVyT0VoczU3TjdIWU9jWGNiVUxvTWRac0ZUdmtRZ1Q1QStqS0NUOVVSRHVaUGJkNDNpc3NUNTFDaWRMOS9VRit2WnFCbVRyRGc9PQo=",
|
||||
"url": "https://github.com/prayag17/JellyPlayer/releases/download/v0.0.1-dev%40874646a/JellyPlayer_0.0.1_x64_en-US.msi.zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jellyplayer",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "jellyplayer"
|
||||
version = "1.0.0"
|
||||
version = "0.0.1"
|
||||
description = "A Modern Jellyfin Client"
|
||||
authors = ["prayag17", "JellyPlayer contributors (https://github.com/prayag17/JellyPlayer/graphs/contributors)"]
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "JellyPlayer",
|
||||
"version": "1.0.0"
|
||||
"version": "0.0.1"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
@@ -102,10 +102,10 @@
|
||||
"updater": {
|
||||
"active": true,
|
||||
"endpoints": [
|
||||
"https://cdn.jsdelivr.net/gh/prayag17/jellyplayer@latest/updater.json"
|
||||
"https://raw.githack.com/prayag17/JellyPlayer/main/latest.json"
|
||||
],
|
||||
"dialog": true,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE1MTczRTNFNjFGQ0JBOEMKUldTTXV2eGhQajRYRmNFSG5EYVF1VE1YaVA5Qjl2WGt6alFWOGo5UCs2SGprTGtNOC9WMC8wTjMK"
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk5QkE0QjMzOEQyRUI5M0MKUldROHVTNk5NMHU2bVMvS3VNRWZHRzhuWE1TRlg3WHI1VHBtZjFvVy80alZ2UHc4T3BqcHVGOWwK"
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
|
||||
+136
@@ -16,6 +16,11 @@ import {
|
||||
} from "react-router-dom";
|
||||
import { AnimatePresence, motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
checkUpdate,
|
||||
installUpdate,
|
||||
onUpdaterEvent,
|
||||
} from "@tauri-apps/api/updater";
|
||||
import { relaunch } from "@tauri-apps/api/process";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
@@ -34,6 +39,10 @@ import DialogTitle from "@mui/material/DialogTitle";
|
||||
import Button from "@mui/material/Button";
|
||||
import Slide from "@mui/material/Slide";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import LoadingButton from "@mui/lab/LoadingButton";
|
||||
|
||||
// Routes
|
||||
import { ServerSetup } from "./routes/setup/server";
|
||||
@@ -91,6 +100,7 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { CircularProgress } from "@mui/material";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { useCentralStore } from "./utils/store/central.js";
|
||||
import { useSnackbar } from "notistack";
|
||||
|
||||
const anim = {
|
||||
initial: {
|
||||
@@ -158,6 +168,14 @@ const AnimationWrapper = () => {
|
||||
);
|
||||
};
|
||||
|
||||
// const unlisten = await onUpdaterEvent(({ error, status }) => {
|
||||
// // This will log all updater events, including status updates and errors.
|
||||
// console.log("Updater event", error, status);
|
||||
// });
|
||||
|
||||
// // you need to call unlisten if your handler goes out of scope, for example if the component is unmounted.
|
||||
// unlisten();
|
||||
|
||||
function App() {
|
||||
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
|
||||
state.isPending,
|
||||
@@ -204,6 +222,43 @@ function App() {
|
||||
"a",
|
||||
],
|
||||
});
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const [updateDialog, setUpdateDialog] = useState(false);
|
||||
|
||||
/**
|
||||
* @type {[import("@tauri-apps/api/updater.js").UpdateManifest, React.Dispatch<import("@tauri-apps/api/updater.js").UpdateManifest>]}
|
||||
*/
|
||||
const [updateInfo, setUpdateInfo] = useState(null);
|
||||
|
||||
const [updateDialogButton, setUpdateDialogButton] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
async function checkForUpdates() {
|
||||
try {
|
||||
const { shouldUpdate, manifest } = await checkUpdate();
|
||||
|
||||
if (shouldUpdate) {
|
||||
setUpdateInfo(manifest);
|
||||
setUpdateDialog(true);
|
||||
// You could show a dialog asking the user if they want to install the update here.
|
||||
console.log(
|
||||
`Installing update ${manifest?.version}, ${manifest?.date}, ${manifest?.body}`,
|
||||
);
|
||||
|
||||
// Install the update. This will also restart the app on Windows!
|
||||
// await installUpdate();
|
||||
|
||||
// On macOS and Linux you will need to restart the app manually.
|
||||
// You could use this step to display another confirmation dialog.
|
||||
// await relaunch();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
checkForUpdates();
|
||||
}, []);
|
||||
|
||||
const [initialRoute] = useCentralStore((state) => [state.initialRoute]);
|
||||
|
||||
@@ -237,6 +292,87 @@ function App() {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Dialog
|
||||
// open={false}
|
||||
open={updateDialog}
|
||||
// onClose={}
|
||||
// maxWidth="md"
|
||||
fullWidth
|
||||
>
|
||||
{Boolean(updateInfo) && (
|
||||
<>
|
||||
<DialogTitle>
|
||||
Update Available!
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.5",
|
||||
}}
|
||||
>
|
||||
v{updateInfo.version}
|
||||
</Typography>
|
||||
</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
<DialogContentText>
|
||||
{updateInfo.body}
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions
|
||||
style={{
|
||||
padding: "1em",
|
||||
}}
|
||||
>
|
||||
<IconButton
|
||||
disabled={updateDialogButton}
|
||||
>
|
||||
<SvgIcon>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 16 16"
|
||||
>
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8" />
|
||||
</svg>
|
||||
</SvgIcon>
|
||||
</IconButton>
|
||||
<Button
|
||||
size="large"
|
||||
color="error"
|
||||
variant="outlined"
|
||||
disabled={updateDialogButton}
|
||||
onClick={() =>
|
||||
setUpdateDialog(false)
|
||||
}
|
||||
>
|
||||
close
|
||||
</Button>
|
||||
<LoadingButton
|
||||
size="large"
|
||||
color="success"
|
||||
variant="contained"
|
||||
loading={updateDialogButton}
|
||||
loadingIndicator="Updating..."
|
||||
onClick={async () => {
|
||||
setUpdateDialogButton(
|
||||
true,
|
||||
);
|
||||
await installUpdate();
|
||||
enqueueSnackbar(
|
||||
"Update has been installed! You need to relaunch JellyPlayer.",
|
||||
{
|
||||
variant: "success",
|
||||
},
|
||||
);
|
||||
await relaunch();
|
||||
}}
|
||||
>
|
||||
Update
|
||||
</LoadingButton>
|
||||
</DialogActions>
|
||||
</>
|
||||
)}
|
||||
</Dialog>
|
||||
<Dialog
|
||||
open={easterEgg}
|
||||
onClose={() => setEasterEgg(false)}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
Reference in new issue
Block a user