Hi

Yup, I had heard there was some need for it so I thought I'd try and
contribute. The theory behind me doing this was to test whether the
iTunes library had been modified and only rescan it if it had been
modified. Do you think there's a better way using the Quicksilver
catalog date?

JP

On Jun 11, 1:45 pm, Henning Jungkurth <[email protected]>
wrote:
> Hi,
>
> trying to rewrite the iTunes Plugin? :-)
>
> What you're doing seems fine. I just don't understand why you are
> trying to do that. Quicksilver saves the date it updated a catalog
> entry by itself. For what do you need the modification date in your
> quicksilver object?
>
>
>
>
>
>
>
> On Sat, Jun 11, 2011 at 6:56 PM, jp63 <[email protected]> wrote:
> > Hi
>
> > I'm writing my first quicksilver plugin and I was wondering if the
> > following is acceptable:
>
> > // iTunesModuleSource.m
>
> > - (NSArray *) objectsForEntry:(NSDictionary *)theEntry{
> >    ....
> >    // Get last modified date of iTunes library.
> >    NSError *err = nil;
> >    NSDictionary *xmlAttributes = [[ NSFileManager defaultManager ]
> > attributesOfItemAtPath:location error:&err ];
> >    if ( err) {
> >        [ theEntry setValue:@"Error retrieving last modified date of
> > iTunes library." forKey:NSFileModificationDate ];// Can i do this???
> >    }
> >    else {
> >        [ theEntry setValue:[ xmlAttributes
> > objectForKey:NSFileModificationDate ]
> > forKey:NSFileModificationDate ];// Can i do this???
> >    }
> > }
>
> > Is it okay for me to add a value to theEntry for the key
> > NSFileModificationDate? In indexIsValidFromDate:forEntry:, I test to
> > see if the iTunes library has been modified since the last time it's
> > been read.
>
> > Thanks ahead of time!

Reply via email to