Skip to content

Commit

Permalink
Merge pull request #20 from ci7lus/chore/unrequired-mirakurun
Browse files Browse the repository at this point in the history
Mirakurunが設定されていなくても再生開始できるように
  • Loading branch information
ci7lus authored May 5, 2023
2 parents a189343 + b5363d5 commit ab0bdac
Show file tree
Hide file tree
Showing 45 changed files with 3,924 additions and 1,499 deletions.
105 changes: 54 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,82 +21,82 @@
"build:sync": "webpack --color -c webpack-prebuild.config.ts"
},
"devDependencies": {
"@ci7lus/eslint-config": "^1.1.0",
"@graphql-codegen/add": "^3.2.0",
"@graphql-codegen/cli": "^2.9.0",
"@graphql-codegen/typescript": "^2.7.2",
"@graphql-codegen/typescript-graphql-request": "^4.5.2",
"@graphql-codegen/typescript-operations": "^2.5.2",
"@tailwindcss/forms": "^0.5.2",
"@types/discord-rpc": "^4.0.3",
"@ci7lus/eslint-config": "^1.1.1",
"@graphql-codegen/add": "^3",
"@graphql-codegen/cli": "2.9.0",
"@graphql-codegen/typescript": "^3.0.4",
"@graphql-codegen/typescript-graphql-request": "4.5.9",
"@graphql-codegen/typescript-operations": "^3.0.4",
"@tailwindcss/forms": "^0.5.3",
"@types/discord-rpc": "^4.0.4",
"@types/dplayer": "^1.25.2",
"@types/gapi.client.drive": "^3.0.13",
"@types/koa": "^2.13.5",
"@types/koa__router": "^8.0.11",
"@types/node": "^16.10.2",
"@types/gapi.client.drive": "^3.0.15",
"@types/koa": "^2.13.6",
"@types/koa__router": "^12.0.0",
"@types/node": "^18.16.3",
"@types/postcss-import": "^14.0.0",
"@types/react-table": "^7.7.12",
"@types/react-table": "^7.7.14",
"@types/tailwindcss": "^3.1.0",
"@types/twitter-text": "^3.1.2",
"@types/twitter-text": "^3.1.5",
"@types/url-join": "^4.0.1",
"@types/webpack": "^5.28.0",
"@types/webpack-bundle-analyzer": "^4.4.1",
"@types/webpack": "^5.28.1",
"@types/webpack-bundle-analyzer": "^4.6.0",
"assert": "^2.0.0",
"autoprefixer": "^10.4.7",
"autoprefixer": "^10.4.14",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"css-loader": "^6.7.1",
"esbuild-loader": "^2.19.0",
"eslint-plugin-classnames": "^0.2.1",
"css-loader": "^6.7.3",
"esbuild-loader": "^2",
"eslint-plugin-classnames": "^0.3.1",
"https-browserify": "^1.0.0",
"husky": "^8.0.1",
"husky": "^8.0.3",
"license-webpack-plugin": "^4.0.2",
"lint-staged": "^13.0.3",
"lint-staged": "^13.2.2",
"path-browserify": "^1.0.1",
"postcss": "^8.4.14",
"postcss-import": "^14.1.0",
"postcss-loader": "^7.0.1",
"prettier": "^2.7.1",
"postcss": "^8.4.23",
"postcss-import": "^15.1.0",
"postcss-loader": "^7.3.0",
"prettier": "^2.8.8",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
"sass": "^1.62.1",
"sass-loader": "^13.2.2",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tailwindcss": "^3.1.6",
"tailwindcss": "^3.3.2",
"ts-node": "^10.9.1",
"twitter-d": "^0.6.0",
"typescript": "^4.7.4",
"typescript": "^5.0.4",
"url": "^0.11.0",
"util": "^0.12.4",
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.10.0"
"util": "^0.12.5",
"webpack": "^5.82.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.2"
},
"dependencies": {
"@headlessui/react": "^1.6.6",
"@headlessui/react": "^1.7.14",
"@koa/router": "^12.0.0",
"@neneka/dplayer": "^1.27.2",
"@tanstack/react-table": "^8.5.11",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"axios": "^1.0.0-alpha.1",
"axios-retry": "^3.3.1",
"bonjour-service": "^1.0.14",
"@tanstack/react-table": "^8.9.1",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.3",
"axios": "^0",
"axios-retry": "^3.4.0",
"bonjour-service": "^1.1.1",
"clsx": "^1.2.1",
"dayjs": "^1.11.3",
"dayjs": "^1.11.7",
"discord-rpc": "^4.0.1",
"eventmit": "^1.1.0",
"fast-xml-parser": "^4.0.9",
"format-duration": "^2.0.0",
"eventmit": "^2.0.4",
"fast-xml-parser": "^4.2.2",
"format-duration": "^3.0.2",
"get-port": "^6.1.2",
"graphql": "^16.5.0",
"interweave": "^13.0.0",
"graphql": "^16.6.0",
"interweave": "^13.1.0",
"interweave-autolink": "^5.1.0",
"js-base64": "^3.7.2",
"koa": "^2.13.4",
"js-base64": "^3.7.5",
"koa": "^2.14.2",
"koa-easy-ws": "^2.1.0",
"pretty-bytes": "^6.0.0",
"pretty-bytes": "^6.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
Expand All @@ -105,7 +105,7 @@
"recoil": "^0.7.4",
"recoil-sync": "0.1.1-alpha.1",
"reconnecting-websocket": "^4.4.0",
"twitter-api-client": "^1.5.2",
"twitter-api-client": "^1.6.1",
"twitter-text": "^3.1.0",
"url-join": "^5.0.0",
"yaml": "^1"
Expand All @@ -115,6 +115,9 @@
"eslint": "*",
"utf-8-validate": "^5.0.6"
},
"resolutions": {
"@graphql-tools/prisma-loader": "7.2.2"
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --max-warnings 0 --cache",
"*.{js,ts,tsx,md}": "prettier"
Expand Down
16 changes: 8 additions & 8 deletions src/@types/plugin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ declare const ChannelPolarityEnum: {
readonly V: "V"
}
declare type ChannelPolarityEnum =
typeof ChannelPolarityEnum[keyof typeof ChannelPolarityEnum]
(typeof ChannelPolarityEnum)[keyof typeof ChannelPolarityEnum]
declare const ChannelType: {
readonly Gr: "GR"
readonly Bs: "BS"
readonly Cs: "CS"
readonly Sky: "SKY"
}
declare type ChannelType = typeof ChannelType[keyof typeof ChannelType]
declare type ChannelType = (typeof ChannelType)[keyof typeof ChannelType]
/**
*
* @export
Expand Down Expand Up @@ -436,7 +436,7 @@ declare const ProgramAudioSamplingRate: {
readonly NUMBER_48000: 48000
}
declare type ProgramAudioSamplingRate =
typeof ProgramAudioSamplingRate[keyof typeof ProgramAudioSamplingRate]
(typeof ProgramAudioSamplingRate)[keyof typeof ProgramAudioSamplingRate]
interface ProgramAudios {
/**
*
Expand Down Expand Up @@ -482,7 +482,7 @@ declare const ProgramAudiosLangsEnum: {
readonly Etc: "etc"
}
declare type ProgramAudiosLangsEnum =
typeof ProgramAudiosLangsEnum[keyof typeof ProgramAudiosLangsEnum]
(typeof ProgramAudiosLangsEnum)[keyof typeof ProgramAudiosLangsEnum]
interface ProgramGenre {
/**
*
Expand Down Expand Up @@ -590,14 +590,14 @@ declare const ProgramVideoResolution: {
readonly _4320p: "4320p"
}
declare type ProgramVideoResolution =
typeof ProgramVideoResolution[keyof typeof ProgramVideoResolution]
(typeof ProgramVideoResolution)[keyof typeof ProgramVideoResolution]
declare const ProgramVideoType: {
readonly Mpeg2: "mpeg2"
readonly H264: "h.264"
readonly H265: "h.265"
}
declare type ProgramVideoType =
typeof ProgramVideoType[keyof typeof ProgramVideoType]
(typeof ProgramVideoType)[keyof typeof ProgramVideoType]
interface RelatedItem {
/**
*
Expand Down Expand Up @@ -630,7 +630,7 @@ declare const RelatedItemTypeEnum: {
readonly Movement: "movement"
}
declare type RelatedItemTypeEnum =
typeof RelatedItemTypeEnum[keyof typeof RelatedItemTypeEnum]
(typeof RelatedItemTypeEnum)[keyof typeof RelatedItemTypeEnum]
/**
*
* @export
Expand Down Expand Up @@ -22353,7 +22353,7 @@ declare type OpenWindowArg = {
playingContent?: ContentPlayerPlayingContent
}
declare type OpenBuiltinWindowArg = {
name: Omit<keyof typeof ROUTES, typeof ROUTES["ContentPlayer"]>
name: Omit<keyof typeof ROUTES, (typeof ROUTES)["ContentPlayer"]>
}
declare type OpenContentPlayerWindowArgs = {
playingContent?: ContentPlayerPlayingContent
Expand Down
9 changes: 4 additions & 5 deletions src/miraktest-annict/AnnictRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import { useThrottleFn } from "react-use"
import { atom, useRecoilValue, useRecoilState, useSetRecoilState } from "recoil"
import { syncEffect } from "recoil-sync"
import YAML from "yaml"
import { InitPlugin } from "../@types/plugin"
import { SayaDefinition } from "../miraktest-saya/types"
import tailwind from "../tailwind.scss"
import { AnnictTrack } from "./components/AnnictTrack"
import {
ANNICT_META,
ANNICT_PLUGIN_PREFIX,
ANNICT_TRACK_WINDOW_ID,
} from "./constants"
import { AnnictSetting, ARM } from "./types"
import { InitPlugin } from "../@types/plugin"
import { SayaDefinition } from "../miraktest-saya/types"
import tailwind from "../tailwind.scss"

/**
* MirakTest Annict Plugin
Expand Down Expand Up @@ -219,7 +219,6 @@ export const AnnictRenderer: InitPlugin["renderer"] = ({
atoms.globalContentPlayerPlayingContentFamily(activeId ?? 0)
)
const time = useRecoilValue(timeAtom)
const services = useRecoilValue(atoms.mirakurunServicesSelector)
useEffect(() => {
rpc.setWindowTitle(`Annict - ${appInfo.name}`)
}, [])
Expand Down Expand Up @@ -259,7 +258,7 @@ export const AnnictRenderer: InitPlugin["renderer"] = ({
"leading-loose"
)}
>
{setting.accessToken && services && sayaDefinition && arm ? (
{setting.accessToken && sayaDefinition && arm ? (
<AnnictTrack
accessToken={setting.accessToken}
playingContent={playingContent}
Expand Down
2 changes: 1 addition & 1 deletion src/miraktest-annict/components/AnnictTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import clsx from "clsx"
import React, { useEffect, useState } from "react"
import { Link } from "react-feather"
import Recoil, { useRecoilState } from "recoil"
import { SearchWorkForm } from "./SeachWorkForm"
import { ContentPlayerPlayingContent } from "../../@types/plugin"
import { SayaDefinition } from "../../miraktest-saya/types"
import { AnnictRESTAPI, generateGqlClient } from "../annictAPI"
Expand All @@ -14,7 +15,6 @@ import {
import { detectProgramInfo } from "../findWork"
import { RatingState, StatusState, WorkFragment } from "../gql"
import { ARM } from "../types"
import { SearchWorkForm } from "./SeachWorkForm"

export const AnnictTrack: React.FC<{
accessToken: string
Expand Down
2 changes: 1 addition & 1 deletion src/miraktest-annict/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ANNICT_META = {
id: ANNICT_PLUGIN_ID,
name: "Annict",
author: "ci7lus",
version: "0.3.7",
version: "0.4.0",
description: "視聴中の番組をAnnictで記録する",
authorUrl: "https://github.com/ci7lus",
url: "https://github.com/ci7lus/miraktest-plugins/tree/master/src/miraktest-annict",
Expand Down
6 changes: 3 additions & 3 deletions src/miraktest-annict/findWork.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import dayjs from "dayjs"
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
import { Program } from "../@types/plugin"
import { SayaDefinitionChannel } from "../miraktest-saya/types"
import { wait } from "../shared/utils"
import { AnnictRESTAPI } from "./annictAPI"
import { SyobocalAPI } from "./syobocalAPI"
import { ARM } from "./types"
import { Program } from "../@types/plugin"
import { SayaDefinitionChannel } from "../miraktest-saya/types"
import { wait } from "../shared/utils"

dayjs.extend(isSameOrAfter)
dayjs.extend(isSameOrBefore)
Expand Down
Loading

0 comments on commit ab0bdac

Please sign in to comment.