Homebrew [Release] arc13's freeShop fork - open source eShop alternative

What should I do with storage bars ?


  • Total voters
    138
  • Poll closed .
Status
Not open for further replies.

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,959
Country
United States
Oot qustion, does the filter system / algorithm in the searchbox has a specific name?
The only thing I found is the "fuzzysearch.inl, in the "src" folder, so this should be the name of it.

Code:
bool fuzzy_match(char const * pattern, char const * str)
{
    while (*pattern != '\0' && *str != '\0')  {
        if (tolower(*pattern) == tolower(*str))
            ++pattern;
        ++str;
    }

    return *pattern == '\0' ? true : false;
}

bool fuzzy_match(char const * pattern, char const * str, int & outScore)
{
    // Score consts
    const int adjacency_bonus = 5;              // bonus for adjacent matches
    const int separator_bonus = 10;             // bonus if match occurs after a separator
    const int camel_bonus = 10;                 // bonus if match is uppercase and prev is lower

    const int leading_letter_penalty = -3;      // penalty applied for every letter in str before the first match
    const int max_leading_letter_penalty = -9;  // maximum penalty for leading letters
    const int unmatched_letter_penalty = -1;    // penalty for every letter that doesn't matter


    // Loop variables
    int score = 0;
    char const * patternIter = pattern;
    char const * strIter = str;
    bool prevMatched = false;
    bool prevLower = false;
    bool prevSeparator = true;                  // true so if first letter match gets separator bonus

    // Use "best" matched letter if multiple string letters match the pattern
    char const * bestLetter = NULL;
    int bestLetterScore = 0;

    // Loop over strings
    while (*strIter != '\0')
    {
        const char patternLetter = *patternIter;
        const char strLetter = *strIter;

        bool nextMatch = *patternIter != '\0' && tolower(patternLetter) == tolower(strLetter);
        bool rematch = bestLetter && tolower(*bestLetter) == tolower(strLetter);

        bool advanced = nextMatch && bestLetter;
        bool patternRepeat = bestLetter && patternIter != '\0' && tolower(*bestLetter) == tolower(patternLetter);

        if (advanced || patternRepeat)
        {
            score += bestLetterScore;
            bestLetter = NULL;
            bestLetterScore = 0;
        }

        if (nextMatch || rematch)
        {
            int newScore = 0;

            // Apply penalty for each letter before the first pattern match
            if (patternIter == pattern)
            {
                int count = int(strIter - str);
                int penalty = std::max(leading_letter_penalty * count, max_leading_letter_penalty);
                score += penalty;
            }

            // Apply bonus for consecutive bonuses
            if (prevMatched)
                newScore += adjacency_bonus;

            // Apply bonus for matches after a separator
            if (prevSeparator)
                newScore += separator_bonus;

            // Apply bonus across camel case boundaries
            if (prevLower && isupper(strLetter))
                newScore += camel_bonus;

            // Update pattern iter IFF the next pattern letter was matched
            if (nextMatch)
                ++patternIter;

            // Update best letter in str which may be for a "next" letter or a rematch
            if (newScore >= bestLetterScore)
            {
                // Apply penalty for now skipped letter
                if (bestLetter != NULL)
                    score += unmatched_letter_penalty;

                bestLetter = strIter;
                bestLetterScore = newScore;
            }

            prevMatched = true;
        }
        else
        {
            score += unmatched_letter_penalty;
            prevMatched = false;
        }

        // Separators should be more easily defined
        prevLower = islower(strLetter) != 0;
        prevSeparator = strLetter == '_' || strLetter == ' ';

        ++strIter;
    }

    // Apply score for last match
    if (bestLetter)
        score += bestLetterScore;

    // Did not match full pattern
    if (*patternIter != '\0')
        return false;

    outScore = score;
    return true;
}
 
Last edited by Traiver,
  • Like
Reactions: DarkIrata

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
  • Like
Reactions: DarkIrata

DarkDante

Well-Known Member
Member
Joined
Jan 24, 2015
Messages
359
Trophies
0
Age
29
Location
DarkLand
XP
415
Country
Japan
Are you going to clear bugs on the .3dsx file? I think is a better option to use.

The CIA is easy to use but is a suicide to our online gaming lol
 
Last edited by DarkDante,

Traiver

Developer
Developer
Joined
Aug 1, 2014
Messages
1,326
Trophies
1
Location
???
XP
2,959
Country
United States
It's not, no one knows the causes of the ban
Right, the only thing that makes sense is that your console sends information about third party software on your console. But this won't be only the freeShop. It could causes every third party installed software.
 

