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