support for folder indexing

Asked by hackbob

Hi, It's planned to add support to indexing of single folders?
User Case: I've a NAS that I want to index, but I have a mount share on my pc (ubuntu), so it's possible to index it only if folder are supported.

Regards,
hackbob

P.S. Mind if i take a look @ your code to understand if this modification is possible?

Question information

Language:
English Edit question
Status:
Answered
For:
Basenji Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Patrick Ulbrich (pulb) said :
#1

Basenji's current design permits indexing of devicenodes (i.e. devices found in /dev) only.
This design does not only allow querying of detailed device information like drivetype and volumename,
it also allows indexing of every possible devicetype, be it a filesystem,
memory or a raw audio cd. Unfortunately, I have neither plans nor time to change this design in the near future,
but hacking the source to allow for non-device indexing should be pretty easy.

If you'd like to see an official release with folder indexing support,
please open a new bugreport which I might process sometime (and other users with the same request can subscibe to).

If you don't want to wait that long and if you're interested in hacking the sourcecode the dirty way for yourself,
please let me know and I'll give you some pointers :-)

Revision history for this message
hackbob (maurosolcia) said :
#2

Thx patrick, for the answer.
I had some spare time yesterday so I've made some dirty mod to try if it's working and all seems fine.

I hope to have some time today evening to make it working with a cleaner code.

Revision history for this message
Patrick Ulbrich (pulb) said :
#3

nice to see you got it working :-)

Revision history for this message
Patrick Ulbrich (pulb) said :
#4

hmm.. I've got a question: does Nautilus show your NAS volume in "places" or if you click on "computer"?
If this is the case, it is very likely that migrating Platform.Common.IO.DriveInfo to GIO# will also include NAS volumes in Basenjis drive listing.

Revision history for this message
hackbob (maurosolcia) said :
#5

sorry for the late response (your last notification was not sent to my email); unfortunatelly Nautilus doesn't show my NAS anywhere.
My intention is to make different DBs for topics (Ex. one for the Films, one for the TV shows) and add in each db only the DVD/CD, NAS folders related to the topic.

However, I've finally completed the hacks on the source codes (I call them hack because are not well structured changes); but I've marked the changed lines using a comment starting with MSO (that it's an abbreviation of my name).

If you are interested I can email you the code and you can decide if add it or not to the main code.

Let me know and thanks for the great app.

P.S. I've noticed some errors with the libextract under linux when scanning the NAS, but the error msg was ... empty... well no big deal, and a problem not associated with the program but with the libs; maybe the Ubuntu 9.10 version is bugged.

Regards,
hackbob

Revision history for this message
Patrick Ulbrich (pulb) said :
#6

Too bad nautilus doesn't show your NAS. At least the test FTP server i added via "Places" -> "Connect to server" pops up in nautilus. Maybe your NAS can be added that way as well?

A bunch of scanning errors have been fixed in trunk lately, you can check out the latest revision using "bzr branch lp:basenji/trunk" and reapply your patches if you want. Moreover you can head over to https://code.launchpad.net/basenji, register a new branch and upload your modified branch via "bzr push sftp://<email address hidden>/hackbob/basenji/<branch_name>" (you must call "bzr whoami <email_address>" first). That way I can easily browse your changes, others can check out your work and most importantly, you can "bzr merge" code that has been changed in basenji/trunk since your last check out.

In case you expect a scanning failure again: if you run basenji from a terminal, you'll get a detailed error description (i'd be very interested in :-)).

Revision history for this message
hackbob (maurosolcia) said :
#7

Hi Partick,
I had some pain pushing the branch but now it's online (it's my first time)... maybe there are some file that are not strictly needed (like the bin folder...), I hope to have time in this WE and remove them.

Revision history for this message
hackbob (maurosolcia) said :
#8

Thanks Patrick Ulbrich, that solved my question.

Revision history for this message
Patrick Ulbrich (pulb) said :
#9

Hi, many thanks for your efforts!
Unfortunately, you seem to have uploaded the source availabe from the download section. This source does not ship with a .bzr directory und thus has no version history (if you compare https://code.launchpad.net/~pulb/basenji/trunk with https://code.launchpad.net/~maurosolcia/basenji/folder you can see that your branch starts at 1 while mine is at 244 already).
To fix that problem you can "bzr pull" https://code.launchpad.net/~pulb/basenji/trunk in a fresh directory, reapply your patches, "bzr commit -m <changes>" and "bzr push" to https://code.launchpad.net/~maurosolcia/basenji/folder (better delete that branch before).

After that you can simply use "bzr push" to push further changes and "bzr merge" to merge changes from my branch.

Revision history for this message
hackbob (maurosolcia) said :
#10

arg... you are damn right, I've compared the trunk and my local copy, but after that I've applied the changes on the local copy and not to the trunk.
I'll fix it up asap; now dinner time in Italy.
I'll let you know as soon as I've fixed it.

Sorry about the mis-pushing

Revision history for this message
Patrick Ulbrich (pulb) said :
#11

No problem :-)

I just played around with GIO.
I can confirm now that Basenji can be extended in a pretty clean way to support (network) folders added through "Places" -> "Connect to server". The only change needed is to extend Platform.Common.Driveinfo to respect GIO folder mounts as well.

Are you sure you're NAS can't be added that way?

Revision history for this message
hackbob (maurosolcia) said :
#12

seems that my NAS have some kind of strange problem with the mounting in linux (i think the samba sevice it's not fully recognized by ubuntu, on win works correctly); today i've tried my sister's NAS and seems to be recognized and fully mounted in ubuntu; besides that, I mainly make partial volume indexing (Ex. one vdb with all the films, so there are many CD, dvd and 3 folder on the NAS) and I send only the needed information to my pals (I don't like to show them my backups and software lists... I send the film list to my boss to and it's not good to show him that I've some of it's code @ home ;-) ).

I'm having some problems merging my changes on the latest version due to some strange errors (the main dev with the SO is recognized as not ready), I'm debugging it to see if it' one of my changes or moment of dementia of my hardware.

I hope to have uploaded the new branch by tonight.

See ya.

Revision history for this message
Patrick Ulbrich (pulb) said :
#13

Ok, good luck :-)
I've also uploaded a experimental brach that adds support for network folders added via "places" -> "connect to server".
You can try it out and pull it from here: lp:~pulb/basenji/gio-mounts.

Revision history for this message
hackbob (maurosolcia) said :
#14

Ok I've solved my problems with the code (all the strange things were made by my code).
I hate the damn merger of bazar-explorer!!!
I've made a new version with the cleaned working code.
Give it a try when you have some spare time.

Revision history for this message
Patrick Ulbrich (pulb) said :
#15

I had a quick look at your mod and it seems to work just fine.
I also made an announcement on the projects main page.

Tnaks again for your work!

Can you help with this problem?

Provide an answer of your own, or ask hackbob for more information if necessary.

To post a message you must log in.