DarkDante

Well-Known Member
Member
Joined
Jan 24, 2015
Messages
359
Trophies
0
Age
29
Location
DarkLand
XP
415
Country
Japan
It's not, no one knows the causes of the ban
Right, the only thing that makes sense is that your console sends information about third party software on your console. But this won't be only the freeShop. It could causes every third party installed software.

Yes I know guys but I'm trying to hide lol, is the 3dsx file working fine?
 

Senoue

Well-Known Member
Member
Joined
Jul 12, 2011
Messages
168
Trophies
0
Age
29
Website
Visit site
XP
202
Country
United States
Trying to use MP3s as a music type because I noticed in 3.12 that it is being experimented with, but it is not working in 3.14. Was it taken out?
 

DarkIrata

Well-Known Member
Member
Joined
Jun 12, 2015
Messages
493
Trophies
0
Age
29
Website
ipmix.de
XP
1,591
Country
Germany

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
Why hasn't this been automated yet? Or is not possible?
it's not done manually. It's automatically done. But takes some time to check the keys.
No... The cache is updated manually. The maintenance of the cache was given to someone by cruel before he left. That person has not automated it because setting that up takes time and resources, more time than manually updating it every couple weeks.
 

Ev1l0rd

(⌐◥▶◀◤) girl - noirscape
Member
Joined
Oct 26, 2015
Messages
2,004
Trophies
1
Location
Site 19
Website
catgirlsin.space
XP
3,441
Country
Netherlands
No... The cache is updated manually. The maintenance of the cache was given to someone by cruel before he left. That person has not automated it because setting that up takes time and resources, more time than manually updating it every couple weeks.
It isn't. A single bash script and a cronjob could automate the entire cache. A cache update namely equals a new tag at the shop-cache repo. Travis does the building/generation, it's not done at the hosts computer.
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
It isn't. A single bash script and a cronjob could automate the entire cache. A cache update namely equals a new tag at the shop-cache repo. Travis does the building/generation, it's not done at the hosts computer.
In your case Travis does the build. That may not be how the actual maintainer of the "official" repo is doing it. If it was, you'd assume he'd have setup a cron job long ago to stop people complaining.
 
D

Deleted User

Guest
For information if you "need" an updated cache, do it yourselves :P (I don't know if it ok to share it here)

On mac (but close enough process on linux and windows, I won't help) :

Get everything ready :
Download the latest .dmg for python3 and install it : https://www.python.org/downloads/
Find the magnet to download the ctr-common-1.crt and ctr-common-1.key
Download the sources of the shop cache generator : https://github.com/Repo3DS/shop-cache
Go to you usual titlekey database to get the latest decTitleKeys.bin and encTitlesKeys.bin
Put all the keys in the Shop-cache folder

Open a sudo terminal in the folder

Be sure to install x-code tools :
  • xcode-select --install
  • xcode-select --reset

install the libraries :
  • sudo pip3 install pillow
  • sudo pip3 install pycrypto

start the building of the cache :
  • sudo python3 gen_cache.py

Go see a movie, it's that long...
then you will have a data.json to put in 3DS/data/freeshop/cache on your 3DS (any means)

note : Icons are downloaded (in images folder) but I don't know the format to convert them in .bin so all your icons will be the previous ones, with a wrong index, just download based on the titles + regions, not the icon (screenshots are downloaded on the fly and should be ok)

enjoy
 

Ferras2

Active Member
Newcomer
Joined
Dec 24, 2016
Messages
43
Trophies
0
Age
32
XP
148
Country
Brazil
Hi, I have a new 3ds xl USA, with version 11.5 and unlockd with boot9strap 1.2 and luma 8.1.1.
When i use the freeshop (.3dsx version, opened with rosalina menu) he random freeze (generaly when i press x to install a game), its make praticaly impossible to download a game, i need to download with y (suspended). Any tips?
 

Dionicio3

goat
Member
Joined
Feb 26, 2017
Messages
4,046
Trophies
2
Age
20
Location
Hollister, CA
Website
dionicio3.com
XP
7,211
Country
United States
Hi, I have a new 3ds xl USA, with version 11.5 and unlockd with boot9strap 1.2 and luma 8.1.1.
When i use the freeshop (.3dsx version, opened with rosalina menu) he random freeze (generaly when i press x to install a game), its make praticaly impossible to download a game, i need to download with y (suspended). Any tips?
I'd personally use the cia version
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Is Janet Jackson alive?