Compare commits
3 Commits
4cae6cc479
...
92d80d403d
Author | SHA1 | Date | |
---|---|---|---|
92d80d403d | |||
2cba59a798 | |||
6e7559206f |
@ -8,7 +8,6 @@ export const PolochonMetadata = ({
|
|||||||
container,
|
container,
|
||||||
videoCodec,
|
videoCodec,
|
||||||
audioCodec,
|
audioCodec,
|
||||||
releaseGroup,
|
|
||||||
size,
|
size,
|
||||||
}) => {
|
}) => {
|
||||||
if (!quality || quality === "") {
|
if (!quality || quality === "") {
|
||||||
@ -17,12 +16,12 @@ export const PolochonMetadata = ({
|
|||||||
|
|
||||||
const s = size === 0 ? "" : prettySize(size);
|
const s = size === 0 ? "" : prettySize(size);
|
||||||
|
|
||||||
const metadata = [quality, container, videoCodec, audioCodec, releaseGroup, s]
|
const metadata = [quality, s, container, videoCodec, audioCodec]
|
||||||
.filter((m) => m && m !== "")
|
.filter((m) => m && m !== "")
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<span className="text text-muted">
|
||||||
<i className="fa fa-file-video-o mr-1" />
|
<i className="fa fa-file-video-o mr-1" />
|
||||||
{metadata}
|
{metadata}
|
||||||
</span>
|
</span>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useEffect, useState, useCallback } from "react";
|
import { useEffect, useState, useCallback } from "react";
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { setFetchedTorrents } from "../actions/torrents";
|
import { setFetchedTorrents } from "../actions/torrents";
|
||||||
import { newMovieEvent } from "../actions/movies";
|
import { newMovieEvent, getMovieDetails } from "../actions/movies";
|
||||||
import { newEpisodeEvent } from "../actions/shows";
|
import { newEpisodeEvent, getEpisodeDetails } from "../actions/shows";
|
||||||
|
|
||||||
export const WsHandler = () => {
|
export const WsHandler = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@ -67,8 +67,16 @@ export const WsHandler = () => {
|
|||||||
case "newVideo":
|
case "newVideo":
|
||||||
if (data.message.type === "movie") {
|
if (data.message.type === "movie") {
|
||||||
dispatch(newMovieEvent(data.message.data));
|
dispatch(newMovieEvent(data.message.data));
|
||||||
|
dispatch(getMovieDetails(data.message.data.imdb_id));
|
||||||
} else if (data.message.type === "episode") {
|
} else if (data.message.type === "episode") {
|
||||||
dispatch(newEpisodeEvent(data.message.data));
|
dispatch(newEpisodeEvent(data.message.data));
|
||||||
|
dispatch(
|
||||||
|
getEpisodeDetails(
|
||||||
|
data.message.data.show_imdb_id,
|
||||||
|
data.message.data.season,
|
||||||
|
data.message.data.episode
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -84,19 +84,30 @@ export default (state = defaultState, action) =>
|
|||||||
draft.show.tracked_episode = action.payload.episode; // eslint-disable-line camelcase
|
draft.show.tracked_episode = action.payload.episode; // eslint-disable-line camelcase
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "EPISODE_GET_DETAILS_PENDING":
|
case "EPISODE_GET_DETAILS_PENDING": {
|
||||||
draft.show.seasons
|
const imdbId = action.payload.main.imdbId;
|
||||||
.get(action.payload.main.season)
|
if (!draft.show || draft.show.imdb_id !== imdbId) {
|
||||||
.get(action.payload.main.episode).fetching = true;
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const season = action.payload.main.season;
|
||||||
|
const episode = action.payload.main.episode;
|
||||||
|
draft.show.seasons.get(season).get(episode).fetching = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "EPISODE_GET_DETAILS_FULFILLED": {
|
case "EPISODE_GET_DETAILS_FULFILLED": {
|
||||||
let episode = action.payload.response.data;
|
const imdbId = action.payload.main.imdbId;
|
||||||
if (!episode) {
|
if (!draft.show || draft.show.imdb_id !== imdbId) {
|
||||||
return draft;
|
break;
|
||||||
}
|
}
|
||||||
formatEpisode(episode);
|
|
||||||
draft.show.seasons.get(episode.season).set(episode.episode, episode);
|
const season = action.payload.main.season;
|
||||||
|
const episode = action.payload.main.episode;
|
||||||
|
|
||||||
|
let data = action.payload.response.data;
|
||||||
|
formatEpisode(data);
|
||||||
|
draft.show.seasons.get(season).set(episode, data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,10 @@ div.show.dropdown.nav-item > div {
|
|||||||
.video-details {
|
.video-details {
|
||||||
> div, > p, > span {
|
> div, > p, > span {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
@media (max-width: 330px) {
|
@media (max-height: 820px) {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
@media (max-height: 580px) {
|
||||||
margin-bottom: 0rem;
|
margin-bottom: 0rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user