Skip to content

Commit

Permalink
✔ Revert Balik ~
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed May 19, 2023
1 parent e53fe52 commit 92df4bd
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 33 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/fansubid/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<noscript>🎉 Harap Menyalakan JavaScript Untuk Dapat Mengakses Website Ini ✨</noscript>
</div>
<app-root></app-root>
<script src="runtime.f799f039b46a42b2.js" type="module"></script><script src="polyfills.325a71d3e423341a.js" type="module"></script><script src="scripts.03e7a8120a25f41a.js" defer></script><script src="main.efaa4e2794ba6b8e.js" type="module"></script>
<script src="runtime.045434ee5fc227c2.js" type="module"></script><script src="polyfills.325a71d3e423341a.js" type="module"></script><script src="scripts.03e7a8120a25f41a.js" defer></script><script src="main.efaa4e2794ba6b8e.js" type="module"></script>


</body></html>
12 changes: 6 additions & 6 deletions dist/fansubid/browser/ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1684475060696,
"timestamp": 1684475897587,
"index": "/index.html",
"assetGroups": [
{
Expand All @@ -22,7 +22,7 @@
"/288.3a5306e231555f4f.js",
"/297.dfff6394b810fcb0.js",
"/32.a4c958df199ed6d2.js",
"/330.6ce68b349a50c790.js",
"/330.3456abf80276b7b5.js",
"/345.94c411d7b3c87056.js",
"/438.790baf2036e9e4da.js",
"/469.4dbe01792dba7213.js",
Expand All @@ -44,7 +44,7 @@
"/main.efaa4e2794ba6b8e.js",
"/manifest.webmanifest",
"/polyfills.325a71d3e423341a.js",
"/runtime.f799f039b46a42b2.js",
"/runtime.045434ee5fc227c2.js",
"/scripts.03e7a8120a25f41a.js",
"/styles.b7715bd3777a7953.css"
],
Expand Down Expand Up @@ -96,7 +96,7 @@
"/288.3a5306e231555f4f.js": "b64e5f5dff3b2a3845a0f75fd59ccda2b060cca3",
"/297.dfff6394b810fcb0.js": "ad029ba49233a551b404434f2b211abbb76abe8d",
"/32.a4c958df199ed6d2.js": "e008aa55b14b52ba3c36d3a0e27a17b9d62b846d",
"/330.6ce68b349a50c790.js": "23c0b7d806510f2ddd74f72af8e1ea1c7ebdbada",
"/330.3456abf80276b7b5.js": "ce2aef5c28e2a3bc0e07caf3a15db71a71ac912f",
"/345.94c411d7b3c87056.js": "a7520aaa35bbfbd4e4e5f1f245b97ba85283c8ab",
"/438.790baf2036e9e4da.js": "270dcea65545932993313064ca5dec515e6c394e",
"/469.4dbe01792dba7213.js": "814163cf72332b522d31d19517d0843f28be16f4",
Expand All @@ -114,11 +114,11 @@
"/960.7b80157468c73be3.js": "231cedf76d6ae42df0fe02853134622349b90276",
"/common.ec9ef4839de19b37.js": "eb350d82ddfde4016fb19130ecf61fbfff10454f",
"/favicon.ico": "071facb8fab2e4b3493dcfbb0b02d7bd21bca97e",
"/index.html": "2c0848373a515344bc4c938734bae7a80322ba73",
"/index.html": "de9c131a9eb90e679c2d6574fb348b91eb869402",
"/main.efaa4e2794ba6b8e.js": "dc17d03bc949ff472f7ac7d5bbd54f40b4458677",
"/manifest.webmanifest": "eafb5426cdc9fd714787e5453af315b9972875a3",
"/polyfills.325a71d3e423341a.js": "18f8a8b77e7d11be1385d438c6d218cc68c0edb3",
"/runtime.f799f039b46a42b2.js": "47d8248a8c9f8226c7a1f0875e36a940867ffaf4",
"/runtime.045434ee5fc227c2.js": "0c33e30492313dec2e71b181f666c16389d5722a",
"/scripts.03e7a8120a25f41a.js": "2f52334f58ca527e57efab741f2fac760e6dd84d",
"/styles.b7715bd3777a7953.css": "6a4fb31261ad2bda1b8ec794be0ad4898589e453"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fansubid/server/main.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/app/_pages/berkas/berkas-detail/berkas-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ <h2 class="border-bottom-dotted">
</div>
<div class="col-12 text-center" *ngIf="isHaveDDL">
<div class="px-3">
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="ddl(berkasData.attachment_)"
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="ddl(berkasData.attachment_.id)"
matTooltip="{{ lampiran.name }} :: {{ lampiran.download_count }}x" *ngIf="!lampiran.data && !lampiran.isDownloading && !lampiran.isCompleted">
<mat-icon class="me-1">movie</mat-icon>
{{ lampiran.name | slice:0:5 }}.....{{ lampiran.ext }} ({{ lampiran.size | bytes }})
</button>
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="cancel_dl(berkasData.attachment_)"
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="cancel_dl(berkasData.attachment_.id)"
matTooltip="{{ lampiran.name }} :: {{ lampiran.download_count }}x" *ngIf="!lampiran.data && lampiran.isDownloading">
<mat-icon class="me-1">close</mat-icon>
Batal Unduh
</button>
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="saveFileAs(berkasData.attachment_)" *ngIf="lampiran.data"
<button class="m-1 w-100" mat-stroked-button color="accent" (click)="saveFileAs(berkasData.attachment_.id)" *ngIf="lampiran.data"
matTooltip="{{ lampiran.name }} :: {{ lampiran.download_count }}x">
<mat-icon class="me-1">save</mat-icon>
{{ lampiran.name | slice:0:5 }}.....{{ lampiran.ext }}
Expand All @@ -93,17 +93,17 @@ <h2 class="border-bottom-dotted">
</div>
</div>
<div class="col" *ngIf="isHaveDDL && !isDiscord">
<div class="px-3 text-danger" *ngIf="lampiran.isDownloading" (click)="standardDdl(berkasData.attachment_)" style="cursor: pointer;">
<div class="px-3 text-danger" *ngIf="lampiran.isDownloading" (click)="standardDdlVideo(berkasData.attachment_.id)" style="cursor: pointer;">
Unduhan Macet? <i><u>Coba Gunakan Unduhan Biasa~</u></i>
</div>
</div>
<button class="m-1 w-100" mat-stroked-button color="accent" *ngFor="let s of berkasData.attachment_.subtitles_"
(click)="standardDdl(s)" matTooltip="{{ s.name }}">
(click)="standardDdlSubsFont(s.id)" matTooltip="{{ s.name }}">
<mat-icon class="me-1">notes</mat-icon>
{{ s.name | slice:0:5 }}.....{{ s.ext }} ({{ s.size | bytes }})
</button>
<button class="m-1 w-100" mat-stroked-button color="accent" *ngFor="let f of berkasData.attachment_.fonts_"
(click)="standardDdl(f)" matTooltip="{{ f.name }}">
(click)="standardDdlSubsFont(f.id)" matTooltip="{{ f.name }}">
<mat-icon class="me-1">font_download</mat-icon>
{{ f.name | slice:0:5 }}.....{{ f.ext }} ({{ f.size | bytes }})
</button>
Expand Down
42 changes: 25 additions & 17 deletions src/app/_pages/berkas/berkas-detail/berkas-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class BerkasDetailComponent implements OnInit, OnDestroy {
}

get ddlVideo(): string {
return this.ddlUrlLink(this.berkasData.attachment_.id);
return this.ddlUrlLinkVideo(this.berkasData.attachment_.id);
}

get videoThumb(): string {
Expand All @@ -164,12 +164,12 @@ export class BerkasDetailComponent implements OnInit, OnDestroy {
return false;
}

isDiscord(attachment): boolean {
return this.isHaveDDL && attachment?.discord;
get isDiscord(): boolean {
return this.isHaveDDL && this.berkasData.attachment_?.discord;
}

async ddl(attachment): Promise<void> {
if (this.isDiscord(attachment)) {
async ddl(id): Promise<void> {
if (this.isDiscord) {
this.subsDialog = (await this.ds.openKonfirmasiDialog(
`Ekstensi CORS Unblock`,
`
Expand Down Expand Up @@ -212,33 +212,41 @@ export class BerkasDetailComponent implements OnInit, OnDestroy {
this.gs.log('[INFO_DIALOG_CLOSED]', re);
// TODO :: Create My Own Browser Extension For Bypassing CORS (?)
if (re !== undefined) {
this.dm.startDownload(attachment.id, (re === true));
this.dm.startDownload(id, (re === true));
}
this.subsDialog.unsubscribe();
}
});
} else {
this.dm.startDownload(attachment.id);
this.dm.startDownload(id);
}
}

cancel_dl(attachment): void {
this.dm.cancelDownload(attachment.id);
cancel_dl(id): void {
this.dm.cancelDownload(id);
}

saveFileAs(attachment): void {
this.dm.saveFileAs(attachment.id);
saveFileAs(id): void {
this.dm.saveFileAs(id);
}

standardDdl(attachment): void {
this.wb.winboxOpenUri(this.ddlUrlLink(attachment));
standardDdlVideo(id): void {
this.wb.winboxOpenUri(this.ddlUrlLinkVideo(id));
}

ddlUrlLink(attachment): string {
if (!this.isDiscord(attachment)) {
return `${environment.apiUrl}/attachment/${attachment.id}?ngsw-bypass=true`;
ddlUrlLinkVideo(id): string {
if (!this.isDiscord) {
return `${environment.apiUrl}/attachment/${id}?ngsw-bypass=true`;
}
return `${environment.apiUrl}/ddl-seek/${attachment.id}?ngsw-bypass=true`;
return `${environment.apiUrl}/ddl-seek/${id}?ngsw-bypass=true`;
}

standardDdlSubsFont(id): void {
this.wb.winboxOpenUri(this.ddlUrlLinkSubsFont(id));
}

ddlUrlLinkSubsFont(id): string {
return `${environment.apiUrl}/attachment/${id}?ngsw-bypass=true`;
}

setupVjs(): void {
Expand Down

0 comments on commit 92df4bd

Please sign in to comment.