View Single Post
Old 12-07-2009, 01:14 PM   #20
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
Updates you may want to do to Books By Folder

1) Storing the addons in a different directory
Edit (Internal Mem)/autorun.js. On first line, you can change the root directory of addons to whatever suits you; I use /Data/database/software/addons/:
Code:
this.addonRoot = "/Data/database/software/addons/";
2) Moving autorun.js to a different directory
Use PRS Customizer to prepare your custom reader, then modify file applicationStart.xml as detailed in this post. The sixth line in the modified part tells where the autorun.js file is located. I use /Data/database/software/autorun.js:
Code:
		<function id="initialized">
			USBDispatcher.doRegister(this.getWindow())
			this.getDevice().doProcessed(100);
			this.getDevice().enableBlueLED(true);
			try {
				var path = "/Data/database/software/autorun.js";
				if(FileSystem.getFileInfo(path)) {
					var f = new Stream.File(path);
					try {
						var fn = new Function("target", f.toString(), path, 1);
						fn(this);
					} finally {
						f.close();
					}
				}
			} catch(ignore) {
			}
		</function>
3) Browse all of internal memory by folders
Open (Internal Memory)/addons/_BrowseByFolder.js. Search for /Data/database/media/books and replace it with /Data. There are two instances that need changing:

Line 246:
From:
Code:
	var rootFolder = "/Data/database/media/books/";
to
Code:
	var rootFolder = "/Data/";
Line 339:
From:
Code:
		var node = new FolderNode("/Data/database/media/books", "", "directory", "Internal Memory", NodeKinds.INTERNAL_MEM);
to:
Code:
		var node = new FolderNode("/Data", "", "directory", "Internal Memory", NodeKinds.INTERNAL_MEM);
(Notice that it ends with slash in the first case and doesn't end with slash in the second case.)
pepak is offline   Reply With Quote