Added support for modifying downloaded files

This commit is contained in:
Isaac Grynsztein
2018-01-22 03:43:47 -05:00
parent e4e1e67855
commit 1cdd4d0e15
9 changed files with 501 additions and 95 deletions

View File

@@ -56,12 +56,12 @@ export class PostsService {
}
getFileStatusMp3(name: string): Observable<any> {
return this.http.post(this.path + "mp3fileexists",{name: name})
return this.http.post(this.path + "fileStatusMp3",{name: name})
.map(res => res.json());
}
getFileStatusMp4(name: string): Observable<any> {
return this.http.post(this.path + "mp4fileexists",{name: name})
return this.http.post(this.path + "fileStatusMp4",{name: name})
.map(res => res.json());
}
@@ -70,6 +70,32 @@ export class PostsService {
return this.http.get(window.location.href + "backend/config/default.json")
.map(res => res.json());
}
deleteFile(name: string, isAudio: boolean)
{
if (isAudio)
{
return this.http.post(this.path + "deleteMp3",{name: name})
.map(res => res.json());
}
else
{
return this.http.post(this.path + "deleteMp4",{name: name})
.map(res => res.json());
}
}
getMp3s()
{
return this.http.post(this.path + "getMp3s", {})
.map(res => res.json());
}
getMp4s()
{
return this.http.post(this.path + "getMp4s", {})
.map(res => res.json());
}
}