Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Plugins Page: 1 2  Previous   Next
Plugin: Enhanced Titles
Author Message
DVD Profiler Unlimited RegistrantStar Contributorhydr0x
Registered: April 4, 2007
Germany Posts: 888
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quote:

There are a few events to which you can register your plugin to, but that's never been my area of expertise.


Thanks for the API. I did in fact register for the plug-in forum, so far the account hasn't been activated. I wasn't even thinking about listening to events for filling these fields, but rather of a manual action that needs to be called by the user. E.g. "Update Invelos titles". Would be good enough for me I guess, especially if that was possible for flagged titles.

At first glance, it looks like it should be possible for your search to use one of these functions and only search within the returned IDs or maybe extend the existing filter set:

ICollectionFilter GetCollectionFilter();
object GetFilteredProfileIDs(ICollectionFilter CollectionFilter);
object GetDisplayedProfileIDs(int SortOrder);

Quote:

Yes you can. You need my plugin-API-key and the names of the fields, both are publicly available.


Great, then I will check if that's an option
- Jan
 Last edited: by hydr0x
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting hydr0x:
Quote:
Quote:

There are a few events to which you can register your plugin to, but that's never been my area of expertise.


Thanks for the API. I did in fact register for the plug-in forum, so far the account hasn't been activated. I wasn't even thinking about listening to events for filling these fields, but rather of a manual action that needs to be called by the user. E.g. "Update Invelos titles". Would be good enough for me I guess, especially if that was possible for flagged titles.

At first glance, it looks like it should be possible for your search to use one of these functions and only search within the returned IDs or maybe extend the existing filter set:

ICollectionFilter GetCollectionFilter();
object GetFilteredProfileIDs(ICollectionFilter CollectionFilter);
object GetDisplayedProfileIDs(int SortOrder);

Quote:

Yes you can. You need my plugin-API-key and the names of the fields, both are publicly available.


Great, then I will check if that's an option

But wouldn't he already be using those? And you still don't know how many you will get from the search - which is what he said he couldn't control. Again, if you are willing to suffer an occasional caching of XML for the collection, or subset, then you can use Xpath to get fast search results at any level of detail you desire. Or manually build your own filter (XML) file then use the API to load the filter set. That is also very fast.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantStar Contributorhydr0x
Registered: April 4, 2007
Germany Posts: 888
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:

But wouldn't he already be using those?


Not from what I'm seeing from a user perspective. It doesn't matter if the current filtering (through other filters and/or the collection tab) filters only 1 profile or all 12000 of them, the time it takes the plug-in to respond to a character typed into the search field is always the same.
- Jan
DVD Profiler Desktop and Mobile RegistrantStar ContributorDJ Doena
Registered: May 1, 2002
Registered: March 14, 2007
Reputation: Highest Rating
Germany Posts: 6,745
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:

But wouldn't he already be using those?


Nah, I'm just implementing the interface method

Quote:

public interface IDVDProfilerDataAwarePlugin
{
        // Called for each potential match when filtering. Return true to match
        // For use with SetCustomFieldFilterableA
        // ComparisonTypeIndex: the selected index into ComparisonTypes
        // ComparisonValue: the selected index into MatchItemList, or the user-entered value if no list
        // TestDVD: Shell profile record (Profile ID and access to custom fields only)
        // If more data is required from the profile, need to use DVDByProfileID or similar
        bool FilterFieldMatch(string FieldFilterToken, int ComparisonTypeIndex, object ComparisonValue, IDVDInfo TestDVD);
}
Karsten
DVD Collectors Online

DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting hydr0x:
Quote:
Quoting mediadogg:
Quote:

But wouldn't he already be using those?


Not from what I'm seeing from a user perspective. It doesn't matter if the current filtering (through other filters and/or the collection tab) filters only 1 profile or all 12000 of them, the time it takes the plug-in to respond to a character typed into the search field is always the same.

Aha, then that is definitely a design issue that only DJ can solve, or you with your own code. Point well taken.

Edit: Now I see his code. That is part of the API that Ken implemented for custom fields, so that you could use the existing DVDP GUI for filtering on those fields. Now you definitely will not have any internal filtering on custom fields. The collection filter is so limited, that it doesn't even handle all the original built-in fields. My other two suggestions still stand, or you can build your own GUI filtering panel.

For a real dirty example, see the BulkEdit Alt F9 QuickSearch. You have the option of refreshing XML in-between searches or not. There are a couple of special fields that were not searchable at the time I built it, maybe they are now. And there is "AllForOne," which blindly searches the inner text of every profile for the specified string. The search is initiated when you hit "enter" in the text search box.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantStar Contributorhydr0x
Registered: April 4, 2007
Germany Posts: 888
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Ok, I see. Pretty silly that the API does call this for every title and not only the ones already filtered

