From fa42623c8ab15ab3a01a8f12f45010360f995f37 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 9 Jul 2018 15:29:06 +0200 Subject: [PATCH 1/4] fix post update --- update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.py b/update.py index 136f10e3..72ad1db8 100755 --- a/update.py +++ b/update.py @@ -247,7 +247,7 @@ if __name__ == "__main__": run('./bin/pip', 'install', '-r', 'requirements.txt') update_service('pandora-encoding') update_service('pandora-tasks') - if old < 5972: + if old < 5975: run('./bin/pip', 'install', '-r', 'requirements.txt') else: if len(sys.argv) == 1: From 691c6fd1369d3394b25412b69f3582f416fd8969 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 9 Jul 2018 15:58:28 +0200 Subject: [PATCH 2/4] tornado > 5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4370f871..a3936b66 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,6 @@ django-extensions==2.0.7 gunicorn==19.8.1 html5lib requests==2.19.1 -tornado==5.0.2 +tornado<5 geoip2==2.9.0 youtube-dl From 0de22db5d65e615439fc5d853705b49aa0966da8 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 9 Jul 2018 16:04:06 +0200 Subject: [PATCH 3/4] fix json->cache rename: update cache not json --- pandora/item/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 41d475de..9eeba4f1 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -881,7 +881,7 @@ def poster(request, id, size=None): poster_height=item.poster_height, poster_width=item.poster_width, icon=item.icon.name, - json=item.json() + cache=item.json() ) if item.poster and os.path.exists(item.poster.path): return image_to_response(item.poster, size) From 113594915ab0da63375663b0eb0f8803800ffef2 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 9 Jul 2018 16:19:27 +0200 Subject: [PATCH 4/4] fix dates in cache --- pandora/item/migrations/0004_json_cache.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandora/item/migrations/0004_json_cache.py b/pandora/item/migrations/0004_json_cache.py index 89962489..8e79c88e 100644 --- a/pandora/item/migrations/0004_json_cache.py +++ b/pandora/item/migrations/0004_json_cache.py @@ -19,4 +19,13 @@ class Migration(migrations.Migration): old_name='json', new_name='cache', ), + migrations.RunSQL( + """UPDATE item_item SET cache = jsonb_set(cache, '{created}', cache->'created'->'__value__', true) WHERE cache @> '{"created": {"__class__": "datetime.datetime"}}'""" + ), + migrations.RunSQL( + """UPDATE item_item SET cache = jsonb_set(cache, '{accessed}', cache->'accessed'->'__value__', true) WHERE cache @> '{"accessed": {"__class__": "datetime.datetime"}}'""" + ), + migrations.RunSQL( + """UPDATE item_item SET cache = jsonb_set(cache, '{modified}', cache->'modified'->'__value__', true) WHERE cache @> '{"modified": {"__class__": "datetime.datetime"}}'""" + ), ]