Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
LiSiYuan authored and LiSiYuan committed Jul 4, 2017
2 parents 29c628f + be59d87 commit 594d089
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2 deletions.
Binary file modified LSYReader/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file modified LSYReader/LSYReader/.DS_Store
Binary file not shown.
Binary file modified LSYReader/LSYReader/Reader/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions LSYReader/LSYReader/Reader/Core/LSYReadUtilites.m
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ +(NSMutableArray *)parseOPF:(NSString *)opfPath
NSArray* itemRefsArray = [document nodesForXPath:@"//opf:itemref" namespaceMappings:[NSDictionary dictionaryWithObject:@"http://www.idpf.org/2007/opf" forKey:@"opf"] error:nil];
NSMutableArray *chapters = [NSMutableArray array];
for (CXMLElement* element in itemRefsArray){
NSString* chapHref = [itemDictionary valueForKey:[[element attributeForName:@"idref"] stringValue]];
NSString* chapHref = [itemDictionary objectForKey:[[element attributeForName:@"idref"] stringValue]];
// LSYChapterModel *model = [LSYChapterModel chapterWithEpub:[NSString stringWithFormat:@"%@/%@",absolutePath,chapHref] title:[titleDictionary valueForKey:chapHref] imagePath:[opfPath stringByDeletingLastPathComponent]];
LSYChapterModel *model = [LSYChapterModel chapterWithEpub:[NSString stringWithFormat:@"%@/%@",absolutePath,chapHref] title:[titleDictionary valueForKey:chapHref] imagePath:[[[opfPath stringByDeletingLastPathComponent]stringByAppendingPathComponent:chapHref] stringByDeletingLastPathComponent]];
LSYChapterModel *model = [LSYChapterModel chapterWithEpub:[NSString stringWithFormat:@"%@/%@",absolutePath,chapHref] title:[titleDictionary objectForKey:chapHref] imagePath:[[[opfPath stringByDeletingLastPathComponent]stringByAppendingPathComponent:chapHref] stringByDeletingLastPathComponent]];
[chapters addObject:model];

}
Expand Down

0 comments on commit 594d089

Please sign in to comment.