Comments (4)
Add: only occasionally a few files will appear this problem, not 100%, when I have been retained pikpak source files, do not delete the case, after a period of time will be changed once the hash value, this time the value is correct. After deleting the file I can restore the file by the hash value.
Files with changing hash values can also be played normally, provided they are not deleted from pikpak.
PikPak://MEYD-868-4K.mp4|24055707717|3927AE19823CE8E020402C4C7650CD8FD37E14D1 The hash of the error file that I synchronized with rclone before
PikPak://MEYD-868-4K.mp4|24055707717|6C97D756D7622262EA75F6257738D6E39FF5368E This is the hash I generated after copying pikpak via alist googledrive. The former is invalidated by the deletion of the source file.
from rclone.
At the time of writing pikpak for rclone, hash used for uploading and verifying file existence wasn't clearly discovered. So I just let it a simple sha1. However, I recently found that it is sha1 of sha1 of file blocks which is similar with torrent piece hash.
Once another fix #7787 which is closely related to this one is sorted out, I will make a new PR for it. Thanks.
from rclone.
At the time of writing pikpak for rclone, hash used for uploading and verifying file existence wasn't clearly discovered. So I just let it a simple sha1. However, I recently found that it is sha1 of sha1 of file blocks which is similar with torrent piece hash.
Once another fix #7787 which is closely related to this one is sorted out, I will make a new PR for it. Thanks.
I know, it's named gcid. The algorithm is written in some Chinese article
Where xunlei is pikpak's algorithm, because pikpak bought the back-end architecture from xunlei, so the calculation method is the same.
https://binux.blog/2012/03/hash_algorithm_of_xunlei/
https://post.smzdm.com/p/awzm3o3m/
(alist project contains pikpak, alist is an open source project , you can look at the specific implementation of the code .
https://github.com/alist-org/alist/tree/main/drivers/pikpak)
def gcid_hash_file(path):
h = hashlib.sha1()
size = os.path.getsize(path)
psize = 0x40000
while size / psize > 0x200 and psize < 0x200000:
psize = psize << 1
with open(path, 'rb') as stream:
data = stream.read(psize)
while data:
h.update(hashlib.sha1(data).digest())
data = stream.read(psize)
return h.hexdigest().upper()
from rclone.
Thanks for the useful link. Alist is my source of information as well :)
from rclone.
Related Issues (20)
- OAuth tokens fail to refresh when they are provided as a JSON blob (for native-app clients) HOT 2
- HDFS remote fails to copy file with " Received error: unexpected EOF" HOT 5
- Implement WebHDFS to acces remote HDFS storage HOT 4
- Poor copy/sync speed from a NFS-mounted directory to Ceph S3 bucket HOT 3
- WebAssembly - WASI Support HOT 1
- Access "Photos" folder in Proton Drive
- ListJSON failed to load config for crypt remote HOT 3
- Canβt move and rename inside linkbox mount HOT 3
- Wrong encoding type in response when using "serve s3" - should not be url-encoded HOT 4
- MacOS and Linux doesn't support space character on folder name HOT 1
- Fatal error: unknown flag: --vfs-cache-mode HOT 4
- Fail on missing files when using `--files-from=`
- Support for BitBucket (git repo over ssh) HOT 1
- BYO Storage Provider
- panic at github.com/rclone/rclone/fs/metadata.go:112: invalid memory address or nil pointer dereference HOT 9
- SrcFsType can't be used to reliably detect backend in metadata mapper HOT 8
- The issue encountered when uploading large size file to Pikpak. HOT 2
- android: SAF support
- Google Drive API does not always return permissionIds in files.list request HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rclone.