-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.log
554 lines (475 loc) · 20.4 KB
/
test.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
Compiling pinepods_firewood v0.1.0 (/home/collinp/Documents/GitHub/pinepods-firewood)
warning: unused imports: `MatchOptions`, `glob_with`
--> src/helpers/gen_funcs.rs:9:12
|
9 | use glob::{glob_with, MatchOptions};
| ^^^^^^^^^ ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused imports: `Accessor`, `Probe`, `TaggedFileExt`
--> src/helpers/gen_funcs.rs:10:13
|
10 | use lofty::{Accessor, Probe, TaggedFileExt};
| ^^^^^^^^ ^^^^^ ^^^^^^^^^^^^^
warning: unused import: `log::error`
--> src/helpers/gen_funcs.rs:12:5
|
12 | use log::error;
| ^^^^^^^^^^
warning: unused imports: `BufReader`, `PathBuf`, `Path`, `fs::File`
--> src/helpers/music_handler.rs:2:5
|
2 | fs::File,
| ^^^^^^^^
3 | io::{BufReader, Cursor},
| ^^^^^^^^^
4 | path::{Path, PathBuf},
| ^^^^ ^^^^^^^
warning: unused imports: `AudioFile`, `Probe`
--> src/helpers/music_handler.rs:10:13
|
10 | use lofty::{AudioFile, Probe};
| ^^^^^^^^^ ^^^^^
warning: unused imports: `PathBuf`, `Path`
--> src/helpers/queue.rs:3:12
|
3 | path::{Path, PathBuf},
| ^^^^ ^^^^^^^
warning: unused imports: `AudioFile`, `Probe`
--> src/helpers/queue.rs:6:13
|
6 | use lofty::{AudioFile, Probe};
| ^^^^^^^^^ ^^^^^
warning: unused import: `super::gen_funcs::bulk_add`
--> src/helpers/queue.rs:10:5
|
10 | use super::gen_funcs::bulk_add;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: `std::any::Any`
--> src/helpers/requests.rs:1:5
|
1 | use std::any::Any;
| ^^^^^^^^^^^^^
warning: unused import: `Path`
--> src/helpers/requests.rs:9:26
|
9 | use std::path::{Display, Path, PathBuf};
| ^^^^
warning: unused import: `std::pin::pin`
--> src/helpers/requests.rs:11:5
|
11 | use std::pin::pin;
| ^^^^^^^^^^^^^
warning: unused import: `log::error`
--> src/helpers/requests.rs:17:5
|
17 | use log::error;
| ^^^^^^^^^^
warning: unused import: `std::error::Error`
--> src/helpers/requests.rs:18:5
|
18 | use std::error::Error;
| ^^^^^^^^^^^^^^^^^
warning: the item `Path` is imported redundantly
--> src/helpers/requests.rs:189:17
|
9 | use std::path::{Display, Path, PathBuf};
| ---- the item `Path` is already imported here
...
189 | use std::path::Path;
| ^^^^^^^^^^^^^^^
warning: unused import: `std::path::Path`
--> src/helpers/requests.rs:189:17
|
189 | use std::path::Path;
| ^^^^^^^^^^^^^^^
warning: unused variable: `e`
--> src/helpers/gen_funcs.rs:32:13
|
32 | Err(e) => {
| ^ help: if this is intentional, prefix it with an underscore: `_e`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `data`
--> src/helpers/requests.rs:139:16
|
139 | Ok(data) => {}
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
warning: unused variable: `data`
--> src/helpers/requests.rs:140:17
|
140 | Err(data) => {}
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
warning: variable does not need to be mutable
--> src/helpers/requests.rs:129:13
|
129 | let mut config_path = app_path.join("pinepods_config.json");
| ----^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused variable: `episode_title`
--> src/helpers/music_handler.rs:88:13
|
88 | let episode_title = episode.EpisodeTitle.clone();
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_episode_title`
warning: variable does not need to be mutable
--> src/helpers/music_handler.rs:95:17
|
95 | let mut cursor = Cursor::new(resp.bytes().unwrap()); // Adds Read and Seek to the bytes via Cursor
| ----^^^^^^
| |
| help: remove this `mut`
warning: function `create_app_path` is never used
--> src/helpers/requests.rs:122:4
|
122 | fn create_app_path(app_path: &Display) -> std::io::Result<()> {
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: field `pinepods_instance` is never read
--> src/helpers/models.rs:6:16
|
4 | pub struct PinepodsCheck {
| ------------- field in this struct
5 | pub status_code: u16,
6 | pub(crate) pinepods_instance: bool
| ^^^^^^^^^^^^^^^^^
|
= note: `PinepodsCheck` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: fields `status` and `retrieved_id` are never read
--> src/helpers/models.rs:11:5
|
10 | pub struct PinepodsUserResponse {
| -------------------- fields in this struct
11 | status: String,
| ^^^^^^
12 | retrieved_id: Option<i32> // Assuming id is a u32, adjust as needed. Using Option if id might not always be present.
| ^^^^^^^^^^^^
|
= note: `PinepodsUserResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: structure field `PodcastID` should have a snake case name
--> src/helpers/requests.rs:52:9
|
52 | pub PodcastID: i64, // Assuming integers, change to i32 if the range is smaller
| ^^^^^^^^^ help: convert the identifier to snake case: `podcast_id`
|
= note: `#[warn(non_snake_case)]` on by default
warning: structure field `PodcastName` should have a snake case name
--> src/helpers/requests.rs:53:9
|
53 | pub PodcastName: String,
| ^^^^^^^^^^^ help: convert the identifier to snake case: `podcast_name`
warning: structure field `ArtworkURL` should have a snake case name
--> src/helpers/requests.rs:54:9
|
54 | pub ArtworkURL: String,
| ^^^^^^^^^^ help: convert the identifier to snake case: `artwork_url`
warning: structure field `Author` should have a snake case name
--> src/helpers/requests.rs:55:9
|
55 | pub Author: String,
| ^^^^^^ help: convert the identifier to snake case: `author`
warning: structure field `Categories` should have a snake case name
--> src/helpers/requests.rs:56:9
|
56 | pub Categories: String, // Change to Vec<String> if it's actually a JSON array
| ^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `categories`
warning: structure field `EpisodeCount` should have a snake case name
--> src/helpers/requests.rs:57:9
|
57 | pub EpisodeCount: u32, // Assuming integers
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_count`
warning: structure field `FeedURL` should have a snake case name
--> src/helpers/requests.rs:58:9
|
58 | pub FeedURL: String,
| ^^^^^^^ help: convert the identifier to snake case: `feed_url`
warning: structure field `WebsiteURL` should have a snake case name
--> src/helpers/requests.rs:59:9
|
59 | pub WebsiteURL: String,
| ^^^^^^^^^^ help: convert the identifier to snake case: `website_url`
warning: structure field `Description` should have a snake case name
--> src/helpers/requests.rs:60:9
|
60 | pub Description: String,
| ^^^^^^^^^^^ help: convert the identifier to snake case: `description`
warning: structure field `PodcastName` should have a snake case name
--> src/helpers/requests.rs:65:9
|
65 | pub PodcastName: Option<String>, // Optional if it might not always be present
| ^^^^^^^^^^^ help: convert the identifier to snake case: `podcast_name`
warning: structure field `EpisodeTitle` should have a snake case name
--> src/helpers/requests.rs:66:9
|
66 | pub EpisodeTitle: String,
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_title`
warning: structure field `EpisodePubDate` should have a snake case name
--> src/helpers/requests.rs:67:9
|
67 | pub EpisodePubDate: String,
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_pub_date`
warning: structure field `EpisodeDescription` should have a snake case name
--> src/helpers/requests.rs:68:9
|
68 | pub EpisodeDescription: String,
| ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_description`
warning: structure field `EpisodeArtwork` should have a snake case name
--> src/helpers/requests.rs:69:9
|
69 | pub EpisodeArtwork: String,
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_artwork`
warning: structure field `EpisodeURL` should have a snake case name
--> src/helpers/requests.rs:70:9
|
70 | pub EpisodeURL: String,
| ^^^^^^^^^^ help: convert the identifier to snake case: `episode_url`
warning: structure field `EpisodeDuration` should have a snake case name
--> src/helpers/requests.rs:71:9
|
71 | pub EpisodeDuration: i64, // Assuming this is an integer value for duration in seconds
| ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_duration`
warning: structure field `ListenDuration` should have a snake case name
--> src/helpers/requests.rs:73:9
|
73 | pub ListenDuration: Option<i64>, // Assuming this is an integer value for listened duration in seconds
| ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `listen_duration`
warning: structure field `EpisodeID` should have a snake case name
--> src/helpers/requests.rs:75:9
|
75 | pub EpisodeID: Option<i64>,
| ^^^^^^^^^ help: convert the identifier to snake case: `episode_id`
warning: structure field `PodcastID` should have a snake case name
--> src/helpers/requests.rs:76:9
|
76 | pub PodcastID: Option<i64>,
| ^^^^^^^^^ help: convert the identifier to snake case: `podcast_id`
warning: structure field `PodcastName` should have a snake case name
--> src/helpers/requests.rs:82:5
|
82 | PodcastName: String,
| ^^^^^^^^^^^ help: convert the identifier to snake case: `podcast_name`
warning: structure field `ArtworkURL` should have a snake case name
--> src/helpers/requests.rs:83:5
|
83 | ArtworkURL: String,
| ^^^^^^^^^^ help: convert the identifier to snake case: `artwork_url`
warning: structure field `Description` should have a snake case name
--> src/helpers/requests.rs:84:5
|
84 | Description: String, // Add this field if needed in your struct
| ^^^^^^^^^^^ help: convert the identifier to snake case: `description`
warning: structure field `EpisodeCount` should have a snake case name
--> src/helpers/requests.rs:85:5
|
85 | EpisodeCount: u32,
| ^^^^^^^^^^^^ help: convert the identifier to snake case: `episode_count`
warning: structure field `WebsiteURL` should have a snake case name
--> src/helpers/requests.rs:86:5
|
86 | WebsiteURL: String,
| ^^^^^^^^^^ help: convert the identifier to snake case: `website_url`
warning: structure field `FeedURL` should have a snake case name
--> src/helpers/requests.rs:87:5
|
87 | FeedURL: String,
| ^^^^^^^ help: convert the identifier to snake case: `feed_url`
warning: structure field `Author` should have a snake case name
--> src/helpers/requests.rs:88:5
|
88 | Author: String,
| ^^^^^^ help: convert the identifier to snake case: `author`
warning: structure field `Categories` should have a snake case name
--> src/helpers/requests.rs:89:5
|
89 | Categories: String,
| ^^^^^^^^^^ help: convert the identifier to snake case (notice the capitalization): `categories`
warning: structure field `PodcastID` should have a snake case name
--> src/helpers/requests.rs:90:5
|
90 | PodcastID: i64,
| ^^^^^^^^^ help: convert the identifier to snake case: `podcast_id`
warning: `pinepods_firewood` (lib) generated 52 warnings (run `cargo fix --lib -p pinepods_firewood` to apply 20 suggestions)
warning: unused imports: `PathBuf`, `Path`, `env`
--> src/app.rs:2:5
|
2 | env,
| ^^^
3 | path::{Path, PathBuf},
| ^^^^ ^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused imports: `debug`, `info`, `warn`
--> src/app.rs:8:11
|
8 | use log::{info, debug, warn, error};
| ^^^^ ^^^^^ ^^^^
warning: unused import: `error::Error`
--> src/main.rs:5:5
|
5 | error::Error,
| ^^^^^^^^^^^^
warning: unused import: `std::fmt::format`
--> src/main.rs:11:5
|
11 | use std::fmt::format;
| ^^^^^^^^^^^^^^^^
warning: unused import: `std::thread::sleep`
--> src/main.rs:12:5
|
12 | use std::thread::sleep;
| ^^^^^^^^^^^^^^^^^^
warning: unused imports: `ExecutableCommand`, `KeyEventKind`
--> src/main.rs:15:56
|
15 | event::{self, DisableMouseCapture, Event, KeyCode, KeyEventKind},
| ^^^^^^^^^^^^
...
18 | ExecutableCommand
| ^^^^^^^^^^^^^^^^^
warning: unused import: `Paragraph`
--> src/main.rs:25:90
|
25 | widgets::{Block, BorderType, Borders, Cell, Gauge, List, ListItem, Row, Table, Tabs, Paragraph},
| ^^^^^^^^^
warning: unused import: `std::ops::Not`
--> src/main.rs:31:5
|
31 | use std::ops::Not;
| ^^^^^^^^^^^^^
warning: unused import: `stderr`
--> src/main.rs:32:22
|
32 | use std::io::{Write, stderr, Result};
| ^^^^^^
warning: unused import: `serde_json::to_string`
--> src/main.rs:34:5
|
34 | use serde_json::to_string;
| ^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: `debug`, `info`, `warn`
--> src/main.rs:36:11
|
36 | use log::{info, debug, warn, error};
| ^^^^ ^^^^^ ^^^^
warning: unnecessary parentheses around function argument
--> src/main.rs:121:50
|
121 | let url_build = String::from((format!("{}{}{}", web_protocol.to_lowercase().trim(), "://", hostname.trim())));
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
121 - let url_build = String::from((format!("{}{}{}", web_protocol.to_lowercase().trim(), "://", hostname.trim())));
121 + let url_build = String::from(format!("{}{}{}", web_protocol.to_lowercase().trim(), "://", hostname.trim()));
|
warning: unused variable: `feed_url`
--> src/app.rs:119:40
|
119 | ContentState::PodcastMode {feed_url} => {
| ^^^^^^^^ help: try ignoring the field: `feed_url: _`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `podcast_id`
--> src/app.rs:138:41
|
138 | ContentState::EpisodeMode { podcast_id } => {
| ^^^^^^^^^^ help: try ignoring the field: `podcast_id: _`
warning: unused variable: `episode_url`
--> src/app.rs:143:21
|
143 | let episode_url = selected_episode.EpisodeURL.clone();
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_episode_url`
warning: unused variable: `episode_duration`
--> src/app.rs:144:21
|
144 | let episode_duration = selected_episode.EpisodeDuration.clone();
| ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_episode_duration`
warning: unused variable: `listen_duration`
--> src/app.rs:145:21
|
145 | let listen_duration = selected_episode.ListenDuration.clone();
| ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_listen_duration`
warning: variable does not need to be mutable
--> src/app.rs:127:21
|
127 | let mut pinepods_values = self.pinepods_values.lock().unwrap();
| ----^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: unused import: `Stylize`
--> src/main.rs:21:33
|
21 | prelude::{CrosstermBackend, Stylize, Terminal, Backend},
| ^^^^^^^
warning: unused import: `Write`
--> src/main.rs:32:15
|
32 | use std::io::{Write, stderr, Result};
| ^^^^^
warning: unused variable: `data`
--> src/main.rs:84:17
|
84 | Err(data) => {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
warning: unused variable: `data`
--> src/main.rs:133:44
|
133 | ... Ok(data) => {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
warning: unused variable: `data`
--> src/main.rs:138:56
|
138 | ... Ok(data) => { break }
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
warning: variable does not need to be mutable
--> src/main.rs:54:9
|
54 | let mut shared_values = Arc::new(Mutex::new(pinepods_firewood::helpers::requests::ReqwestValues {
| ----^^^^^^^^^^^^^
| |
| help: remove this `mut`
warning: variable does not need to be mutable
--> src/main.rs:168:9
|
168 | let mut pinepods_values = shared_values.lock().unwrap();
| ----^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
warning: fields `status_code` and `pinepods_instance` are never read
--> src/main.rs:41:5
|
40 | struct PinepodsCheck {
| ------------- fields in this struct
41 | status_code: u16,
| ^^^^^^^^^^^
42 | pinepods_instance: bool
| ^^^^^^^^^^^^^^^^^
|
= note: `PinepodsCheck` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: variant `PlayingEpisode` is never constructed
--> src/app.rs:46:5
|
43 | pub enum ContentState {
| ------------ variant in this enum
...
46 | PlayingEpisode { ep_url: String }
| ^^^^^^^^^^^^^^
warning: `pinepods_firewood` (bin "pinepods_firewood") generated 27 warnings (run `cargo fix --bin "pinepods_firewood"` to apply 23 suggestions)
Finished dev [unoptimized + debuginfo] target(s) in 5.14s
Running `target/debug/pinepods_firewood`
[src/helpers/requests.rs:134] &config_json = Object {
"api_key": String("e5UUSeBBZsq5zHmkVSROSRxzdrH3H0yMWaVn1ibtK0N8vckS8pkbMclV0sYNrice\n"),
"url": String("https://pinepods.collinpendleton.com"),
}
[2023-12-07T13:30:41Z ERROR pinepods_firewood] Setting up terminal...
[2023-12-07T13:30:41Z ERROR pinepods_firewood] creating app...
[2023-12-07T13:30:41Z ERROR pinepods_firewood] running app...
[2023-12-07T13:30:41Z ERROR pinepods_firewood::app] Fetched podcasts: [PinepodsPodcasts { PodcastID: 1, PodcastName: "Practical AI: Machine Learning, Data Science", ArtworkURL: "https://cdn.changelog.com/uploads/covers/practical-ai-original.png?v=63725770374", Author: "Changelog Media", Categories: "{\"102\": \"Technology\"}", EpisodeCount: 236, FeedURL: "https://changelog.com/practicalai/feed", WebsiteURL: "https://changelog.com/practicalai", Description: "Making artificial intelligence practical, productive, and accessible to everyone. Practical AI is a show in which technology professionals, business people, students, enthusiasts, and expert guests engage in lively discussions about Artificial Intelligence and related topics (Machine Learning, Deep Learning, Neural Networks, GANs, MLOps, AIOps, and more). The focus is on productive implementations and real-world scenarios that are accessible to everyone. If you want to keep up with the latest advances in AI, while keeping one foot in the real world, then this is the show for you!" }, PinepodsPodcasts { PodcastID: 2, PodcastName: "The Changelog: Software Development, Open Source", ArtworkURL: "https://cdn.changelog.com/static/images/podcasts/podcast-original-f16d0363067166f241d080ee2e2d4a28.png", Author: "Changelog Media", Categories: "{\"102\": \"Technology\"}", EpisodeCount: 625, FeedURL: "https://changelog.com/podcast/feed", WebsiteURL: "https://changelog.com/podcast", Description: "Software’s best weekly news brief, deep technical interviews & talk show." }]
[2023-12-07T13:30:56Z ERROR pinepods_firewood] shutdown app...