Jump to content
Ketarin forum

Ketarin 1.7.0 b2


floele
 Share

Recommended Posts

  • Replies 83
  • Created
  • Last Reply

Top Posters In This Topic

Tried this now.

 

All my FileHippo packages worked fine, except it updated package for Adobe Air, but when I try to install it, it says a more recent version is already installed ...

 

If I run 'check for update' again it shows update available. If I re-update and install, same result.

 

(The Ketarin 1.6.1 RC1 'rapid, dirty fix' posted by kazso in another thread did appear to work correctly though).

Link to comment
Share on other sites

I would change the FileHippo version information regex, because the current one isn't working properly.

At least one space character should be before the version number. Without a space the regex would pick up any number, even if it's part of the application name.

 

My suggestion would be: (?<=<meta property="og:title" content=".+?\s)([\d]+\.|[\d]+\s).*(?=") <- this works with return match.Value

Or: <meta property="og:title" content=".+?\s(([\d]+\.|[\d]+\s).*)" <- this works with return match.Groups[1].Value

 

This would search for a whitespace character after the first character. Then search for one or more numbers followed by a dot.

If it matches, then pick up everything after the dot until it reaches the quatation mark.

If it doesn't match, then search for one or more numbers followed by a whitespace character and pick up everything after the whitespace character until it reaches the quatation mark.

 

Here are 4 examples:

 

