From 946b8f36f98fbc9ecd25fa1883240cd51155b9f3 Mon Sep 17 00:00:00 2001 From: Starry-OvO Date: Wed, 12 Jun 2024 08:04:47 +0800 Subject: [PATCH] feat: presist raw voice md5 #202 --- aiotieba/api/_classdef/contents.py | 3 +-- aiotieba/api/get_user_contents/_classdef.py | 3 +-- aiotieba/const.py | 2 +- pyproject.toml | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aiotieba/api/_classdef/contents.py b/aiotieba/api/_classdef/contents.py index e7995df9..c56c28ea 100644 --- a/aiotieba/api/_classdef/contents.py +++ b/aiotieba/api/_classdef/contents.py @@ -145,8 +145,7 @@ class FragVoice: @staticmethod def from_tbdata(data_proto: TypeMessage) -> "FragVoice": - voice_md5 = data_proto.voice_md5 - md5 = voice_md5[: voice_md5.rfind('_')] + md5 = data_proto.voice_md5 duration = data_proto.during_time / 1000 return FragVoice(md5, duration) diff --git a/aiotieba/api/get_user_contents/_classdef.py b/aiotieba/api/get_user_contents/_classdef.py index 04189608..48f318ef 100644 --- a/aiotieba/api/get_user_contents/_classdef.py +++ b/aiotieba/api/get_user_contents/_classdef.py @@ -39,8 +39,7 @@ class FragVoice_up: @staticmethod def from_tbdata(data_proto: TypeMessage) -> "FragVoice_up": - voice_md5 = data_proto.voice_md5 - md5 = voice_md5[: voice_md5.rfind('_')] + md5 = data_proto.voice_md5 duration = int(data_proto.during_time) / 1000 return FragVoice_up(md5, duration) diff --git a/aiotieba/const.py b/aiotieba/const.py index 1327e33d..d5ca682f 100644 --- a/aiotieba/const.py +++ b/aiotieba/const.py @@ -1,4 +1,4 @@ -MAIN_VERSION = "12.62.1.0" +MAIN_VERSION = "12.62.3.0" POST_VERSION = "12.35.1.0" APP_SECURE_SCHEME = "https" diff --git a/pyproject.toml b/pyproject.toml index 548ecac5..a4e7179b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aiotieba" -version = "4.4.5" +version = "4.4.6a0" description = "Asynchronous I/O Client for Baidu Tieba" authors = [{ name = "Starry-OvO", email = "starry.qvq@gmail.com" }] urls = { Repository = "https://github.com/Starry-OvO/aiotieba/", Documentation = "https://aiotieba.cc/" }