Getting the download date for a release?

General development talk regarding Couchpotato
Junior Member
Posts: 1
Joined: 01 Aug 2017 10:06
Status: Offline

Getting the download date for a release?

Postby evinyatar » 01 Aug 2017 10:30

I'm working on integrating CouchPotato and Pith (open-source network based media server). The goal is to set it up so the Pith web UI presents the complete movie library straight from Couchpotato, without having to scan the library from disk into yet another media library. So far it's going great except for one thing; finding out when a movie was downloaded. This is important in order to sort by newness. There is a "last_edit" field on release, but for releases with a "done" status that appears to be updated every day, effectively rendering it useless for this purpose. My current workaround is to check the modification date of the file, but that is extremely slow with a library of 1600 items.

Ideally I'd like to add a "date_downloaded" field on release, which is only filled in on download completion, and then implement a first-time migration that fills that field with the modification date of the associated file. I can manage the first bit, but having zero python experience I might have some trouble with the second bit.

Anyone have any ideas on this?

User avatar
Posts: 8355
Joined: 28 Jun 2012 12:55
Has thanked: 94 times
Been thanked: 465 times
Status: Offline

Re: Getting the download date for a release?

Postby clinton.hall » 03 Aug 2017 14:26 ... -in-python

the release should contain the path to the video files etc, so parse that path through creation_date from the link above...

Return to “Development”