File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ public function audiobooks_get()
22
22
23
23
$ params ['since ' ] = $ this ->get ('since ' );
24
24
$ params ['extended ' ] = $ this ->get ('extended ' );
25
+ $ params ['coverart ' ] = $ this ->get ('coverart ' );
25
26
//$params['simple'] = $this->get('simple');
26
27
$ params ['genre ' ] = $ this ->get ('genre ' );
27
28
$ params ['title ' ] = $ this ->get ('title ' );
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ function _build_data_set($params)
72
72
//return $params;
73
73
74
74
$ extended = (empty ($ params ['extended ' ])) ? 0 : 1 ;
75
+ $ show_cover_art = (empty ($ params ['coverart ' ])) ? 0 : 1 ;
75
76
76
77
$ limit = (!empty ($ params ['limit ' ])) ? $ params ['limit ' ] : 50 ;
77
78
$ offset = (!empty ($ params ['offset ' ])) ? $ params ['offset ' ] : 0 ;
@@ -164,14 +165,18 @@ function _build_data_set($params)
164
165
// get authors
165
166
$ project ['authors ' ] = $ this ->_get_authors ($ row ['id ' ], 'author ' );
166
167
167
-
168
- if ($ extended )
168
+ if ($ show_cover_art )
169
169
{
170
- $ project ['url_iarchive ' ] = $ row ['url_iarchive ' ];
171
-
172
170
$ project ['coverart_jpg ' ] = !empty ($ row ['coverart_jpg ' ]) ? $ row ['coverart_jpg ' ] : null ;
173
171
$ project ['coverart_pdf ' ] = !empty ($ row ['coverart_pdf ' ]) ? $ row ['coverart_pdf ' ] : null ;
174
172
$ project ['coverart_thumbnail ' ] = !empty ($ row ['coverart_thumbnail ' ]) ? $ row ['coverart_thumbnail ' ] : null ;
173
+ }
174
+
175
+ if ($ extended )
176
+ {
177
+ $ project ['url_iarchive ' ] = $ row ['url_iarchive ' ];
178
+
179
+
175
180
176
181
//get sections
177
182
$ project ['sections ' ] = $ this ->_get_sections ($ row ['id ' ]);
Original file line number Diff line number Diff line change 19
19
<li>title - all matching titles</li>
20
20
<li>genre - all projects of the matching genre</li>
21
21
<li>extended - =1 will return the full set of data about the project</li>
22
+ <li>coverart - =1 will return links to cover art (if available) for each audiobook</li>
22
23
</ul>
23
24
24
25
</p>
135
136
<li>totaltime</li>
136
137
<li>totaltimesecs</li>
137
138
<li>authors</li>
139
+ <li>coverart_jpg</li>
140
+ <li>coverart_pdf</li>
141
+ <li>coverart_thumbnail</li>
138
142
<li>sections</li>
139
143
<li>genres</li>
140
144
<li>translators</li>
141
-
142
145
</ul>
143
146
</p>
144
147
You can’t perform that action at this time.
0 commit comments