Alcohol 120% (http://filehippo.com/download_alcohol_120/tech/): Application name is Alcohol 120%, version is 2.0.2.5830. Original regex version info: 120% 2.0.2.5830 / my regex version info: 2.0.2.5830

Sandra Lite (http://filehippo.com/download_sandra_lite/tech/): Application name is Sandra Lite, version is 2014 (20.10). Original regex version info: 2014 (20.10) / my regex version info: 2014 (20.10)

3DMark03 (http://filehippo.com/download_3dmark03/tech/): Application name is 3DMark03, version is 3.6.0. Original regex version info: 03 3.6.0 / my regex version info: 3.6.0

WinDVD (http://filehippo.com/download_windvd/tech/): Application name is WinDVD, version is 2011 Build 289. Original regex version info: 2011 Build 289 / my regex version info: 2011 Build 289

 

Link to comment
Share on other sites

Beta option should work, if not please post an example.

 

uTorrent doesn't work with the beta option (http://filehippo.com/download_utorrent/).

On the main page all listed versions are only betas. You would only find the non-beta version, if you click on the View More... link and go to the 2nd page of the version history (http://filehippo.com/download_utorrent/history/2/).

Link to comment
Share on other sites

Yeah beta detection will get another fix, but it will be a bit hard to do completely right because all versions are now spread among multiple pages and Ketarin would have to scroll through all the pages. If a non-beta version is not on the first page, Ketarin won't find any suitable version. I think I'm too lazy right now to implement that ;)

Link to comment
Share on other sites

I made some changes to 1.7.0 b2 (revision 461), so the 'avoid beta' option seems to work correctly now :) And it's a bit faster too.

Uploaded the exe, so others could try this modified version as well: http://drivehq.com/file/DFPublishFile.aspx/FileID1727818560/Key4p7jhlgddu56/Ketarin-170b2-u4.zip (i finally managed to compile the code ;) )

 

And here are the source code changes for revision 461: http://drivehq.com/file/DFPublishFile.aspx/FileID1727818561/Keye1k17ia3fwgj/ketarin-rev461-changes1.zip

I modified 2 files: ExternalServices.cs and Updater.cs

 

ExternalServices.cs:

  1. Added the nonbetapages string array (private static string[] nonbetapages;). We use this to store the already found non-beta page Urls.
  2. Changed the FileHippoGetAllVersions method. First we detect the number of version history pages (regex class="pager-page-link">(?!.*class="pager-page-link">)(\d+)</a> ). Then start downloading these pages until we find a non-beta version. When it's found, then stop downloading the version history pages, add the non-beta URL to the nonbetapages array and also return the non-beta URL. If we don't find a non-beta version (a program or driver could have only beta versions), then return all URLs.
  3. Changed the GetNonBetaPageContent method. Before the FileHippoGetAllVersions call we check if a non-beta page URL already exists in the array. If it's found, then skip FileHippoGetAllVersions to speed up the non-beta version handling.
  4. Created the method ClearNonBetaPages (public static void ClearNonBetaPages()). This clears the nonbetapages array.

Updater.cs:

  1. Call ClearNonBetaPages at the start of UpdateApplications. This will clear the nonbetapages array when we start the applications update.

Edit: Changed the place of the ExternalServices.ClearNonBetaPageUrl(); call in Updater.cs.

Edit 2: Scrapped the whole nonbetapageurl static variable.

Edit 3: Added the nonbetapages array to speed up the non-beta version handling.

Link to comment
Share on other sites

 

I made some changes to 1.7.0 b2 (revision 460), so the 'avoid beta' option seems to work correctly now :) And it's a bit faster too.

Uploaded the exe, so others could try this modified version as well: http://www.drivehq.com/file/DFPublishFile.aspx/FileID1720826603/Key4sytdgj0rrvj/Ketarin-170b2-u1.zip (i finally managed to compile the code ;) )

 

And here are the source code changes for revision 460: http://www.drivehq.com/file/DFPublishFile.aspx/FileID1720824913/Keyuqxucekptrx4/ketarin-rev460-changes.zip

I modified 2 files: Updater.cs and ExternalServices.cs

 

ExternalServices.cs:

  1. Added a new global variable called nonbetapageurl (private static string nonbetapageurl = string.Empty;). This was needed to speed up the non-beta detection process.
  2. Added the method ClearNonBetaPageUrl, that clears the nonbetapageurl variable (called from Updater.cs).
  3. Changed the GetNonBetaPageContent method to speed up the non-beta detection process (skip FileHippoGetAllVersions, if we already have the URL for the non-beta version).
  4. Changed the FileHippoGetAllVersions method (this part has the most changes). First we detect the number of version history pages (regex class="pager-page-link">(?!.*class="pager-page-link">)(\d+)</a> ). Then start downloading these pages until we find a non-beta version. When it's found, then update the nonbetapageurl variable and stop downloading the version history pages. If we don't find a non-beta version (a program or driver could have only beta versions), then Ketarin will download the latest beta version.

Updater.cs:

  1. Added a new method call ExternalServices.ClearNonBetaPageUrl(); after LogDialog.Log("Update finished");. This would clear the nonbetapageurl variable after an application update.

 

 

7-Zip x64 FileHippo ID '7-zip_64' does not exist.
7-Zip x86 FileHippo ID '7zip_32' does not exist.
CDex FileHippo ID 'cdex' does not exist.
LibreOffice FileHippo ID 'libreoffice' does not exist.
uTorrent FileHippo ID 'utorrent' does not exist.

 

I have this problems with the new exe. These are just my errors? Others feedback?

 

Thx a lot kazso for your effort

Link to comment
Share on other sites

Could you possibly also make this without a static variable? I'm pretty sure this can mess up because Ketarin uses multiple threads for downloading.

 

You are right. The static variable doesn't work, so i scrapped the whole nonbetapageurl static variable for now. To make GetNonBetaPageContent still faster, the FileHippoGetAllVersions method returns only 1 url, which is the non-beta url (if it's found ofcourse, otherwise returns all urls).

I reverted all changes except for the FileHippoGetAllVersions method, so only ExternalServices.cs has changed after private static string[] FileHippoGetAllVersions(string pageContent, string fileId).

I will update the download links in my previous post.

Link to comment
Share on other sites

Rewrote the non-beta page URL storage. Now i added a onedimensional static string array.

Ketarin fills up this array with fileId & non-beta page URL pairs (using fileId as the identifier) and expands it everytime a new pair has been added.

 

The array will fill up like this:

"7-zip_64","http://filehippo.com/download_7-zip_64/8755/","7zip_32","http://filehippo.com/download_7zip_32/8754/"
    |                           |                             |                           |
nonbetapages[0]          nonbetapages[1]               nonbetapages[2]             nonbetapages[3]

Before the application update Ketarin clears this array, so it could detect the version changes properly.

 

I added more explanation and the new download links to my original post.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.