diff --git a/Pipfile b/Pipfile index 4204180..8100fb0 100755 --- a/Pipfile +++ b/Pipfile @@ -9,4 +9,4 @@ flask = "*" telethon = "*" requests = "*" cryptg = "==0.4.0" -ltorrent = {ref = "1.3.0", git = "https://github.com/hlf20010508/LTorrent.git"} +ltorrent = {ref = "1.4.0", git = "https://github.com/hlf20010508/LTorrent.git"} diff --git a/Pipfile.lock b/Pipfile.lock index 90e4591..6f9eae9 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "a40ab2d3d86c4624ed8b18f4ede705f2baafbbdf6691d93a506790e7485c962c" + "sha256": "73492b2380a33ed45cf62b9bb1afe63523c3dc83fe0b8e662d9c05cc2cb80d53" }, "pipfile-spec": 6, "requires": {}, @@ -129,130 +129,130 @@ }, "bitarray": { "hashes": [ - "sha256:015908355354d42973ad41ba4eca697b4b55690b3ece6d9629118273e7a9e380", - "sha256:04fcb292637012a1551e55c00796e31b5c66d1692ca25a5ac83d23779c23cd29", - "sha256:06770f6f7d238c2e2d251e9f5346358653ea8f3dbbedc83d18598f6c044f16b4", - "sha256:07ed46857ed73765f2316e08f2d5108b7e694b44f4293e30fb526f3123c829d4", - "sha256:089a4658706ec63293c153ffb1472cea1bbefb39ccfb214f52f0c1f5d10bf28e", - "sha256:09244fa4e39ca263820dd8eca83a0175a98fb8f9bd353b4285a9ef2928b7fb41", - "sha256:095923f084d2271f28d7430798e698f6d0b304c58b072b4f2eb0bc132321323b", - "sha256:09c140daa13d2515609d5a2dbfd289eada200e96222671194dc72eae89bc3c7b", - "sha256:0c3de6517df7bbac18632046e722ca9000a4aeb76da68e545437fee1e61e2bbc", - "sha256:117a6f409dabc15320f3212d05d878cc33436c1e118e8746bf3775da2509bb7d", - "sha256:12035756896d71e82edf6a6fb46d3ca299eadbec25140c12505d4b32f561b0da", - "sha256:123333df4b22f12f4fc13fa4821b8ca075df59161bd41f5f189ffc791aaac10b", - "sha256:136bd205384a3089bc22c02a365a152e61b1e8d06ec664185c90e3ab8967260c", - "sha256:154082c814e4007bf15d8dfc576ebd4e79e9ed3626017cd53810961cee7e65d8", - "sha256:18707458f6467072a9c3322835a299fa86df8fb3962f51afac2b50c6a4babf82", - "sha256:1f142476b3bb80f6887b5a3a08d69bbd526093aee5a00973c26458cc16dd5e47", - "sha256:20cc6573ac21627e0fde854d4e0450d4c97706213bac986c0d38d252452da155", - "sha256:2448d8f5ce6d8a840a5dff1b41f5124445141530724af7ba82ec7967eabd290a", - "sha256:252bdf94c74192b10f7fdb42683adf1403892acdce39e3e3524e8b070793b1c7", - "sha256:2adb2ba1e7196f62587f4011b213b3609a717f92698a398904192e201ec3e29e", - "sha256:2aeae0f2dacf546256f8720a1e8233b6735a3bf76778be701a1736d26fe4ecec", - "sha256:2bfd32ce49d23584333087262fb367b371c74cf531f6b0c16759d59f47c847d7", - "sha256:2fcaf220e53518762dae0701082cb70d620656eaaecf5512695a6afafa885ea6", - "sha256:34ceedbeed9aefde10c273d44801971db8f7505f80933fbb936969ee2343b8a3", - "sha256:36f9752b654e18f99130a2bf84f54b1e6b8fad4f5f768f4390eb9b769a64a59c", - "sha256:38233e5793e107575be656908419d2bceab359c78c28affc386c7b88b8882b8f", - "sha256:38e19756480bff2703155060d1849d37138a1d2242287563de112fb5bdd3217d", - "sha256:3aa1bd71236e07f0e7ab859a130fc57645301fd1ffd64be9a9750bce51446acb", - "sha256:3c815a7ca72a5eebcd85caaeb4d32b71af1c795e38b3dff5dcb5b6b1f3ba0b4f", - "sha256:3d0daf70de198dcde459451c534333c0f59ab847649be013c9b88d24f0e49767", - "sha256:42d2d0123b1e68b387f4b2fd288e1a8f0dfb991cf1d2fbc56d948c3f4a113d8d", - "sha256:44e3944ebccbc38ebdb7bd3c37a9b6ff91d87db2dad4bf3910e2b01fbd36831b", - "sha256:44ee266b71cd6bd7c99f937b30ac3b7627cad04777f2c12894cd0f820cb79ada", - "sha256:47400fa421b8a3947f6676981f8d9b8581239831533dff374477ef2b86fda42f", - "sha256:48a89c2112420ebeb163a3c273c244d542cf9315c9ce5a875d305f91adcdac24", - "sha256:4a6a4e83ecab1fd1fc171c57334663b24c5d286b66421efac2428b7e105c5d62", - "sha256:4c02d24051d7070b8f3b52fa9c8984fd8eb035115545f7c4be44c9825e8b58c8", - "sha256:4d4f3e78a8c1c5bf625632488a4bdd78fe87c4603ea10443cb8f207c2a846efe", - "sha256:50923d862e01a546f942272193612f386ec1f90cc4528b10561854902bd8aab0", - "sha256:56f51107bb5406bfa4889064c01d5f9e7a545b3e2b53f159626c72c910fe8f07", - "sha256:5797552e849079ff963936a037087367f20b41d5a612b07a1ba032259a2b86c8", - "sha256:57f1fc3a089d9907859e940c6a4db3f5358013c75bba3b15156d93a58bca868e", - "sha256:5b2816afe82feeb7948e58ca0be31c254e23307953e56d3313f293f79279fbe7", - "sha256:5f35d5ff7334610b42632b30c27332b30db3680dd0174f86e382c3e150dfea2c", - "sha256:60774f73151dbcabefb5acb6d97ac09a51c999f9a903ac6f8db3d8368d338969", - "sha256:621d5658b890b99b3f8b1a678b0afed10e096d53baa767ecbcf428fce1f48415", - "sha256:63e595ca8dab2b77104e618782764bc3b172a0e9c6f97734d5fdd299063feac0", - "sha256:64d867953b530b3dde93663d4c4708b533216e9dca3f3b4489698261cd80fcef", - "sha256:67e366efaea6e0b5971593a83d062cb7e4e09e03d29f8d5b825effdf5f516ad3", - "sha256:67ee9d71af3db621aa637f96520a8df8534fcc64e881360d3ed3a07f7e47ed1b", - "sha256:6bcbe2ea34c88cf736f157cf3d713c1af112f0d7a9eec390d69a9e042b7d76d4", - "sha256:6d9ec6a214563d2edd46d1a553583782379a2cb1016e8cc6c524e011905433b1", - "sha256:72bba6b388ba7c48a882bd58c86972aab73a30c3fb5b3341f28eb5bdc17365f8", - "sha256:73fa449d9e551a063ff5c68b5d2cc0caaede5b59366d37457261ae3080f61fca", - "sha256:74efd69ac9d06ce9f43a1f513cee8a82c314f85aa0bd74664abe9e608fb59ffd", - "sha256:7554518934364b30d8da085f7a759ee3838c9ae4265b48beb82072f942b2816e", - "sha256:7618abbac8999cd942be278130b88ac6ed364ba3446222f1db0faf4de7a052cf", - "sha256:782ff781ae3c4956c15764aefc06ceb8c1c348794f09dfc8ebf62ff35166da1f", - "sha256:7a6413b5f53d44e134276d5a3747b71d17cbc25177a50445458921424a760dcd", - "sha256:7ad527ff1d398a703eba71ac270625087691e62efab8d0e331c53affe0628030", - "sha256:8011a63692e9e32cdc3fac3dfd0beceece926e8b53fb91750037fc386917f90b", - "sha256:82fe0a774204159383d1be993191d51500cb44adbd3e9287da801e4657c0d4b2", - "sha256:84a2628a5377971d73c95014e540a51327eb27ffdfbab81e43eac494eced3dc2", - "sha256:8562dd32b4d9810a0b9c04fe3d1ed8078f27d74e3738063162c677b253216666", - "sha256:879bb9f11bad60a5588f5efb4e60f42844e4787ce7d5bb0f8eb8b87a835e914f", - "sha256:8defbf10a731b44892001daa6903b2f2f7ad8c623a7b4d9ae6bd674592b1763e", - "sha256:98fe712a82f65de536b65fa9af7601df4e8231f14e3b0b14ef22e16e30d2fbea", - "sha256:993438edd54350133f7569a8691074a90aa2297def69ec0e7af34de3d175cd00", - "sha256:9a3741359cbb1a9eb50188e8faa0ced96ca658eb85061786b7f686efa94c3604", - "sha256:9b92c17b15bd5536c3e067051c67531adc81fcb6c1a699a760600ccd03dfcfba", - "sha256:9f756d159099f154a21d73932f13c8ce27f45a1c892d9b19c66a1a2c50c18474", - "sha256:a0bb2e5c0c9f964bf43a09a1cf37233ff96b3318c9a50b1b7c3d74a875b32072", - "sha256:a102cd1fafee8919a069fed9ea40c1ffe4d6037fd5b0a7f47326c2f75f24f70f", - "sha256:a2c8e06c3463746181255e03f07535c136f5346fb9c4a90eec2da27695102533", - "sha256:a4212b66f9ae2e28ca1aa0307167ebfcdb2ca263a56b786cc572699e8a717f91", - "sha256:a5e24317b0768789c52586a31284dec8ccafa2f6c128df2f2d79656142f1e794", - "sha256:a7b839e5c038111fd2fbd09e83ca945da357d690e49cfa269c09aed239db9c2b", - "sha256:a836a988ada812776af9ea6e88edf1e2eaaf38ebd545bbbcd500b2db0ced3a4f", - "sha256:a86c308018b59b999cf3d5a16889d3a347b48a2d08f34fbb4e29d5dc05fa198a", - "sha256:aa4513a7393055faef630dcfb4d10a339c47eeb943487c0e9063ba763b66cb73", - "sha256:ab7e9b1846cc62739d9d293a94f704949b588afb9ed72db00e26b7fcdb4661a3", - "sha256:ac5451951ce1e0616385e77de49afc7bd90bdf9d0aa99c0fd7b0bd23400db890", - "sha256:acf24bc6aedd0a490af71591b99401867d4445d64db09a7bfe0bde3e8498cc8d", - "sha256:adfc210df3d85017f5d2ef82db94d46b585ecbbd7357a6ee1c3bc125cc2658e2", - "sha256:b0cefac8fedb3dbbf97542dc0c6fdd8bf09a210bf6fa5799083b7309fd97b1b2", - "sha256:b153b846a6ac4b6eca71bb5f84d3dba51f3cd159f4322f5d67b2c41cf15973ad", - "sha256:b661052a4762825790a728469f897c341558392342cb68a6c54708d4e5198254", - "sha256:b8f0306dbc6605dd7f9e2dada33a3916c0c28f37128464de7153df7d8cf7a959", - "sha256:ba3f27d82b45543a7d1488d151594915a6e67fb28bd4f21eb0901df2ba4ede86", - "sha256:bbca4c4bc9854e3166474e471f3230989fd2baf32c915e363c32f91dc6ebb704", - "sha256:be7c6343a7f24293a988e5a27c1e2f44f028476e35192e73663c4acec5c4766e", - "sha256:c2ffed55994f5c73d34371474946767f936b0b83237f800be0f27a3e783baadb", - "sha256:c30dbbe2f49056d4bd97a94c07a7fc0118ecc85661fdbaada36dfa9b14dc5962", - "sha256:c3f7a6c6b78edd81fca0035fb7a156a79f25919e1b0598afb483c26513d562f1", - "sha256:c42fcddc955d84164667d899e8d4bbb763f4bc029fe72642a65df7382c46fe94", - "sha256:c65080bbba08ce07b136490b4df3d0907ec3dd76c3c5d47fda011002420f6d31", - "sha256:c87146e9c2c196c012e97273f82215e2239b9bffcbb6c7802bbbedac87be2358", - "sha256:c99838782dbec7f0c5cba1a6d4faa8e2da2b522423aa36a7f383a2265ac0ae3f", - "sha256:cadccf651900e3858e55dfd762d5de0786aec853f1fb26183905ddee233183b4", - "sha256:cb530a9fb7ed13a1a49bda81db2def4c73b7fef0fd1bb969b1d7605121869230", - "sha256:cc178297951343c8d8cd8a391999abf0024ca319671418f98dea0d7e71354126", - "sha256:d6a8a1da9205de97eea14aaa731c657fa8decd2d6878ee3d2d4bf33291960216", - "sha256:da61c6d7b6288d29db5be77048176f41f7320316997fced28b5415e1f939448e", - "sha256:de91007504b475a93d8b0949db9dec86d39c0306de9914f7b9087daeb3d9fbaf", - "sha256:e15587b2bdf18d32eb3ba25f5f5a51bedd0dc06b3112a4c53dab5e7753bc6588", - "sha256:e3d80bc6722652c847e5f503c2ce94a641b016059ec45bde4e1f13454b33e904", - "sha256:e4fd5e8a2e1b898ebc91faf6e1938bde38a4d20ee8ea49835e9adadd9b87c97c", - "sha256:e60254ac626790c8c95415b095c6831056ca57a5d31839564210530c3278f170", - "sha256:e6993e46c81702d0bb39aad83ceb228cec087bc321782fbd2c6ddff7c653dcc8", - "sha256:e76735a285e834fc9db560de11e086453128c1177950a15c3404fe16c7d76f5e", - "sha256:e98a7b510aaaf0d7368b7cb983d3106aecd28abdfa4b4593b80e7f4ab5af0a97", - "sha256:e9f4f29c0338e5862ebc3b88091d29ff28d44ab80381f238da08aabb054777c2", - "sha256:ed974048a4ced6e7b5d1cfcb83c046e70bf31b8a28eacfee3afa62f8690dee69", - "sha256:edddd6d885c7195ba7734936bc1efc8a37de18ec886a8be44a484980da87947e", - "sha256:f16a2247c27f4db3f8d01665ee97d46eaf0240b7a9feae16c17e906a3bb9a794", - "sha256:f62ee2eae65b72e034a24ac2bacd78d48845193168b54407e93bccd3772b247f", - "sha256:f69cacb3d983200114e48ec0c894e28690926f166b71202f75e976d5cd588be9", - "sha256:f8c492d90b41c510d799cc37c27892b149be77e225df6446854ce0b164e243a3", - "sha256:fbc7ac38de41052599f1e27edf4f33c02d5aea6810ee299825a81863a32e26a0", - "sha256:ff62c1c174ceae7ef0456702f9eff1f3d76590c075b9c984c459d734f73fc766", - "sha256:ff6b6b47da38223803aa3e7aab356f84e0636ecdbd43fa4bd11dbc00a923d474", - "sha256:ffa74d8601e26570f1d0e3042fda6eb26b64ba8d8dfe9b96d0bf90a6f0d81582" + "sha256:00bb1de6d3c68e18fb16c6c7390e68bc656a60dfde4004d5649c792b8871a531", + "sha256:02f8002eac8ba7796e05690f317056c6ddd40ac88f73d1dd3405c5d4df15a61d", + "sha256:045b813c3567818673f2dcd9c0b41a63214c5f5a9c230ede76ac211fbcf0185a", + "sha256:0488c1eaf83c993fc672115176cc6c27070d5abd5e673499ed46eeb87de52169", + "sha256:0690c5483e31d7e4d7f26b045baf7f9d0aa30e91fcf1c5117095652d149b1a96", + "sha256:06bcd5c171ffedb7544ad9e5b77827cd3a3ccb0dd924ef703802743b8abcf303", + "sha256:06d9ad81d56547b2b256e70a819eb4eefa4e7e21595b06b4102666a71eb4b961", + "sha256:0adf959b63e314ea74c7d67ca6732c2a840769a7bcfe779d52d777ac6877d671", + "sha256:0e938552f8fd83ecdde6f43d7f91854fa2604cc7c7e2929fed78c3779c843ba6", + "sha256:1009f6a4117d50c2e9e4a2d6d5a03d0cb030f649dd410fbbef4d3f3a9aca40c9", + "sha256:102b988fdbb0b221bdb71dac7d96475bfa47a767ee0fc1014a9ad5be46ebd20b", + "sha256:18561539cf8ca5d1970b2b78a44a1b12ae21a18183664a080525c081a44b3997", + "sha256:1a0f347672c5a8b67c36937872c75baec81e351f2209dc691608d3f76fa9e44e", + "sha256:1d1efcf28571909ea4c12184d51bd953370fd28ec227b1ded7cb88563c17d42a", + "sha256:228e20443c841585454e95e17cf66610c9c53c3a1c66f3a9bc90a1ce31218b9d", + "sha256:22a0d11bf53553e2de20eb1dbf507bba32a6c28a2b84232ff5f28289ba9ec659", + "sha256:242f9ddfed9e7b70edb2888056af1710dfbf3767342d6ef1c110fe1d3b346ad6", + "sha256:25e882da07d5735ee089cec12dc75d55b90434e607aae5522515f23132612091", + "sha256:275f4deacd4cee28311cee611cea64bf5ec197da4a95c23b2af00ecc1dee6e97", + "sha256:27b824ae449cd38c8c77349ae7d27dc11662c9c40806729943dd175c91334a4c", + "sha256:2bb731fe68c07d5a3aeb9df798008e41999c933ed81786c7688b190f5082e079", + "sha256:2c0ba71445ee0932e510f1b0248f53b7a52926f1f78c93b868fcbe6536e61a1d", + "sha256:2c9d06891a565bdc572dc8a2d76275fc3d51e63ddff51c3e03a9a95b600ca673", + "sha256:2cc0c09edd3fa893303513d3fb9a0d335f20b19b3f0276fe752bf88ffd5522c0", + "sha256:2d20ee30ea7640df29013021d130bee932d701f01b2f1cbbc1ba14f3954a6b1f", + "sha256:2e15d244cb7dab42cb1f31933da3b66d6405b1db969917460c094ba8441ea5a0", + "sha256:2f8484bea6cededfacc2921fd5715e3132467d1df50f941635b91c9920dfd66f", + "sha256:2ff712ba8259599135d24fcc555dbca2dc32ff5d18e8efb8d47456d2467e630f", + "sha256:305f1aa2a3aedd033ab2ab1fc930c5f0a987bf993f3ecc83a224db237a95cd18", + "sha256:343876f1a38d9b2857f18f7d606be49b11344dc3b9c46f072760dec364a35a54", + "sha256:3449769a8f6c6a39d3d8c8760d265ff754107715c8ad3d66e90961ea463e6284", + "sha256:3994b319e6f18040652b769ceb09e28b5546bffa29138019b788bafa8577478f", + "sha256:3baf866f2674241b02ab9547acaae2f705e7e9ca5a620484e8b09a25fc625def", + "sha256:3be310edafc506a4f7c405d7d2d97274ab3ec3f2cbd2793705ccdb692559a009", + "sha256:3df0ac492e4e795e26710ee20cfd25c7bfd81c3866490078fcc7d97ccc74b01f", + "sha256:45782033c17ea2d1c9967128bc69aee1417210b104fbda35d4da77d907afb3c5", + "sha256:4991d8c2b4ccccd1ea9115dae5dc51b60b562bc627784e53c31aae5699a55932", + "sha256:52c8501aa71a353dbe8dd6440bbd3449d8ffcae843bff139f87b9a84149315ce", + "sha256:55d52dd5af45dfb09e9b107749b4fcad4a3774d5429345faa47ab459ae478de0", + "sha256:56cc56c382167360a94e36a54a3a14320ecbe9e8ca672574c739703136d0b5e0", + "sha256:5a2f6cd2861922bf951451cd19c0f658d93ac313424ec705c59768626eb4b1f0", + "sha256:5c787dbacf218cde121611706e2bb6a64e3fb566a828bab7d608c6c96cfec8a4", + "sha256:602b429cedf3631cb3b36a7e08f484972b2e13bb0fc1e240b71935aef32bb9d9", + "sha256:6328f73d4e623d4fff966cbe623f3e2b3378bdbfb6937ec492aba3fd9927862f", + "sha256:63e1bb1c98d6d3004e44cb1958393c631e79c640877086a7f403c223c18687cb", + "sha256:644fc022c5b3973472e39930f43c113865f9ba1b4e918b52f5921d709af0e9e3", + "sha256:64e6e316452d8018d11954698f9898a2ee69fe2f1093333c2650a4b91246c675", + "sha256:6647e03def035371ce0ce073912d6594ed197f799aa34641f0acce343a8f7cca", + "sha256:665f88d204d4a8fd0fe63fea66c1a420b331887e72a2b10778d97d22182e8474", + "sha256:67accba68ceb3cb57bae9ed86ddd075043e373c4af6243e20c8f00153c5f374a", + "sha256:6910610f1f54e7b9e5aa5311acff812e5ae2ca5f6c041a40c9201f768c4a6893", + "sha256:69be498a39ac29ea4f8e4dce36e64342d4fe813eeffa7bd9ead4ce18309fb903", + "sha256:6acbfa5b85717c91bfa1bc1702c1cc6a3d1500f832f2c3c040f0d4668c75b2b5", + "sha256:6bbd70d2a0be93349ee76652992164d89dab54e55cb05d302d4375851b60d173", + "sha256:6c8ebc5b2cf89b4dd2d407312eeec4ed1f999863a6d29d1d1834696f6db08ac8", + "sha256:6d83fda6e4d83742d60f522ce3bd61ce0d4690c19b73dc79ee8da2a48f2ef065", + "sha256:6db1bc132b3ee46bb79a1d86bfadce71d581943156004e481045ce903f1979db", + "sha256:7095d8f486435ffcc42014aebba27c05b2a3b38d5d3630ebe77734db7653b272", + "sha256:7832ecd8adc5ef9f0af7c376ea4ab8ba66077da45e1d00da9f93366cbfb70dfe", + "sha256:7947134bc4b28a00c07616e07013680628954bc93daa4cbab99a6d7aea402809", + "sha256:7a1232d989dc37b2b0d760ed3cd040f848a7578417d0bda24e544e73f5d6b02a", + "sha256:7bc9808782e3147fb71b44129f3dfabfbe839bc35954f9f7f3dd8dd4c149413c", + "sha256:7ecd20dfef83d3180d9f851476e5e3d9a76973e24432721f7cc8cac52a646d3a", + "sha256:803dc8ca520db0db6e14bc61c52666a2344b5ff45c9c4524967f1920779ef64f", + "sha256:80eca1ef96a3b379026bcf531d7cbfbfad767da37ba4e90bc529e6695f88ba09", + "sha256:87acfa228524b8564ba5d5a431ff6c708721ff7755f718992184bb9a81365f0e", + "sha256:8aaea18c41dacf2bf1a6f81960c196f85e3991c9387c3d9bff97976be2c195a4", + "sha256:8ace24f1b028dee7168556e0a83c1f608abe63f4b82dc05b26ad43495d8717bf", + "sha256:8b1c84803dd57f8b81397dcc24eca73bc44f1c5da36b440f358372b50c7bb7da", + "sha256:8becb576748328b2fdf9740a973e62f41de83702a92761e0ff441b65ebe25fce", + "sha256:8c392d44cc072255e88efc4335be67ebdfb88ae4b3757bd573c49fae35e23470", + "sha256:91a570f291a4d7ea4473f37b5e1ce377d771a8567a7a6b5f7b482023bd81b3ef", + "sha256:9245d3181346f1f608b56cb45fb21c080558426dac566074a2c4145daa411588", + "sha256:965e52d079e8746abe6d15e8b1da7b65d9f1ccb5bceb1aa410072f09a1cdb3fd", + "sha256:9849d06f254fffd45d35ba2b39694dbc839f6c5cca8990a509b3058588f23d77", + "sha256:98df463206a76ef02d8662490bafc6ca2d6dec10cfff3dda90798c0e4f330151", + "sha256:9978b0968acbc2d9160758e9f63af0fbda62f121ae596ad56cb06a8afd3d5aea", + "sha256:99cd2f5dd46e886a63bc08dbb44ae63b16eeff94d714be55ce41ff86604bbc97", + "sha256:9a53bf859e4b54ad06dda20aa42a16dd36b03f11626beacc41b570f25cfcb471", + "sha256:9c936d73deca901b600fb73c9aaf3630dd358f5ce35c5d5e1ea804b33796ecb5", + "sha256:9e52a186b68b5995c3756f243e286ea701470273ba938b9f83a0ef055edeb95e", + "sha256:a8f7a1a4793c4dec2dc7c6c1fac5370123a24c6dabc7312fbce8766a0d5c40c8", + "sha256:aadc4b8ac31ef4ac31f13ab416d5891ff1886b0c3115e88b4be53d3ce08e235f", + "sha256:ad2b129e43998292f89f138dfda32ec1b9ba31e68b35a61948bc10bf53e94444", + "sha256:afb4e6edfeb6797165a25e5ea221992043c46b3475f7d4d96e2c25271dfea4d8", + "sha256:afe8bedc9893a358a29430e98164a902816fd7787f92b476193a0de7aae4b985", + "sha256:b349092caf10b6b0585e0ff0ed17e5fc8a88c3bdacb37b38778de4a1ae568827", + "sha256:b5d1d4300706891d197cf21b39f41b3c8047d081676d82eb8dcfeb8d0073c52b", + "sha256:b619c691c94f2770373a91144bbbe42056a993fa95aba67f87a7625f71384040", + "sha256:bb05962feb649bbb5589eab89b9fa57679ce8285e647195bee76c8c0821fcf22", + "sha256:bb23c806f175a88db60b3894bca4956f6d557ed0571b2fcc7818c1c83f000759", + "sha256:bc936c0cea105c7773e6b8cc58ed2a3b168a3da9bbdec7466cee9725198607a9", + "sha256:bea66a30fb0b9d3109db950b490f6aa211fb15162f097b20141b1aeb5057a670", + "sha256:bf6e39e296422588c39eaa8bea17c3d5af9335c7273691615e6aa262f3a1c469", + "sha256:c19c27056cb34b352c064ac0d58ac7f7da29cd225cb3140b8ff69455e6858966", + "sha256:c1abea439874652c3ad6ca6a6e893cfe4f2e2c149294dbe2a5c1cf7e2e1ef200", + "sha256:c27b57205a6946de4dedb169d42f63d8f61e51a70e3096ffce18680c8407616c", + "sha256:c334ab66657dc0250281d1deaaa0243bb2072da0939fc89cbce4513a79b7ebdc", + "sha256:c59e589f162dffb8bea47fb8108961891df5d54d3a1c59660f211a53084438cd", + "sha256:c6ab07a20fe548f4830bc3d795d4e8193616379abb8715fcf0391ca599cf4f4b", + "sha256:c8e25c5530bd6bb5a96ad11de2dc16bebbbec8b4e2c1600bf1ce78cbf36c96e6", + "sha256:cdd58e73a2e1bff848067a65afb77a7dcd1884050c22d18a0a7af5cf2428a3ee", + "sha256:d0fc43f5f5ae113ad60b502ec1efee42218c21a1e00dd1bd7c82d00b25cf72ad", + "sha256:d26fdf9d680eb9738e8b58ab7946cb35ed8b076dac823189f2614d732565e89a", + "sha256:d31416540af1ad2994a33cf7f2e98e1e8f50722e410afc54ae99bdd6039a4f87", + "sha256:d80a356e6123b0910171ab7b2ce4d058146170748f11b7ec3c005da54bfbc059", + "sha256:da7086efb3d388078874b2fafd5042a5c6464e08ecb68bf3813c3b9d54d236b4", + "sha256:dcae87cbf2058a33286ce50e627bdd1a4875579103f6b933546ffb1a34ab8c2e", + "sha256:ddfd3632e5f04619d780f60e85a5fe082a8eebce33aefb08b6783779ff04d017", + "sha256:de1f491b329e424f7e7b2874624a604c163ea05341f709cd47c1a46f4930ca97", + "sha256:de8b30056fe36947d50597680aa016f5a9a59f2621b496ca0fe8ad037ee63f76", + "sha256:e3fc442c3ae66c4f9a0d35f2c2a0e36f6a9c125b94c3db1ee8fa5af4dca51a57", + "sha256:e7ac4f3cc1cdbe5b31bce988260ac12ae0e273ec6108bf35de66384599fabc25", + "sha256:e7b705a7c3bb5c7a86a2e4bf5d4607e22194d821e050b5f5605a69ded99dc5c3", + "sha256:eacc7d5ad4b120131da4c6cecd8ded5e545dab3654de592cf8901a7acfd58c18", + "sha256:ebdaea27ada24e53d673c46a8a4bba8e1904fa8589512bd3146382d877ab4be9", + "sha256:ed37c74e33c67f805e046c0e4d1af2007d4087d01748fa47a56ee3501c1bb597", + "sha256:ed4e54d4425c9f5eb766ff8ee4b992fe0011575a7da5daa8bf898675c684808c", + "sha256:ef2dbbb2924c5048bea586ddf204607c8e91fbe70b95a7dce1d5b5403f2ef06f", + "sha256:efbe1d873f916fa31235b8acec6a686e7b7e47e3e95490cbe8b257dabaa14d3b", + "sha256:f18e53a47619ef092cb28ac1f1f2b457ad68177369a5c02a1da930f5f0a43d78", + "sha256:f343ea39f61f899bac145aac260dd456a98df59e4258ad8d395892b6b4759b20" ], - "version": "==2.8.3" + "version": "==2.8.4" }, "bitstring": { "hashes": [ @@ -529,11 +529,11 @@ }, "importlib-metadata": { "hashes": [ - "sha256:4552f51d852a2b73153ca17167add744874c71f9fed5cd641d043923cd7b17fd", - "sha256:790dcaa833b76d59f1444cc6e2fec9ed09df1c12ea3ac499f478b7f33b9a5b0c" + "sha256:7fc841f8b8332803464e5dc1c63a2e59121f46ca186c0e2e182e80bf8c1319f7", + "sha256:d97503976bb81f40a193d41ee6570868479c69d5068651eb039c40d850c59d67" ], "markers": "python_version < '3.10'", - "version": "==6.10.0" + "version": "==7.0.0" }, "ipaddress": { "hashes": [ @@ -560,7 +560,7 @@ }, "ltorrent": { "git": "https://github.com/hlf20010508/LTorrent.git", - "ref": "92565b8812ad05c0470268fcdaddbe6bf56f9121" + "ref": "0594de8a76dff5c6cb62953446feaef720a0e2da" }, "markupsafe": { "hashes": [ diff --git a/modules/env.py b/modules/env.py index 3d9e0a2..f04eb09 100644 --- a/modules/env.py +++ b/modules/env.py @@ -21,4 +21,4 @@ od_client_secret = os.environ["od_client_secret"] remote_root_path = os.environ.get("remote_root_path", "/") -delete_flag = True if os.environ.get("delete_flag", "false") == 'true' else False \ No newline at end of file +delete_flag = True if os.environ.get("delete_flag", "false") == 'true' else False diff --git a/modules/handlers/magnet.py b/modules/handlers/magnet.py index 0579674..657475f 100644 --- a/modules/handlers/magnet.py +++ b/modules/handlers/magnet.py @@ -6,62 +6,93 @@ """ from time import time +from io import BytesIO from telethon import events from ltorrent.lt_async.client import Client, CustomStorage from ltorrent.lt_async.log import LoggerBase -from modules.client import tg_bot -from modules.env import tg_user_name +from modules.client import tg_bot, onedrive +from modules.env import tg_user_name, server_uri from modules.utils import check_in_group, check_tg_login, check_od_login, cmd_parser from modules.log import logger -port = 8080 +port = int(server_uri.rstrip('/').split(':')[-1]) class MyStorage(CustomStorage): - def __init__(self): + def __init__(self, file_info_list): CustomStorage.__init__(self) + self.file_info_list = file_info_list + self.uploader_session_dict = {} - def write(self, file_piece_list, data): - pass + async def write(self, file_piece_list, data): + for file_piece in file_piece_list: + if file_piece['path'] not in self.uploader_session_dict: + name = file_piece['path'].split('/')[-1] + upload_session = onedrive.multipart_upload_session_builder(name) + for file_info in self.file_info_list: + if file_info['path'] == file_piece['path']: + self.uploader_session_dict[file_piece['path']] = onedrive.multipart_uploader(upload_session, file_info['length']) + break + + file_offset = file_piece["fileOffset"] + piece_offset = file_piece["pieceOffset"] + length = file_piece["length"] + buffer = BytesIO(data[piece_offset : piece_offset + length]) + await onedrive.multipart_upload( + self.uploader_session_dict[file_piece['path']], + buffer, + file_offset + ) - def read(self, files, block_offset, block_length): + async def read(self, files, block_offset, block_length): pass class MyLogger(LoggerBase): - def __init__(self, callback): + def __init__(self, bot, callback): LoggerBase.__init__(self) + self.bot = bot self.callback = callback + self.message = None self.last_call = time() async def INFO(self, *args): - merge_string = ' '.join(map(str, args)) - await self.callback(merge_string) + merged_string = ' '.join(map(str, args)) + logger(merged_string) + if self.message: + await self.bot.edit_message(self.message, merged_string) + else: + self.message = await self.callback(merged_string) async def PROGRESS(self, *args): now = time() if now - self.last_call > 5: - merge_string = ' '.join(map(str, args)) - await self.callback(merge_string) + merged_string = ' '.join(map(str, args)) + logger(merged_string) + if self.message: + await self.bot.edit_message(self.message, merged_string) + else: + self.message = await self.callback(merged_string) self.last_call = now async def FILES(self, *args): - merge_string = ' '.join(map(str, args)) - await self.callback(merge_string) + merged_string = ' '.join(map(str, args)) + logger(merged_string) + await self.callback(merged_string) async def DEBUG(self, *args): - merge_string = ' '.join(map(str, args)) - logger(merge_string) + merged_string = ' '.join(map(str, args)) + logger(merged_string) @tg_bot.on(events.NewMessage(pattern="/magnet", incoming=True, from_users=tg_user_name)) @check_in_group @check_tg_login @check_od_login async def magnet_handler(event): - custom_storage = MyStorage() - my_logger = MyLogger(event.respond) + my_logger = MyLogger(tg_bot, event.respond) client = Client( port=port, - custom_storage=custom_storage, - stdout=my_logger + custom_storage=True, + stdout=my_logger, + sequential=True ) cmd = cmd_parser(event) @@ -71,6 +102,7 @@ async def magnet_handler(event): client.load(magnet_link=cmd[1]) # '0' for all await client.select_file(selection='0') + client.custom_storage = MyStorage(client.torrent.file_names) await client.run() else: await event.reply('Format wrong.') @@ -84,6 +116,7 @@ async def magnet_handler(event): # /magnet magnet:?xt=urn:btih:xxxxxxxxxxxx 1 3-6 9 client.load(magnet_link=cmd[1]) await client.select_file(selection=' '.join(cmd[2:])) + client.custom_storage = MyStorage(client.torrent.file_names) await client.run() raise events.StopPropagation