File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Rss2pan
2
2
3
- 将 Rss 订阅离线下载到网盘。目前支持 115
3
+ 将 Rss 订阅离线下载到 115 网盘。
4
4
5
5
## 关于
6
6
30
30
``` bash
31
31
# 查看帮助
32
32
rss2pan -h
33
- # 直接运行。读取 rss.json,进行添加离线任务
33
+ # 直接运行。读取 rss.json,依次添加离线任务
34
34
rss2pan
35
35
# 并发请求 rss 网站。然后再添加 115 离线任务
36
36
rss2pan -m
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub fn build_app() -> Command<'static> {
29
29
fn t_cmd ( ) {
30
30
let cmd = build_app ( ) ;
31
31
let matches = cmd. clone ( ) . try_get_matches_from ( [ "rss2pan" , "-m" ] ) . unwrap ( ) ;
32
- assert ! ( matches. contains_id ( "concurrent" ) ) ;
32
+ assert_eq ! ( matches. get_one :: < bool > ( "concurrent" ) . copied ( ) , Some ( true ) ) ;
33
33
let matches = cmd. clone ( ) . try_get_matches_from ( [ "rss2pan" ] ) . unwrap ( ) ;
34
34
assert_eq ! ( matches. get_one:: <bool >( "concurrent" ) . copied( ) , Some ( false ) ) ;
35
35
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ async fn main() -> anyhow::Result<()> {
33
33
}
34
34
return Ok ( ( ) ) ;
35
35
}
36
- if matches. contains_id ( "concurrent" ) {
36
+ if matches. get_one :: < bool > ( "concurrent" ) . copied ( ) == Some ( true ) {
37
37
if let Err ( err) = execute_tasks ( & service) . await {
38
38
println ! ( "{}" , err) ;
39
39
}
Original file line number Diff line number Diff line change @@ -140,7 +140,16 @@ impl Yiyiwu {
140
140
. filter ( |item| !service. has_item ( & item. magnet ) )
141
141
. map ( |item| & * item. magnet )
142
142
. collect ( ) ;
143
- // log::debug!("tasks: {:?}", tasks);
143
+ // 测试用的开关
144
+ if std:: env:: var ( "RSS2PAN_LOG" ) . is_ok ( ) {
145
+ log:: info!(
146
+ "[RSS2PAN_LOG] [{}] [{}] has {} tasks" ,
147
+ config. name,
148
+ config. url,
149
+ tasks. len( )
150
+ ) ;
151
+ continue ;
152
+ }
144
153
if tasks. len ( ) == 0 {
145
154
log:: info!( "[{}] has 0 task" , config. name) ;
146
155
continue ;
You can’t perform that action at this time.
0 commit comments