How does caching affect the suball script?

Support for Windows users
Post Reply
viking
Power User
Posts: 128
Joined: 14 Jul 2013, 08:21

How does caching affect the suball script?

Post by viking »

Is there some way to avoid using the cache when using suball?
I am always first manually clearing the cache.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Avoid Using Cache?

Post by rednoah »

Please don't clear the cache unnecessarily. The cache just makes sure that you can't do the same request more than once per day.

If you call suball once per day, you will always get fresh results. If you call suball multiple times per day on the same files then you're you're just being excessive, and with -clear-cache before every call you're also abusing OpenSubtitles and risk getting banned.

You might want to consider using something like --def minAgeDays=0.5 to make sure you're not trying to search for subtitles too early.
:idea: Please read the FAQ and How to Request Help.
viking
Power User
Posts: 128
Joined: 14 Jul 2013, 08:21

Re: How does caching affect the suball script?

Post by viking »

1. I usually run suball on several subdirectories once/day. However, sometimes I need to just repeat it for a single subdirectory (with a single media file) and I cannot get any results because of the cache.

2. If I use --def minAgeDays=0.5 wouldn't that still limit my results to once/day because of the cache?
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How does caching affect the suball script?

Post by rednoah »

Problem:

6:00: download files
6:00: try to download subtitles, no results (no new results until 6:00 next day)
9:00: subtitles are published, bad luck, you already used your chance for today (so you won't find them at this point in time)


Solution:

6:00: download files
9:00: subtitles are published
18:00: try to fetch subtitles, lucky you, you found subtitles (no new results until 18:00 next day, but who cares, you got what you wanted)



Be reminded that caching ALWAYS gives you fresh results if you haven't made that exact request within the last 24h hours. If you search for A now, and a few hours later B, and then C a few seconds later, then you well get the latest results for each request at the time.

Caching does not stop you from getting the latest results, it stops you from getting the latest results multiple times per day.
:idea: Please read the FAQ and How to Request Help.
viking
Power User
Posts: 128
Joined: 14 Jul 2013, 08:21

Re: How does caching affect the suball script?

Post by viking »

Problem:
3/22 at 22:00 Download file
3/23 at 21:00 Try to download subtitles (I wanted to watch the show while having late dinner); Nothing available
3/24 at 20:00 Try to download subtitles again. Oops nothing available because of the cache. I wanted to watch the show when having normal dinner. Now I need to postpone my dinner until after 21:00 :cry:


Solution:
3/22 at 22:00 Download file
3/23 at 21:00 Try to download subtitles (I wanted to watch the show while having late dinner); Nothing availablee
3/24 at 19:59 clear cache
3/24 at 20:00 Try to download subtitles again. Yes! Available because I cleared the cache. I can have dinner now :D
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How does caching affect the suball script?

Post by rednoah »

Call your script every day at exactly 19:00 then. That'd allow for early dinner as well. :D
:idea: Please read the FAQ and How to Request Help.
viking
Power User
Posts: 128
Joined: 14 Jul 2013, 08:21

Re: How does caching affect the suball script?

Post by viking »

rednoah wrote:Call your script every day at exactly 19:00 then. That'd allow for early dinner as well. :D
Actually, I need to run it manually at a time when I am not using the computer (I am using the suball script within another script using Automate software).
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How does caching affect the suball script?

Post by rednoah »

Alright, the caches now use odd times, 18 hours instead 24 hours / 12 days instead of 14 days / etc to account for minor time offsets.
:idea: Please read the FAQ and How to Request Help.
viking
Power User
Posts: 128
Joined: 14 Jul 2013, 08:21

Re: How does caching affect the suball script?

Post by viking »

rednoah wrote:Alright, the caches now use odd times, 18 hours instead 24 hours / 12 days instead of 14 days / etc to account for minor time offsets.
OK. Thanks!
What is the 12/14 day cache used for?
Do I need to download the latest version, filebot-4.6.2-r3768-sub.jar, for this?
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How does caching affect the suball script?

Post by rednoah »

1.
The latest revision should be fine.

See commit log:
https://sourceforge.net/p/filebot/code/commit_browser


2.
Caching is used for many things. The 2 week caches should be used for AniDB and TheTVDB and probably a few other things.
:idea: Please read the FAQ and How to Request Help.
Post Reply