mirror of
https://github.com/dev-claw/vripper-project.git
synced 2026-08-19 08:35:41 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6b395cf4c | ||
|
|
e72edeed62 |
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [2.11.2] - 2020-04-26
|
||||
### Changed
|
||||
- Bug fixes
|
||||
|
||||
## [2.11.1] - 2020-04-25
|
||||
### Changed
|
||||
- Code source maintenance
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>2.11.1</version>
|
||||
<version>2.11.2</version>
|
||||
<packaging>pom</packaging>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vripper-electron",
|
||||
"version": "2.11.1",
|
||||
"version": "2.11.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vripper-electron",
|
||||
"version": "2.11.1",
|
||||
"version": "2.11.2",
|
||||
"description": "A ripper for vipergirls.to built using web technolgies",
|
||||
"main": "main.js",
|
||||
"author": "death-claw <53543762+death-claw@users.noreply.github.com>",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>2.11.1</version>
|
||||
<version>2.11.2</version>
|
||||
</parent>
|
||||
<artifactId>vripper-electron</artifactId>
|
||||
<name>vripper-electron</name>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>2.11.1</version>
|
||||
<version>2.11.2</version>
|
||||
</parent>
|
||||
<artifactId>vripper-server</artifactId>
|
||||
<name>vripper-server</name>
|
||||
|
||||
+4
-3
@@ -168,14 +168,15 @@ public class PostRestEndpoint {
|
||||
|
||||
@GetMapping("/grab/{threadId}")
|
||||
@ResponseStatus(value = HttpStatus.OK)
|
||||
public List<VRPostState> grab(@PathVariable("threadId") @NonNull ThreadId threadId) throws Exception {
|
||||
QueuedVGLink queuedVGLink = appStateExchange.getQueue().values().stream().filter(e -> e.getThreadId().equals(threadId.getThreadId())).findFirst().orElseThrow();
|
||||
public List<VRPostState> grab(@PathVariable("threadId") @NonNull String threadId) throws Exception {
|
||||
QueuedVGLink queuedVGLink = appStateExchange.getQueue().values().stream().filter(e -> e.getThreadId().equals(threadId)).findFirst().orElseThrow();
|
||||
return vgHandler.getCache().get(queuedVGLink);
|
||||
}
|
||||
|
||||
@PostMapping("/grab/remove")
|
||||
@ResponseStatus(value = HttpStatus.OK)
|
||||
public void grabRemove(@RequestBody @NonNull ThreadId threadId) {
|
||||
public ThreadId grabRemove(@RequestBody @NonNull ThreadId threadId) {
|
||||
vgHandler.remove(threadId.getThreadId());
|
||||
return threadId;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-7
@@ -1,18 +1,15 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class AltPostName {
|
||||
private final String postId;
|
||||
private final String altName;
|
||||
|
||||
public AltPostName(String postId, String altName) {
|
||||
this.postId = postId;
|
||||
this.altName = altName;
|
||||
}
|
||||
private String postId;
|
||||
private String altName;
|
||||
}
|
||||
+2
@@ -1,11 +1,13 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class DownloadPath {
|
||||
private String path;
|
||||
|
||||
+4
-2
@@ -1,16 +1,18 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class PostId {
|
||||
private String postId;
|
||||
|
||||
public PostId(String postId) {
|
||||
this.postId = postId;
|
||||
}
|
||||
|
||||
private String postId;
|
||||
}
|
||||
+2
@@ -1,11 +1,13 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class PostToAdd {
|
||||
private String threadId;
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@@ -8,6 +9,7 @@ import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class RemoveAllResult {
|
||||
private List<String> postIds;
|
||||
|
||||
+2
@@ -3,10 +3,12 @@ package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class RemoveResult {
|
||||
private String postId;
|
||||
|
||||
|
||||
+2
-4
@@ -1,16 +1,14 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class ThreadId {
|
||||
public ThreadId(String threadId) {
|
||||
this.threadId = threadId;
|
||||
}
|
||||
|
||||
private String threadId;
|
||||
}
|
||||
+2
@@ -1,11 +1,13 @@
|
||||
package tn.mnlr.vripper.web.restendpoints.domain.posts;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class ThreadUrl {
|
||||
private String url;
|
||||
|
||||
@@ -5,5 +5,5 @@ logging.file=${base.dir}/.vripper/vripper.log
|
||||
server.port=${vripper.server.port:8080}
|
||||
management.endpoints.web.exposure.include=shutdown
|
||||
management.endpoint.shutdown.enabled=true
|
||||
#spring.profiles.active=portable
|
||||
spring.profiles.active=installer
|
||||
spring.profiles.active=portable
|
||||
#spring.profiles.active=installer
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vripper-ui",
|
||||
"version": "2.11.1",
|
||||
"version": "2.11.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vripper-ui",
|
||||
"version": "2.11.1",
|
||||
"version": "2.11.2",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tn.mnlr</groupId>
|
||||
<artifactId>vripper</artifactId>
|
||||
<version>2.11.1</version>
|
||||
<version>2.11.2</version>
|
||||
</parent>
|
||||
<artifactId>vripper-ui</artifactId>
|
||||
<name>vripper-ui</name>
|
||||
|
||||
@@ -37,7 +37,7 @@ export class GrabQueueComponent implements OnInit {
|
||||
},
|
||||
overlayLoadingTemplate: '<span></span>',
|
||||
overlayNoRowsTemplate: '<span></span>',
|
||||
getRowNodeId: data => data['link'],
|
||||
getRowNodeId: data => data['threadId'],
|
||||
onGridReady: () => {
|
||||
this.gridOptions.api.sizeColumnsToFit();
|
||||
this.dataSource = new GrabQueueDataSource(this.wsConnection, this.gridOptions, this.zone, this.notificationService);
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { flatMap, filter } from 'rxjs/operators';
|
||||
import { GrabQueueState } from './grab-queue.model';
|
||||
import { CMD } from './../common/cmd.enum';
|
||||
import { WSMessage } from './../common/ws-message.model';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { WsConnectionService } from '../ws-connection.service';
|
||||
import { NotificationService } from '../notification.service';
|
||||
import { GridOptions } from 'ag-grid-community';
|
||||
import { NgZone } from '@angular/core';
|
||||
import {GrabQueueState} from './grab-queue.model';
|
||||
import {CMD} from './../common/cmd.enum';
|
||||
import {WSMessage} from './../common/ws-message.model';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {WsConnectionService} from '../ws-connection.service';
|
||||
import {NotificationService} from '../notification.service';
|
||||
import {GridOptions, RowNode} from 'ag-grid-community';
|
||||
import {NgZone} from '@angular/core';
|
||||
|
||||
export class GrabQueueDataSource {
|
||||
constructor(
|
||||
@@ -14,7 +13,8 @@ export class GrabQueueDataSource {
|
||||
private gridOptions: GridOptions,
|
||||
private zone: NgZone,
|
||||
private notificationService: NotificationService
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
subscriptions: Subscription[] = [];
|
||||
grabQueueSub: Subscription;
|
||||
@@ -30,13 +30,14 @@ export class GrabQueueDataSource {
|
||||
const toUpdate = [];
|
||||
const toRemove = [];
|
||||
e.forEach(v => {
|
||||
const rowNode: RowNode = this.gridOptions.api.getRowNode(v.threadId);
|
||||
if (v.removed) {
|
||||
if (this.gridOptions.api.getRowNode(v.link) != null) {
|
||||
toRemove.push(this.gridOptions.api.getRowNode(v.link).data);
|
||||
if (rowNode != null) {
|
||||
toRemove.push(rowNode.data);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.gridOptions.api.getRowNode(v.link) == null) {
|
||||
if (rowNode == null) {
|
||||
toAdd.push(v);
|
||||
} else {
|
||||
toUpdate.push(v);
|
||||
|
||||
@@ -2,7 +2,7 @@ import {ElectronService} from 'ngx-electron';
|
||||
import {MultiPostComponent} from '../multi-post/multi-post.component';
|
||||
import {ChangeDetectionStrategy, Component, NgZone, OnDestroy, OnInit} from '@angular/core';
|
||||
import {AgRendererComponent} from 'ag-grid-angular';
|
||||
import {ICellRendererParams} from 'ag-grid-community';
|
||||
import {GridApi, ICellRendererParams} from 'ag-grid-community';
|
||||
import {GrabQueueState} from './grab-queue.model';
|
||||
import {MatDialog} from '@angular/material/dialog';
|
||||
import {MatSnackBar} from '@angular/material/snack-bar';
|
||||
@@ -32,7 +32,7 @@ export class UrlGrabRendererComponent implements OnInit, OnDestroy, AgRendererCo
|
||||
}
|
||||
|
||||
private grabQueue: GrabQueueState;
|
||||
private params: ICellRendererParams;
|
||||
private api: GridApi;
|
||||
private isExtraSmall: Observable<BreakpointState> = this.breakpointObserver.observe(Breakpoints.XSmall);
|
||||
|
||||
grabQueue$: Subject<GrabQueueState> = new BehaviorSubject(null);
|
||||
@@ -69,6 +69,7 @@ export class UrlGrabRendererComponent implements OnInit, OnDestroy, AgRendererCo
|
||||
}
|
||||
|
||||
agInit(params: ICellRendererParams): void {
|
||||
this.api = params.api;
|
||||
this.grabQueue = params.data;
|
||||
this.grabQueue$.next(this.grabQueue);
|
||||
}
|
||||
@@ -110,8 +111,9 @@ export class UrlGrabRendererComponent implements OnInit, OnDestroy, AgRendererCo
|
||||
}
|
||||
|
||||
remove() {
|
||||
this.httpClient.post(this.serverService.baseUrl + '/grab/remove', {threadId: this.grabQueue.threadId}).subscribe(
|
||||
() => {
|
||||
this.httpClient.post<ThreadId>(this.serverService.baseUrl + '/grab/remove', {threadId: this.grabQueue.threadId}).subscribe(
|
||||
data => {
|
||||
this.removeFromGrid(data);
|
||||
},
|
||||
error => {
|
||||
this._snackBar.open(error?.error?.message.error || 'Unexpected error, check log file', null, {
|
||||
@@ -120,4 +122,17 @@ export class UrlGrabRendererComponent implements OnInit, OnDestroy, AgRendererCo
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private removeFromGrid(data: ThreadId) {
|
||||
const removeTx = [];
|
||||
const nodeToDelete = this.api.getRowNode(data.threadId);
|
||||
if (nodeToDelete != null) {
|
||||
removeTx.push(nodeToDelete.data);
|
||||
}
|
||||
this.api.updateRowData({remove: removeTx});
|
||||
}
|
||||
}
|
||||
|
||||
interface ThreadId {
|
||||
threadId: string;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import {ConfirmDialogComponent} from '../common/confirmation-component/confirmat
|
||||
import {filter, flatMap} from 'rxjs/operators';
|
||||
import {RemoveResponse} from '../common/remove-response.model';
|
||||
import {CtxtMenuService} from "./ctxt-menu.service";
|
||||
import {PostsDataService} from "../posts-data.service";
|
||||
import {PostsDataService} from "./posts-data.service";
|
||||
import {AlternativeTitleComponent, AlternativeTitleDialog} from "./alternative-title/alternative-title.component";
|
||||
|
||||
@Component({
|
||||
@@ -61,7 +61,7 @@ import {AlternativeTitleComponent, AlternativeTitleDialog} from "./alternative-t
|
||||
<span>View Photos</span>
|
||||
</button>
|
||||
<button (click)="openRenameDialog()" mat-list-item>
|
||||
<mat-icon>folder</mat-icon>
|
||||
<mat-icon>edit</mat-icon>
|
||||
<span>Gallery name</span>
|
||||
</button>
|
||||
<button (click)="open()" *ngIf="electronService.isElectronApp" mat-list-item>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {PostsDataService} from '../posts-data.service';
|
||||
import {PostsDataService} from './posts-data.service';
|
||||
import {SelectionService} from '../selection-service';
|
||||
import {AfterViewInit, ChangeDetectionStrategy, Component, NgZone, OnDestroy, OnInit} from '@angular/core';
|
||||
import {PostsDataSource} from './post.datasource';
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
title="Start selected">
|
||||
<mat-icon>play_arrow</mat-icon>
|
||||
</button>
|
||||
<button (click)="stop()" [disabled]="disableSelection | async" aria-label="Stop" mat-icon-button title="Stop">
|
||||
<button (click)="stop()" [disabled]="disableSelection | async" aria-label="Stop selected" mat-icon-button
|
||||
title="Stop selected">
|
||||
<mat-icon>pause</mat-icon>
|
||||
</button>
|
||||
<div class="or-spacer-vertical left">
|
||||
|
||||
@@ -25,7 +25,7 @@ import {CMD} from '../common/cmd.enum';
|
||||
import {SelectionService} from '../selection-service';
|
||||
import {RowNode} from 'ag-grid-community';
|
||||
import {RemoveResponse} from '../common/remove-response.model';
|
||||
import {PostsDataService} from '../posts-data.service';
|
||||
import {PostsDataService} from '../posts/posts-data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-toolbar',
|
||||
|
||||
@@ -2,5 +2,5 @@ export const environment = {
|
||||
production: true,
|
||||
localhost: `${window.location.protocol}//${window.location.host}`,
|
||||
ws: `${window.location.protocol === 'http:' ? 'ws:' : 'wss:'}//${window.location.host}`,
|
||||
version: '2.11.1'
|
||||
version: '2.11.2'
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ export const environment = {
|
||||
production: false,
|
||||
localhost: 'http://localhost:8080',
|
||||
ws: 'ws://localhost:8080',
|
||||
version: '2.11.1'
|
||||
version: '2.11.2'
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user