🔧 Fixes to AirDCPP searching WIP
1. Fixed the iterable for search results 2. Updated README 3. Listeners still a ?
This commit is contained in:
@@ -8,7 +8,7 @@ COPY package.json yarn.lock /usr/src/threetwo/
|
|||||||
COPY nodemon.json /usr/src/threetwo
|
COPY nodemon.json /usr/src/threetwo
|
||||||
COPY jsdoc.json /usr/src/threetwo
|
COPY jsdoc.json /usr/src/threetwo
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .build-deps make gcc g++ python \
|
RUN apk add --no-cache --virtual .build-deps git automake autoconf \
|
||||||
&& yarn \
|
&& yarn \
|
||||||
&& apk del .build-deps
|
&& apk del .build-deps
|
||||||
|
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ Then:
|
|||||||
6. Note that the first time, the process could take up to 10 minutes, since it is building containers for `threetwo`, `threetwo-import-service`, `comicvine-service`, `mongo`, `nats`, `nginx`
|
6. Note that the first time, the process could take up to 10 minutes, since it is building containers for `threetwo`, `threetwo-import-service`, `comicvine-service`, `mongo`, `nats`, `nginx`
|
||||||
7. For posterity, check that all containers are up using `docker ps`
|
7. For posterity, check that all containers are up using `docker ps`
|
||||||
|
|
||||||
### What runs where
|
### Ports
|
||||||
|
|
||||||
`threetwo` is the UI that is served on port `3050`
|
1. `threetwo`, the UI runs on port `8050`
|
||||||
`import` service is served on `3000`
|
2. `import` service on `3000`
|
||||||
`comicvine` service on `3080`
|
3. `comicvine` service on `3080`
|
||||||
|
|
||||||
## Local Development
|
## Local Development
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,10 @@ export const search = (data: SearchData) => async (dispatch) => {
|
|||||||
|
|
||||||
// Finally, perform the actual search
|
// Finally, perform the actual search
|
||||||
await SocketService.post(`search/${instance.id}/hub_search`, data);
|
await SocketService.post(`search/${instance.id}/hub_search`, data);
|
||||||
|
|
||||||
|
// removeSearchesSentListener();
|
||||||
|
// removeSeachResultAddedListener();
|
||||||
|
// removeSearchResultUpdatedListener();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("ERO", error);
|
console.log("ERO", error);
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
@@ -117,25 +117,23 @@ export const AcquisitionPanel = (
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>
|
{map(airDCPPSearchResults, ({ result }) => {
|
||||||
{JSON.stringify(airDCPPSearchResults)}</td></tr>
|
|
||||||
{/* {map(airDCPPSearchResults, ({ name, type, slots, users, id }) => {
|
|
||||||
return (
|
return (
|
||||||
<tr key={id}>
|
<tr key={result.id}>
|
||||||
<td>
|
<td>
|
||||||
<p className="mb-2">
|
<p className="mb-2">
|
||||||
{type.id === "directory" ? (
|
{result.type.id === "directory" ? (
|
||||||
<i className="fas fa-folder"></i>
|
<i className="fas fa-folder"></i>
|
||||||
) : null}{" "}
|
) : null}{" "}
|
||||||
{name}
|
{result.name}
|
||||||
</p>
|
</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dd>
|
<dd>
|
||||||
<div className="tags">
|
<div className="tags">
|
||||||
<span className="tag is-light is-info">
|
<span className="tag is-light is-info">
|
||||||
{users.user.nicks}
|
{result.users.user.nicks}
|
||||||
</span>
|
</span>
|
||||||
{users.user.flags.map((flag, idx) => (
|
{result.users.user.flags.map((flag, idx) => (
|
||||||
<span className="tag is-light" key={idx}>
|
<span className="tag is-light" key={idx}>
|
||||||
{flag}
|
{flag}
|
||||||
</span>
|
</span>
|
||||||
@@ -146,15 +144,19 @@ export const AcquisitionPanel = (
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span className="tag is-light is-info">
|
<span className="tag is-light is-info">
|
||||||
{type.id === "directory" ? "directory" : type.str}
|
{result.type.id === "directory"
|
||||||
|
? "directory"
|
||||||
|
: result.type.str}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div className="tags has-addons">
|
<div className="tags has-addons">
|
||||||
<span className="tag is-success">
|
<span className="tag is-success">
|
||||||
{slots.free} free
|
{result.slots.free} free
|
||||||
|
</span>
|
||||||
|
<span className="tag is-light">
|
||||||
|
{result.slots.total}
|
||||||
</span>
|
</span>
|
||||||
<span className="tag is-light">{slots.total}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -162,7 +164,7 @@ export const AcquisitionPanel = (
|
|||||||
onClick={() =>
|
onClick={() =>
|
||||||
downloadDCPPResult(
|
downloadDCPPResult(
|
||||||
searchInstance.id,
|
searchInstance.id,
|
||||||
id,
|
result.id,
|
||||||
props.comicBookMetadata._id,
|
props.comicBookMetadata._id,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -172,7 +174,7 @@ export const AcquisitionPanel = (
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})} */}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -20,10 +20,9 @@ const initialState = {
|
|||||||
function airdcppReducer(state = initialState, action) {
|
function airdcppReducer(state = initialState, action) {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case AIRDCPP_SEARCH_RESULTS_RECEIVED:
|
case AIRDCPP_SEARCH_RESULTS_RECEIVED:
|
||||||
console.log("Badan", action)
|
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
searchResults: action.groupedResult.result,
|
searchResults: [...state.searchResults, action.groupedResult],
|
||||||
isAirDCPPSearchInProgress: false,
|
isAirDCPPSearchInProgress: false,
|
||||||
};
|
};
|
||||||
case AIRDCPP_SEARCH_IN_PROGRESS:
|
case AIRDCPP_SEARCH_IN_PROGRESS:
|
||||||
@@ -56,11 +55,16 @@ function airdcppReducer(state = initialState, action) {
|
|||||||
};
|
};
|
||||||
case LOCATION_CHANGE:
|
case LOCATION_CHANGE:
|
||||||
return {
|
return {
|
||||||
initialState,
|
searchResults: [],
|
||||||
|
isAirDCPPSearchInProgress: false,
|
||||||
|
searchInfo: null,
|
||||||
|
searchInstance: null,
|
||||||
|
downloadResult: null,
|
||||||
|
bundleDBImportResult: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return { ...state };
|
return state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user