mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
Merge branch 'covers_saving' of github.com:geometer/FBReaderJ into covers_saving
This commit is contained in:
commit
a6b3c181d8
2 changed files with 4 additions and 6 deletions
|
@ -25,7 +25,6 @@ import android.app.Service;
|
|||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.FileObserver;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||
|
||||
|
@ -276,7 +275,7 @@ public class LibraryService extends Service {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean saveCover(String book, String url) throws RemoteException {
|
||||
public boolean saveCover(String book, String url) {
|
||||
return myCollection.saveCover(SerializerUtil.deserializeBook(book), url);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -714,12 +714,11 @@ public class BookCollection extends AbstractBookCollection {
|
|||
if (coverBitmap == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
File myPath = new File(url);
|
||||
myPath.mkdirs();
|
||||
|
||||
OutputStream outStream = null;
|
||||
File file = new File(myPath, book.getId() + ".PNG");
|
||||
File file = new File(url);
|
||||
File parent = file.getParentFile();
|
||||
parent.mkdirs();
|
||||
try {
|
||||
outStream = new FileOutputStream(file);
|
||||
coverBitmap.compress(Bitmap.CompressFormat.PNG, 100, outStream);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue