From ce5a91eaa7391f6de3dd0dbc43f43b96a280cb00 Mon Sep 17 00:00:00 2001 From: alshain Date: Fri, 11 Feb 2011 00:58:40 +0100 Subject: [PATCH] Changes File model. --- couchpotato/model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/couchpotato/model.py b/couchpotato/model.py index c0b1ee87..1d166143 100644 --- a/couchpotato/model.py +++ b/couchpotato/model.py @@ -29,7 +29,10 @@ class Release(Entity): class File(Entity): """File that belongs to a release.""" - path = Field(UnicodeString(255)) + history = OneToMany('RenameHistory') + path = Field(UnicodeString(255), nullable=False, unique=True) + # Subtitles can have multiple parts, too + part = Field(Integer) release = ManyToOne('Release') # Let's remember the size so we know about offline media. size = Field(Integer)