mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 09:49:19 +02:00
sync with premium version
This commit is contained in:
parent
3406bc5e8f
commit
b995c9dd3c
5 changed files with 25 additions and 10 deletions
|
@ -36,7 +36,6 @@ import org.geometerplus.zlibrary.ui.android.image.ZLBitmapImage;
|
||||||
import org.geometerplus.fbreader.formats.ExternalFormatPlugin;
|
import org.geometerplus.fbreader.formats.ExternalFormatPlugin;
|
||||||
import org.geometerplus.fbreader.formats.PluginImage;
|
import org.geometerplus.fbreader.formats.PluginImage;
|
||||||
import org.geometerplus.android.fbreader.api.FBReaderIntents;
|
import org.geometerplus.android.fbreader.api.FBReaderIntents;
|
||||||
import org.geometerplus.android.fbreader.formatPlugin.PluginUtil;
|
|
||||||
import org.geometerplus.android.fbreader.formatPlugin.CoverReader;
|
import org.geometerplus.android.fbreader.formatPlugin.CoverReader;
|
||||||
|
|
||||||
public class AndroidImageSynchronizer implements ZLImageProxy.Synchronizer {
|
public class AndroidImageSynchronizer implements ZLImageProxy.Synchronizer {
|
||||||
|
@ -135,7 +134,8 @@ public class AndroidImageSynchronizer implements ZLImageProxy.Synchronizer {
|
||||||
connection = new Connection(plugin);
|
connection = new Connection(plugin);
|
||||||
myConnections.put(plugin, connection);
|
myConnections.put(plugin, connection);
|
||||||
myContext.bindService(
|
myContext.bindService(
|
||||||
PluginUtil.createIntent(plugin, FBReaderIntents.Action.PLUGIN_CONNECT_COVER_SERVICE),
|
new Intent(FBReaderIntents.Action.PLUGIN_CONNECT_COVER_SERVICE)
|
||||||
|
.setPackage(plugin.packageName()),
|
||||||
connection,
|
connection,
|
||||||
Context.BIND_AUTO_CREATE
|
Context.BIND_AUTO_CREATE
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,6 +22,7 @@ package org.geometerplus.fbreader.formats;
|
||||||
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.book.AbstractBook;
|
import org.geometerplus.fbreader.book.AbstractBook;
|
||||||
|
import org.geometerplus.fbreader.book.BookUtil;
|
||||||
|
|
||||||
public class ComicBookPlugin extends ExternalFormatPlugin {
|
public class ComicBookPlugin extends ExternalFormatPlugin {
|
||||||
public ComicBookPlugin(SystemInfo systemInfo) {
|
public ComicBookPlugin(SystemInfo systemInfo) {
|
||||||
|
@ -37,4 +38,11 @@ public class ComicBookPlugin extends ExternalFormatPlugin {
|
||||||
public void readMetainfo(AbstractBook book) {
|
public void readMetainfo(AbstractBook book) {
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readUids(AbstractBook book) {
|
||||||
|
if (book.uids().isEmpty()) {
|
||||||
|
book.addUid(BookUtil.createUid(book, "SHA-256"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ package org.geometerplus.fbreader.formats;
|
||||||
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.book.AbstractBook;
|
import org.geometerplus.fbreader.book.AbstractBook;
|
||||||
|
import org.geometerplus.fbreader.book.BookUtil;
|
||||||
|
|
||||||
public class DjVuPlugin extends ExternalFormatPlugin {
|
public class DjVuPlugin extends ExternalFormatPlugin {
|
||||||
public DjVuPlugin(SystemInfo systemInfo) {
|
public DjVuPlugin(SystemInfo systemInfo) {
|
||||||
|
@ -37,4 +38,11 @@ public class DjVuPlugin extends ExternalFormatPlugin {
|
||||||
public void readMetainfo(AbstractBook book) {
|
public void readMetainfo(AbstractBook book) {
|
||||||
// TODO: implement
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readUids(AbstractBook book) {
|
||||||
|
if (book.uids().isEmpty()) {
|
||||||
|
book.addUid(BookUtil.createUid(book, "SHA-256"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ import org.geometerplus.zlibrary.core.filesystem.ZLFile;
|
||||||
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
import org.geometerplus.zlibrary.core.util.SystemInfo;
|
||||||
|
|
||||||
import org.geometerplus.fbreader.book.AbstractBook;
|
import org.geometerplus.fbreader.book.AbstractBook;
|
||||||
import org.geometerplus.fbreader.book.BookUtil;
|
|
||||||
|
|
||||||
public abstract class ExternalFormatPlugin extends FormatPlugin {
|
public abstract class ExternalFormatPlugin extends FormatPlugin {
|
||||||
protected ExternalFormatPlugin(SystemInfo systemInfo, String fileType) {
|
protected ExternalFormatPlugin(SystemInfo systemInfo, String fileType) {
|
||||||
|
@ -57,13 +56,6 @@ public abstract class ExternalFormatPlugin extends FormatPlugin {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void readUids(AbstractBook book) {
|
|
||||||
if (book.uids().isEmpty()) {
|
|
||||||
book.addUid(BookUtil.createUid(book, "SHA-256"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ExternalFormatPlugin [" + supportedFileType() + "]";
|
return "ExternalFormatPlugin [" + supportedFileType() + "]";
|
||||||
|
|
|
@ -58,4 +58,11 @@ public class PDFPlugin extends ExternalFormatPlugin {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readUids(AbstractBook book) {
|
||||||
|
if (book.uids().isEmpty()) {
|
||||||
|
book.addUid(BookUtil.createUid(book, "SHA-256"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue