1
0
Fork 0
Commit Graph

32 Commits

Author SHA1 Message Date
Chocobozzz ab683a8e0d Format video blacklist 2017-04-26 21:42:36 +02:00
Green-Star 198b205c10 Add ability for an administrator to remove any video (#61)
* Add ability for an admin to remove every video on the pod.

* Server: add BlacklistedVideos relation.

* Server: Insert in BlacklistedVideos relation upon deletion of a video.

* Server: Modify BlacklistedVideos schema to add Pod id information.

* Server: Moving insertion of a blacklisted video from the `afterDestroy` hook into the process of deletion of a video.

To avoid inserting a video when it is removed on its origin pod.
When a video is removed on its origin pod, the `afterDestroy` hook is fire, but no request is made on the delete('/:videoId') interface.
Hence, we insert into `BlacklistedVideos` only on request on delete('/:videoId') (if requirements for insertion are met).

* Server: Add removeVideoFromBlacklist hook on deletion of a video.

We are going to proceed in another way :).
We will add a new route : /:videoId/blacklist to blacklist a video.
We do not blacklist a video upon its deletion now (to distinguish a video blacklist from a regular video delete)
When we blacklist a video, the video remains in the DB, so we don't have any concern about its update. It just doesn't appear in the video list.
When we remove a video, we then have to remove it from the blacklist too.
We could also remove a video from the blacklist to 'unremove' it and make it appear again in the video list (will be another feature).

* Server: Add handler for new route post(/:videoId/blacklist)

* Client: Add isBlacklistable method

* Client: Update isRemovableBy method.

* Client: Move 'Delete video' feature from the video-list to the video-watch module.

* Server: Exclude blacklisted videos from the video list

* Server: Use findAll() in BlacklistedVideos.list() method

* Server: Fix addVideoToBlacklist function.

* Client: Add blacklist feature.

* Server: Use JavaScript Standard Style.

* Server: In checkUserCanDeleteVideo, move the callback call inside the db callback function

* Server: Modify BlacklistVideo relation

* Server: Modifiy Videos methods.

* Server: Add checkVideoIsBlacklistable method

* Server: Rewrite addVideoToBlacklist method

* Server: Fix checkVideoIsBlacklistable method

* Server: Add return to addVideoToBlacklist method
2017-04-26 21:22:10 +02:00
Chocobozzz 3092476e64 Server: add video language attribute 2017-04-07 12:13:37 +02:00
Chocobozzz 31b59b4774 Server: add nsfw attribute 2017-03-28 21:19:46 +02:00
Chocobozzz 6f0c39e2de Server: add licence video attribute 2017-03-27 20:53:11 +02:00
Chocobozzz 6e07c3de88 Add video category support 2017-03-22 21:25:24 +01:00
Chocobozzz d38b828106 Add like/dislike system for videos 2017-03-08 21:35:43 +01:00
Chocobozzz e3d156b341 Server: add views attribute when sending videos to friends 2017-03-04 11:00:59 +01:00
Chocobozzz 72329aaa28 Update bittorrent-tracker and standard to v9 2017-03-03 18:45:40 +01:00
Chocobozzz e4c87ec269 Server: implement video views 2017-02-26 20:01:26 +01:00
Chocobozzz 9e167724f7 Server: make a basic "quick and dirty update" for videos
This system will be useful to to update some int video attributes
(likes, dislikes, views...)

The classic system is not used because we need some optimization for
scaling
2017-02-26 20:01:26 +01:00
Chocobozzz da691c46df Server: remote video validators refractoring 2017-01-17 20:59:16 +01:00
Chocobozzz 4145c1c689 Server: transaction refractoring 2017-01-17 20:50:45 +01:00
Chocobozzz 4df023f2d4 Server: create transaction refractoring 2017-01-15 19:53:11 +01:00
Chocobozzz d6a5b018b8 Server: retryer transaction wrapper refractoring 2017-01-15 19:13:16 +01:00
Chocobozzz 7f4e7c3637 Server: fix update remote video infohash 2017-01-12 09:47:21 +01:00
Chocobozzz edc5e86006 Server: transaction serializable for videos 2017-01-11 18:41:40 +01:00
Chocobozzz dea32aacde Server: always check commit result 2017-01-11 16:22:50 +01:00
Chocobozzz bf4ff8fe0b Server: retry video abuse requests too 2017-01-10 22:33:00 +01:00
Chocobozzz ed04d94f6d Server: try to have a better video integrity 2017-01-06 23:46:36 +01:00
Chocobozzz 55fa55a9be Server: add video abuse support 2017-01-04 21:05:13 +01:00
Chocobozzz 818f7987eb Server: optimization for videoGet and videoRemove 2016-12-30 11:51:08 +01:00
Chocobozzz 3d118fb501 Server: propagate video update to other pods 2016-12-30 11:27:42 +01:00
Chocobozzz 7b1f49de22 Server: add ability to update a video 2016-12-29 19:07:05 +01:00
Chocobozzz 4ff0d86208 Server: little refractoring 2016-12-29 18:02:03 +01:00
Chocobozzz 98ac898a03 Server: use video hook to send information to other pods when a video is
deleted
2016-12-29 11:17:11 +01:00
Chocobozzz 4712081f2a Server: add association between author and user 2016-12-29 10:56:07 +01:00
Chocobozzz 7920c273a2 Move tags in another table 2016-12-24 16:59:17 +01:00
Chocobozzz feb4bdfd9b First version with PostgreSQL 2016-12-19 21:22:28 +01:00
Chocobozzz f285faa04e Server: generate magnet uri on the fly 2016-11-16 20:29:26 +01:00
Chocobozzz 558d7c2385 Server: use _id for image and video files. Add remoteId field 2016-11-16 20:29:26 +01:00
Chocobozzz f253b1c1f1 Server: remove v1 directory, we don't really need it 2016-10-21 12:16:28 +02:00