mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 01:27:07 +00:00
Try to fix memory leak
This commit is contained in:
parent
adc5251200
commit
198fd36825
1 changed files with 19 additions and 1 deletions
|
@ -61,6 +61,15 @@ def update_all_episodes():
|
||||||
# Close database connection
|
# Close database connection
|
||||||
c.close()
|
c.close()
|
||||||
|
|
||||||
|
#Cleanup variables to free memory
|
||||||
|
del current_episodes_db
|
||||||
|
del current_episodes_db_list
|
||||||
|
del seriesIdList
|
||||||
|
del r
|
||||||
|
del current_episodes_sonarr
|
||||||
|
del deleted_items
|
||||||
|
del c
|
||||||
|
|
||||||
# Store substitles for all episodes
|
# Store substitles for all episodes
|
||||||
full_scan_subtitles()
|
full_scan_subtitles()
|
||||||
list_missing_subtitles()
|
list_missing_subtitles()
|
||||||
|
@ -124,6 +133,15 @@ def add_new_episodes():
|
||||||
# Close database connection
|
# Close database connection
|
||||||
c.close()
|
c.close()
|
||||||
|
|
||||||
|
#Cleanup variables to free memory
|
||||||
|
del current_episodes_db
|
||||||
|
del current_episodes_db_list
|
||||||
|
del seriesIdList
|
||||||
|
del r
|
||||||
|
del current_episodes_sonarr
|
||||||
|
del deleted_items
|
||||||
|
del c
|
||||||
|
|
||||||
# Store substitles from episodes we've just added
|
# Store substitles from episodes we've just added
|
||||||
new_scan_subtitles()
|
new_scan_subtitles()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue