RaitaroH / adl

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

2.2.1 fetch list after trackma update, #2 #3

Closed RaitaroH closed 5 years ago

RaitaroH commented 5 years ago

@Baitinq check out this version and tell me if this fix for #2 is fine. I still consider this is a bit slow. Alternatively this could be improved by changing the tlist variable, so no trackma is needed.

Baitinq commented 5 years ago

True, maybe it would be better to just change the tlist var

Baitinq commented 5 years ago

@RaitaroH although it doesnt take too much time in my opinion so this could work perfectly fine as well

RaitaroH commented 5 years ago

I did consider an option for that using sed... unfortunately it becomes sorta complicate to keep the table aligned. So if I change say 8 to 10 for Casshern this happens. Also, I need to be careful sed doesn't replace something else either like the colors and for that sed gets more complicated. Also this requires another function with basically 3 inputs so it gets sorta messy.

update_list() { #{{{
      trackma update "$title" "$1"
      color_print "\nUpdating anime list..."
      tlist="$(echo "$tlist" | sed -e "/$title/{s/$(($nr-1))/$1/g}")"
} #}}}
....
      read custom
      trackma send
      update_list $custom

image

Baitinq commented 5 years ago

@RaitaroH Okay, thats fine. Thanks again for the script!