mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
refactor: isolate pending transfer and config queries
This commit is contained in:
@@ -54,9 +54,12 @@ class TransferPendingOper(DbOper):
|
||||
:param limit: 单次回放上限
|
||||
:return: (存储, 源文件路径) 列表
|
||||
"""
|
||||
items = self._execute_sync_query(
|
||||
lambda session: TransferPending.list_all(session, limit=limit)
|
||||
)
|
||||
return [
|
||||
(item.storage, item.src_path)
|
||||
for item in TransferPending.list_all(self._db, limit=limit) or []
|
||||
for item in items or []
|
||||
if item and item.storage and item.src_path
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user