Comments (7)
It's been a while since I looked at it. But I'm almost 100% sure we didn't implement jinja rendering for labels. Id have to look at it again. That being said I don't believe that's implemented at the moment.
from flexget.
It's been a while since I looked at it. But I'm almost 100% sure we didn't implement jinja rendering for labels. Id have to look at it again. That being said I don't believe that's implemented at the moment.
Thanks for your reply.
I need to use this function to get my file storage location, and use a system-level script to verify movie ratings to imdb website every day. Delete a movie if it doesn't meet the expected rating within 7 days of downloading it. To avoid the problem that happened earlier when a movie rated 7.3 had 108 votes, but two days later it had 540 votes and only got a 5.8 rating. I don't want to fix this by raising the limit vote count because I don't want to miss out on every potential new movie.
Initially I also tried to implement this functionality with flexget's plugin. I guess the imdb plugin does not have the function to force bypass the cache content, which makes it impossible for me to get the real-time score of imdb.
from flexget.
Caching I believe is set to 4 hrs. I could be wrong but that sounds about right. So as long as your checking the next day, your pulling fresh information. Implementing this would be similar in fashion to any of the other jinja rendering where we check and call the render function. You can look at many other plugins to check how it's implemented.
from flexget.
Caching I believe is set to 4 hrs. I could be wrong but that sounds about right. So as long as your checking the next day, your pulling fresh information. Implementing this would be similar in fashion to any of the other jinja rendering where we check and call the render function. You can look at many other plugins to check how it's implemented.
The movie was downloaded on the 29th, but the rating is still 7.3 on the 30th (5.8 on the imdb website), and it has been more than 24 hours. I implemented this function with the filesystem/age/imdb_lookup/imdb/delete plugin.
from flexget.
def expired(self):
"""
:return: True if movie details are considered to be expired, ie. need of update
"""
if self.updated is None:
logger.debug('updated is None: {}', self)
return True
refresh_interval = 2
if self.year:
# Make sure age is not negative
age = max((datetime.now().year - self.year), 0)
refresh_interval += age * 5
logger.debug('movie `{}` age {} expires in {} days', self.title, age, refresh_interval)
return self.updated < datetime.now() - timedelta(days=refresh_interval)
def __repr__(self):
return f'<Movie(name={self.title},votes={self.votes},year={self.year})>'
The movie whose rating dropped from 7.3 to 5.8 was released in 2023. From the above code, we can see that the cache expiration time is 2 + (2023 - 2023) * 5, which means it takes two days to update the cache.
Is there anything else?
from flexget.
The movie whose rating dropped from 7.3 to 5.8 was released in 2023. From the above code, we can see that the cache expiration time is 2 + (2023 - 2023) * 5, which means it takes two days to update the cache.
Is there anything else?
That looks right. The ratings updates are the exact reason the cache is shorter for newer movies. Is this not working for you, or you want the cache to be shorter?
I'm not exactly sure how your initial request for templating support in the labels would help? What were you going to store in the labels?
from flexget.
The movie whose rating dropped from 7.3 to 5.8 was released in 2023. From the above code, we can see that the cache expiration time is 2 + (2023 - 2023) * 5, which means it takes two days to update the cache.
Is there anything else?That looks right. The ratings updates are the exact reason the cache is shorter for newer movies. Is this not working for you, or you want the cache to be shorter?
I'm not exactly sure how your initial request for templating support in the labels would help? What were you going to store in the labels?
I've solved my current problem using this update function logic, so this problem becomes less urgent for me. But I still hope to support assigning variable values to transmission labels in the future.
from flexget.
Related Issues (20)
- Document pipx install method HOT 6
- imdb plugin feature request: allow filtering by production companies
- Plugin exists_movie upgrade comparison broken
- BUG: Unhandled error in plugin convert_magnet: 'save_path must be set in add_torrent_params' HOT 2
- Recommended new plugin: sportsdb
- FR: Add mutagen to docker image
- Add support for structured logging to stdout HOT 1
- Plugins for subtitles HOT 1
- Lazy_lookup plugin HOT 1
- [Feature Request] rTorrent custom field enhancement HOT 4
- The time zone issue on the tasks page HOT 5
- Pushbullet: Connection aborted closed connection without response HOT 2
- After pip upgrade can't start via the daemon, folder /usr/local/bin/flexget was removed
- Scheduler error after upgrade HOT 4
- transmission-rpc versions mismatch HOT 2
- Failure to connect to Transmission causes unhandled exception HOT 2
- transmission-rpc version requirements HOT 4
- Passthepopcorn search plugin can crash rather than freshly log in when a saved cookie is bad HOT 2
- Can't talk to my Telegram bot using the Telegram notifier HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexget.