diff --git a/Dockerfile b/Dockerfile index bc81bb5..d00afe6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY package.json yarn.lock /usr/src/threetwo/ COPY nodemon.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 \ && apk del .build-deps diff --git a/README.md b/README.md index 3c82767..fcd2d9b 100644 --- a/README.md +++ b/README.md @@ -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` 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` -`import` service is served on `3000` -`comicvine` service on `3080` +1. `threetwo`, the UI runs on port `8050` +2. `import` service on `3000` +3. `comicvine` service on `3080` ## Local Development diff --git a/src/client/actions/airdcpp.actions.tsx b/src/client/actions/airdcpp.actions.tsx index b20f4d2..89e01fa 100644 --- a/src/client/actions/airdcpp.actions.tsx +++ b/src/client/actions/airdcpp.actions.tsx @@ -89,6 +89,10 @@ export const search = (data: SearchData) => async (dispatch) => { // Finally, perform the actual search await SocketService.post(`search/${instance.id}/hub_search`, data); + + // removeSearchesSentListener(); + // removeSeachResultAddedListener(); + // removeSearchResultUpdatedListener(); } catch (error) { console.log("ERO", error); throw error; diff --git a/src/client/components/AcquisitionPanel.tsx b/src/client/components/AcquisitionPanel.tsx index ba5e8dd..cabfcc5 100644 --- a/src/client/components/AcquisitionPanel.tsx +++ b/src/client/components/AcquisitionPanel.tsx @@ -117,25 +117,23 @@ export const AcquisitionPanel = ( - - {JSON.stringify(airDCPPSearchResults)} - {/* {map(airDCPPSearchResults, ({ name, type, slots, users, id }) => { + {map(airDCPPSearchResults, ({ result }) => { return ( - +

- {type.id === "directory" ? ( + {result.type.id === "directory" ? ( ) : null}{" "} - {name} + {result.name}

- {users.user.nicks} + {result.users.user.nicks} - {users.user.flags.map((flag, idx) => ( + {result.users.user.flags.map((flag, idx) => ( {flag} @@ -146,15 +144,19 @@ export const AcquisitionPanel = ( - {type.id === "directory" ? "directory" : type.str} + {result.type.id === "directory" + ? "directory" + : result.type.str}
- {slots.free} free + {result.slots.free} free + + + {result.slots.total} - {slots.total}
@@ -162,7 +164,7 @@ export const AcquisitionPanel = ( onClick={() => downloadDCPPResult( searchInstance.id, - id, + result.id, props.comicBookMetadata._id, ) } @@ -172,7 +174,7 @@ export const AcquisitionPanel = ( ); - })} */} + })} )} diff --git a/src/client/reducers/airdcpp.reducer.ts b/src/client/reducers/airdcpp.reducer.ts index 8c3f891..202901a 100644 --- a/src/client/reducers/airdcpp.reducer.ts +++ b/src/client/reducers/airdcpp.reducer.ts @@ -20,10 +20,9 @@ const initialState = { function airdcppReducer(state = initialState, action) { switch (action.type) { case AIRDCPP_SEARCH_RESULTS_RECEIVED: - console.log("Badan", action) return { ...state, - searchResults: action.groupedResult.result, + searchResults: [...state.searchResults, action.groupedResult], isAirDCPPSearchInProgress: false, }; case AIRDCPP_SEARCH_IN_PROGRESS: @@ -56,11 +55,16 @@ function airdcppReducer(state = initialState, action) { }; case LOCATION_CHANGE: return { - initialState, + searchResults: [], + isAirDCPPSearchInProgress: false, + searchInfo: null, + searchInstance: null, + downloadResult: null, + bundleDBImportResult: null, }; default: - return { ...state }; + return state; } }