-
Notifications
You must be signed in to change notification settings - Fork 127
fix: 允许删除离线站点当天获取的错误数据 #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: 允许删除离线站点当天获取的错误数据 #742
Conversation
- Fix seeding quantity: Count deduplicated table rows instead of reading incorrect 588 - Fix seeding size: Add deduplication when accumulating torrent sizes - Use torrent ID (details.php?id=XXX) as unique identifier for deduplication - Resolve issue where haidan site returns 100% duplicated data in HTML fragment
- When site is marked as offline, allow deleting today data with all zeros - Fix metadata.lastUserInfo cache not updating after deletion - Remove debug console.log from UserDataTimeline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine
Reviewer's GuideThis PR refines the offline-site data deletion workflow by introducing checks to allow removal of same-day erroneous entries, synchronizes the metadata cache upon deletions, cleans up a stray debug statement, and extends the haidan site definition to fetch and parse seeding statistics via AJAX. Sequence diagram for deleting erroneous data from offline sitessequenceDiagram
actor User
participant "HistoryDataViewDialog.vue"
participant "userInfo.ts (offscreen)"
participant "metadataStore"
User->>"HistoryDataViewDialog.vue": Click delete on today's erroneous data
"HistoryDataViewDialog.vue"->>"userInfo.ts (offscreen)": sendMessage("removeSiteUserInfo", {siteId, date})
"userInfo.ts (offscreen)"->>"metadataStore": Remove userInfo for given date
"userInfo.ts (offscreen)"->>"metadataStore": Check if deleted date is lastUserInfo
alt Last successful data deleted
"userInfo.ts (offscreen)"->>"metadataStore": Update lastUserInfo to latest success or remove
end
"userInfo.ts (offscreen)"-->>"HistoryDataViewDialog.vue": Deletion complete
"HistoryDataViewDialog.vue"->>User: Refresh history data
Class diagram for updated deletion logic and metadata synchronizationclassDiagram
class HistoryDataViewDialog {
+isSiteOffline: computed
+isDataErroneous(userInfo: IShowUserInfo): boolean
+canDeleteTodayData(item: IShowUserInfo): boolean
+deleteSiteUserInfo(date: string[]): void
}
class userInfo {
+removeSiteUserInfo(siteId: string, date: string[]): void
}
class metadataStore {
+lastUserInfo: Record<TSiteID, IUserInfo>
}
HistoryDataViewDialog --> userInfo : sendMessage("removeSiteUserInfo")
userInfo --> metadataStore : update lastUserInfo on deletion
Class diagram for haidan site definition AJAX seeding info parsingclassDiagram
class siteMetadata {
+process: Step[]
}
class Step {
+requestConfig: object
+fields: string[]
+selectors: object
}
siteMetadata "1" o-- "*" Step : process steps
Step <|-- SeedingStep : AJAX seeding info
class SeedingStep {
+selectors: object
+seeding
+seedingSize
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
问题描述
当站点关闭后,最后一次获取到的数据都是错误的0,而且最后一次的历史记录始终无法删除,导致用户无法使用最后一次站点正常时获取的数据留作纪念。
具体表现为:
metadata.lastUserInfo缓存未更新,仍显示已删除的数据修复方案
1. 允许删除离线站点的错误数据
isOffline)时,允许删除当天获取的错误数据HistoryDataViewDialog.vue的删除权限判断逻辑2. 修复删除后缓存未更新的问题
userInfo.ts中的removeSiteUserInfo处理函数metadata.lastUserInfo缓存metadata.lastUserInfo中的缓存3. 清理调试日志
UserDataTimeline/Index.vue中的console.debug调试日志修改文件
src/entries/options/views/Overview/MyData/HistoryDataViewDialog.vuesrc/entries/offscreen/utils/userInfo.tssrc/entries/options/views/Overview/MyData/UserDataTimeline/Index.vue测试
已测试验证:
metadata.lastUserInfo缓存正确同步更新Summary by Sourcery
Allow users to delete zeroed data entries for offline sites, ensure lastUserInfo cache stays in sync after deletions, and improve the Haidan site metadata parsing pipeline while cleaning up debug logs.
New Features:
Bug Fixes:
Enhancements: