RaitaroH / adl

🍿 anime scraper/downloader + trackma wrapper
GNU General Public License v3.0
140 stars 15 forks source link

Issue if episode number > 100 #26

Closed BamBalaam closed 4 years ago

BamBalaam commented 4 years ago

When tracking something over 100 episodes, ADL struggles to find the next episode.

e.g.

Selection:

>  |    4    Black Clover..................................................... 109 / ?

Post-selection

Black Clover > 0 / 
RaitaroH commented 4 years ago

Hmm I will take a look.

RaitaroH commented 4 years ago

Been busy.

RaitaroH commented 4 years ago

Fixed in develop branch. I will merge into master soon-ish. You can use the adl -u to update to develop if you want or do it manually.

BamBalaam commented 4 years ago

Awesome, thanks a lot @RaitaroH !

RaitaroH commented 4 years ago

The fix isn't pretty though, I should find a better way to do it :sweat_smile:

BamBalaam commented 4 years ago

To be fully honest, I would not have done better.sed is quite hellish, otherwise I would have submitted a PR :smile:

RaitaroH commented 4 years ago

@BamBalaam what do you think of this. I would like this in sed but can't get it to work there ah well ¯\_(ツ)_/¯

process_list()    {
  perl -pe 's/\x1b\[[0-9;]*m//g ; s/^.+?[^\s]\s+(.[^\.]*)\.+\ +(\d+).[^\d]\ (\d+|\?)\s+(\d+).+$/\1|\2|\3|\4|/g'
}

Can you test this a bit too? In my testing things work pretty well. In terms of speed is pretty much the same as before, somehow. In terms of readability, both solutions look horrible to me. In terms of maintenance I believe this is better.