File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ class Audiobookshelf extends \App\SupportedApps implements \App\EnhancedApps
77 public $ config ;
88
99 public function __construct () {
10-
1110 }
1211
1312 public function test ()
@@ -26,7 +25,7 @@ public function livestats()
2625 $ status = 'active ' ;
2726 $ data = [
2827 'totalTime ' => $ this ->secondsToHoursMinutes ($ details ->totalTime ),
29- 'bookCount ' => $ this ->get_book_count ()
28+ 'bookCount ' => $ this ->getBookCount ()
3029 ];
3130 }
3231
@@ -39,20 +38,20 @@ public function url($endpoint)
3938 return $ api_url ;
4039 }
4140
42- private function get_book_count ()
41+ private function getBookCount ()
4342 {
4443 $ res = parent ::execute ($ this ->url ('api/libraries ' ), $ this ->getAttrs ());
4544 $ libraries = json_decode ($ res ->getBody ())->libraries ;
4645
47- $ book_count = 0 ;
46+ $ bookCount = 0 ;
4847 foreach ($ libraries as $ library ) {
4948 $ lib_id = $ library ->id ;
5049 $ res = parent ::execute ($ this ->url ('api/libraries/ ' . $ lib_id . '/items ' ), $ this ->getAttrs ());
5150 $ library_details = json_decode ($ res ->getBody ());
52- $ book_count += $ library_details ->total ;
51+ $ bookCount += $ library_details ->total ;
5352 }
5453
55- return $ book_count ;
54+ return $ bookCount ;
5655 }
5756
5857 private function getAttrs ()
You can’t perform that action at this time.
0 commit comments