API oddities

Comments about LibriVox? Suggestions to improve things? News?
Post Reply
tbook
Posts: 77
Joined: May 12th, 2012, 7:01 am

Post by tbook »

I was trying to figure out why I couldn't find images in the RSS feeds for some books that had them. I found this oddity to be true. If I used the search API, (http://librivox.org/newcatalog/search_xml.php?extended=1&simple=Austen) I am given an RSS url like: http://librivox.org/bookfeeds/after-london-or-wild-england-by-richard-jefferies.xml. However, if I use the catalog API (http://librivox.org/newcatalog/latestworks.xml?offset=0&limit=50), I receive an RSS url like: http://librivox.org/rss/3272. Strangely, the two RSS urls (for the same book) are not the same. Most notably, the second one contains the proper album cover, while the first one does not. Should I assume that the urls with the numbers are always more up to date, or is there any other difference as to which one I use? Thanks for the help!
Working on iOS and Android apps for LibriVox. You can see the comments from the apps on our web site: LibriVox Audio Books
annise
LibriVox Admin Team
Posts: 38670
Joined: April 3rd, 2008, 3:55 am
Location: Melbourne,Australia

Post by annise »

I don't really know - but I do know the art is almost always not done at the time the book is first catalogued and an RSS feed produced - so it is quite possible that the first is produced at catalogue time and the other is current. What happens if you try the second one on one in the catalogue that does not have cover art ?

Anne
tbook
Posts: 77
Joined: May 12th, 2012, 7:01 am

Post by tbook »

If there is no cover art, both of them point to a generic image: http://librivox.org/librivox_logo.jpg. I've also noticed that for some books there seems to be only one file - the one with the numbers. Also, for a lot of books, there is a cover image that shows up on the web site, but no image in either RSS feed. (for example: http://librivox.org/32-caliber-by-donald-mcgibney/) I don't have a good way to get the URL for those images programatically, so I am just displaying the default image in my app. Thanks!
Working on iOS and Android apps for LibriVox. You can see the comments from the apps on our web site: LibriVox Audio Books
tbook
Posts: 77
Joined: May 12th, 2012, 7:01 am

Post by tbook »

I noticed that the same thing is true for the chapter titles. Sometimes one file will give proper chapter titles, and the other just gives a title based on the file name. I am experimenting with going exclusively to the number based RSS urls, as they seem to be better, but I need to do some testing to make sure that they work for every book.
Working on iOS and Android apps for LibriVox. You can see the comments from the apps on our web site: LibriVox Audio Books
tbook
Posts: 77
Joined: May 12th, 2012, 7:01 am

Post by tbook »

More frustration. It turns out that some of the numbered URLs don't include the chapter data. For example:

Short Poetry Collection 80
http://librivox.org/bookfeeds/short-poetry-collection-080.xml - Has chapters
http://librivox.org/rss/3217 - Includes no chapters
Working on iOS and Android apps for LibriVox. You can see the comments from the apps on our web site: LibriVox Audio Books
gypsygirl
Posts: 8618
Joined: June 12th, 2006, 6:00 pm
Location: British expat in Waco, TX
Contact:

Post by gypsygirl »

I believe the number based urls are a more recent version of the rss creation script, that the title based ones exist only for older projects (if I remember correctly).
Karen S.
tbook
Posts: 77
Joined: May 12th, 2012, 7:01 am

Post by tbook »

That would make sense. It seems that every book has a number based one, but some don't have a title based one. Still, it's too bad that a lot of the number based ones don't have any info on the chapters.
Working on iOS and Android apps for LibriVox. You can see the comments from the apps on our web site: LibriVox Audio Books
Post Reply