|
|
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 Previous Next
|
New Plugin: DVDPFauxAPI |
|
|
|
Author |
Message |
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Yeah, crazy name.
This plugin can be thought of as a suitcase or toolbox that serves as host to a set of other tools that I call subplugins.
The DVDPFauxAPI plugin has no menus or options to set. As a wrapper for the database API (online and local), it merely loads and then searches for subplugins. Any subplugins that are found, are loaded and given access to the internal plugin API. Subplugins do not need to be installed. They are simply compiled C# code that follow the API rules and are compiled with the API Interface code as a resource. As such, subplugin developers do need to be Invelos approved developers with access to the Developer forum and API code. But they do not have to write a full plugin. Compiled subplugin dlls are simply copied into the subplugins folder, which is a sister folder to the plugins folder. If it doesn't exist, it is created by the plugin.
Developers
Any developer that wants to create a subplugin, just contact me via PM or the developer Forum. I can supply a sample subplugin shell.
Users
Watch this Forum for subplugin annoucements. To use them, you need only copy the dll file into the subplugins folder. That's it. To disable the subplugin, simply remove it from the subplugins folder.
Stay tuned. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Subplugin: CommandOnEventThis plugin requires the installation of the DVDPFauxAPI plugin. The function of CommandOnEvent is to allow you to specify a Command File to be run whenever selected internal DVD Profiler events occur. There are 64 defined internal events, such as "DVD Selected". The way you specify which events for which you want command files run is via an xml file loaded into the \Subplugins folder that has been created by the DVDPFauxAPI plugin. The xml file must be named "EventCommands.xml" and have a defined format that is shown below. Each "Event" element of the xml file specifies the event and the associated command file path and command file name. Entries with blank path and file names are skipped, but for faster processing, you may eliminate those elements from the xml file. Only the elements representing your selected events need be included. So, to use CommandOnEvent, you must: - Install DVDPFauxAPI if not already installed - Copy CommandOnEvent.dll into the \Subplugins folder - Copy EventCommands.xml into the \Subplugins folder The sample xml file shown following has an event element defined for all 64 events, however only two are populated with command file information. The sample command file has only one-line that displays the welcome page. Command.txtQuote:
ShowWelcome
EventCommands.xmlQuote:
<?xml version="1.0" encoding="windows-1252"?> <!--Command For Event Actions Table--> <EventCommands> <Event Name="Exception" CommandPath="" CommandFile="" /> <Event Name="PluginUnloading" CommandPath="" CommandFile="" /> <Event Name="CustomMenuClick" CommandPath="" CommandFile="" /> <Event Name="CustomPluginOptions" CommandPath="" CommandFile="" /> <Event Name="ProgramLoaded" CommandPath="C:\Program Files (x86)\DVD Profiler" CommandFile="Command.txt" /> <Event Name="ProgramMinimized" CommandPath="" CommandFile="" /> <Event Name="ProgramRestored" CommandPath="C:\Program Files (x86)\DVD Profiler" CommandFile="Command.txt" /> <Event Name="ProgramGotFocus" CommandPath="" CommandFile="" /> <Event Name="ProgramLostFocus" CommandPath="" CommandFile="" /> <Event Name="ProgramLayoutSaving" CommandPath="" CommandFile="" /> <Event Name="ProgramLayoutLoaded" CommandPath="" CommandFile="" /> <Event Name="FormCreated" CommandPath="" CommandFile="" /> <Event Name="FormDestroyed" CommandPath="" CommandFile="" /> <Event Name="HostWindowClosed" CommandPath="" CommandFile="" /> <Event Name="DVDSelected" CommandPath="" CommandFile="" /> <Event Name="DVDEditStart" CommandPath="" CommandFile="" /> <Event Name="DVDEditSave" CommandPath="" CommandFile="" /> <Event Name="DVDEditSaveNoChanges" CommandPath="" CommandFile="" /> <Event Name="DVDEditCancel" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToOwned" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToOrdered" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToWishList" CommandPath="" CommandFile="" /> <Event Name="DVDImagesChanged" CommandPath="" CommandFile="" /> <Event Name="DVDWatched" CommandPath="" CommandFile="" /> <Event Name="DVDLoaned" CommandPath="" CommandFile="" /> <Event Name="DVDDueDateChanged" CommandPath="" CommandFile="" /> <Event Name="DVDReturned" CommandPath="" CommandFile="" /> <Event Name="DVDHistoryEdited" CommandPath="" CommandFile="" /> <Event Name="DVDTagsChanged" CommandPath="" CommandFile="" /> <Event Name="DVDAdded" CommandPath="" CommandFile="" /> <Event Name="DVDRemoved" CommandPath="" CommandFile="" /> <Event Name="DVDRefreshed" CommandPath="" CommandFile="" /> <Event Name="DVDImagesRefreshed" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom0" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom1" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom2" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom3" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom4" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom5" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom6" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom7" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom8" CommandPath="" CommandFile="" /> <Event Name="DVDMovedToCustom9" CommandPath="" CommandFile="" /> <Event Name="DVDPersonalized" CommandPath="" CommandFile="" /> <Event Name="DVDCastEntrySelected" CommandPath="" CommandFile="" /> <Event Name="DVDCrewEntrySelected" CommandPath="" CommandFile="" /> <Event Name="DVDReviewed" CommandPath="" CommandFile="" /> <Event Name="DVDPersonalizeShown" CommandPath="" CommandFile="" /> <Event Name="DVDPersonalizedAddition" CommandPath="" CommandFile="" /> <Event Name="DVDFlagged" CommandPath="" CommandFile="" /> <Event Name="DVDUnflagged" CommandPath="" CommandFile="" /> <Event Name="BulkFlagOperationStart" CommandPath="" CommandFile="" /> <Event Name="BulkFlagOperationEnd" CommandPath="" CommandFile="" /> <Event Name="SortOrderChanged" CommandPath="" CommandFile="" /> <Event Name="CollectionListChanged" CommandPath="" CommandFile="" /> <Event Name="ThemeChanged" CommandPath="" CommandFile="" /> <Event Name="BackupStarting" CommandPath="" CommandFile="" /> <Event Name="BackupFinished" CommandPath="" CommandFile="" /> <Event Name="BackupCancelled" CommandPath="" CommandFile="" /> <Event Name="RestoreStarting" CommandPath="" CommandFile="" /> <Event Name="RestoreFinished" CommandPath="" CommandFile="" /> <Event Name="RestoreCancelled" CommandPath="" CommandFile="" /> <Event Name="DatabaseOpened" CommandPath="" CommandFile="" /> <Event Name="DatabaseClosed" CommandPath="" CommandFile="" /> </EventCommands> When you need to modify the EventCommands.xml file, simply overwite the old copy, then either restart DVD Profiler, or disable then re-enable the DVDPFauxAPI pluigin. I would appreciate knowing who is using this subplugin and how it is helping you. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: April 4, 2007 | Posts: 888 |
| Posted: | | | | Great idea. Unfortunately the requirement for a dev license API code restricts this to the few guys who are already doing plug-ins I'm afraid. After all, no one is approving dev licenses anymore | | | - Jan |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting hydr0x: Quote: Great idea. Unfortunately the requirement for a dev license API code restricts this to the few guys who are already doing plug-ins I'm afraid. After all, no one is approving dev licenses anymore Good point. I will send Ken an email and request permission to share the API files, and see what happens. Actually, you need only one file. It is access to the forum with all the tips and hints and advice and code samples, etc. that is most helpful. This plugin saves you the bother of building and maintaining the plugin, but there is still a bit of an uphill climb to actually use the API correctly. Of course, you don't need anything special to actually use a subPlugin. Once somebody creates it, you just copy the dll into the subPlugins folder and that's it. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | No answer from Ken. Not surprised, but I was hoping for a miracle. I was one of the first developers, so I actually was asked to sign a Non-Disclosure contract. That shuts me down. But I don't think everybody was asked to do that. Even with the documentation, access to the Forum would still be quite valuable. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | UpgradeBoth DVDPFauxAPI and CommandOnEvent have been upgraded. - It is now possible to launch windows programs and scripts as well as Profiler command files - It is now possible to add selected data from a profile to the arguments passed to a windows program A new attribute has been added to the EventCommands.xml, "Type=Windows" or "Type=Profiler". To add selected data to arguments or file paths, symbol substitution is used. Each symbol is enclosed in {}. For example, to insert the profile id, use {pid}. The avalable data items are: {pid} {localityID} {localityDesc} {datetime} {upc} {xml} <-------------------- doesn't work at the moment {title} {originaltitle} {sorttitle} Here is a sample set of event entries that show how to launch an image, a video and a batch script (.BAT) that creates a running log of events that refresh or edit the DVD: Quote:
Displaying a pictute on an event <Event Name="DVDSelected" Type="windows" CommandPath="c:\users\jimmy\documents\DVD Profiler\ScenePhotos\{pid}\" CommandFile="0.jpg" />
Playing a video file on an event <Event Name="DVDRefreshed" Type="windows" CommandPath="C:\Program Files (x86)\videolan\vlc\" CommandFile="vlc.exe" Args="c:\users\jimmy\videos\temivideo.mp4" />
Logging events that change the profile (using symbol substitution) // Notice the use of outer single quotes, inside the double quotes, to contain text with spaces inside the args // <Event Name="DVDEditSave" Type="Windows" CommandPath="c:\users\jimmy\documents\dvd profiler\" CommandFile="writelog.bat" Args="'{datetime}:::Edited:::{pid}:::{title}'" /> <Event Name="DVDRefreshed" Type="Windows" CommandPath="c:\users\jimmy\documents\dvd profiler\" CommandFile="writelog.bat" Args="'{datetime}:::Refreshed:::{pid}:::{title}'" />
The contents of writelog.bat: Quote:
REM edit this path for your system echo "%~1" >> "C:\Users\Jimmy\Documents\DVD Profiler\dvdrefresh.log"
And the resulting contents of the log file: Quote:
"'4/25/2023 12:40:08 PM:::Refreshed:::4942463602307.17:::v-u-den Ajisai Ai AI Monogatari'" "'4/25/2023 1:12:26 PM:::Refreshed:::4942463602307.17:::v-u-den Ajisai Ai AI Monogatari'" "'4/25/2023 1:14:41 PM:::Edited:::024543373964:::X-Men: The Last Stand'" "'4/25/2023 1:47:56 PM:::Refreshed:::024543373964:::X-Men: The Last Stand'"
| | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 14, 2007 | Reputation: | Posts: 4,693 |
| | Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting GSyren: Quote: I was asked by mediadogg if I could write a graphical user interface for CommandOnEvent, so I did: CommandOnEventGUI 1.0 And I love it! Thanks Gunnar! | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
|
|
Invelos Forums->DVD Profiler: Plugins |
Page:
1 Previous Next
|
|
|
|
|
|
|
|
|