Anyways, I'll wait for my access to the subforum, maybe there's some way to solve this. At worst, I'll try the "copy existing title fields into plug-in and filter on that" approach.
- Jan
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting hydr0x:
Quote:
Ok, I see. Pretty silly that the API does call this for every title and not only the ones already filtered

Anyways, I'll wait for my access to the subforum, maybe there's some way to solve this. At worst, I'll try the "copy existing title fields into plug-in and filter on that" approach.

You already got from DJ just about all you would get from the developer forum, namely the API file (enhanced with additional comments and organization by DJ). Only other things are the historical threads with lots of bugs, hints, tips, etc., and of course collaboration with other developers - which you got right here.

So, my friend, there ain't no silver bullets in there ... what we been trying to tell you. 

Trust me, two guys who have written tons of code on that API would not hide anything from you, if there were an obvious solution to your issue.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting hydr0x:
Quote:
Ok, I see. Pretty silly that the API does call this for every title and not only the ones already filtered

Anyways, I'll wait for my access to the subforum, maybe there's some way to solve this. At worst, I'll try the "copy existing title fields into plug-in and filter on that" approach.

Think about where it is in the chain. If it did what you said, then filters would not work the way you expect. They would become cumulative in their effect (essentially performing an "AND" between each filter operation). Eventually your collection panel could go blank. To see what I mean, go to the Filters panel and do some queries. Each query assumes that the entire collection is available to be searched.

One solution, as you proposed is to write your own GUI, so that the search string is not entered character by character, but as a completed string. As I have suggested a couple of times now, you can simulate that by dynamically creating your own filter file (XML format), and then using the API to run the filter. Then you will have the entire string already formatted. But I don't remember whether custom fields work in filter files. It would be very simple and easy to test, and a simple coding task to implement it. I would be happy to send you a sample code snippet, if you want or need it.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Ok, I messed around with it, using my SideCar to create a custom title field. And of course it shows up in the Plugins section of the Filters panel, and the filtering works - it calls that API function that DJ showed you. However, unfortunately the saving of a filter set that includes the custom field is not supported. Bummer.

Another thing that came to mind while testing is that you could possibly use copy / paste (or Ctrl-C / Ctrl-V) to blast past the GUI updates from typing into the search box. I think it works. So, instead of typing character by character, somehow copy your search string into the clipboard, then paste it into the search box. What happens for you? I perceived it to be faster.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
DVD Profiler Unlimited RegistrantStar Contributorhydr0x
Registered: April 4, 2007
Germany Posts: 888
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting mediadogg:
Quote:

Another thing that came to mind while testing is that you could possibly use copy / paste (or Ctrl-C / Ctrl-V) to blast past the GUI updates from typing into the search box. I think it works. So, instead of typing character by character, somehow copy your search string into the clipboard, then paste it into the search box. What happens for you? I perceived it to be faster.


Yes, that should be a workaround to avoid the multiplied effect of the delay during typing. Unfortunately, even a single search takes about 30 seconds on my machine due to the total amount of profiles, so I will still look into workarounds ... if I ever get access to the forum
- Jan
DVD Profiler Desktop and Mobile Registrantmediadogg
Aim high. Ride the wind.
Registered: March 18, 2007
Reputation: Highest Rating
United States Posts: 6,463
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
Quoting hydr0x:
Quote:
Quoting mediadogg:
Quote:

Another thing that came to mind while testing is that you could possibly use copy / paste (or Ctrl-C / Ctrl-V) to blast past the GUI updates from typing into the search box. I think it works. So, instead of typing character by character, somehow copy your search string into the clipboard, then paste it into the search box. What happens for you? I perceived it to be faster.


Yes, that should be a workaround to avoid the multiplied effect of the delay during typing. Unfortunately, even a single search takes about 30 seconds on my machine due to the total amount of profiles, so I will still look into workarounds ... if I ever get access to the forum

As I said before, you don't need access to the forum to write and test your code, now that you have the API file. Just look at the code for one of DJ's published plugins. Biggest thing you might miss is the fact that you need to establish your own GUID, or you will cause a conflict with another plugin. You seem experienced enough to be able to figure most of the rest. Just ask if you want to fast path something. I don't mind even sharing a code snippet. I have used just about every API feature, or at least one instance of a set of like features. You wouldn't be able to publish your plugin on the official page, but that's about the only logistical restriction.
Thanks for your support.
Free Plugins available here.
Advanced plugins available here.
Hey, new product!!! BDPFrog.
 Last edited: by mediadogg
    Invelos Forums->DVD Profiler: Plugins Page: 1 2  Previous   Next