Add new feature, set file date to episode aired date. Fix, use alternative Trakt API field for episode air time. Improve the Preview Rename tip.

Add, new setting "Set File Date to Airdate" on the Media Management tab of the Settings page to toggle this feature for new, imported and auto updating media files.

Change, home page "Series Editor" - "Rename" button to "Update Files" and add "Set File Date To Air Date" action button to this modal to add capability of updating legacy media.

Add, non UTC functions given that Windows undesirably adds time to file times set when using UTC.

Fix, the Trakt API response show.air_time_utc contains erroneous data, this is replaced with show.air_time.
This commit is contained in:
JackDandy 2014-03-08 19:01:51 +00:00
commit d9eab04029
24 changed files with 316 additions and 38 deletions

View file

@ -14,6 +14,7 @@ namespace NzbDrone.Common.Disk
DateTime GetLastFolderWrite(string path);
DateTime GetLastFileWrite(string path);
DateTime GetLastFileWriteUTC(string path);
void EnsureFolder(string path);
bool FolderExists(string path);
bool FileExists(string path);
@ -33,6 +34,8 @@ namespace NzbDrone.Common.Disk
void WriteAllText(string filename, string contents);
void FileSetLastWriteTimeUtc(string path, DateTime dateTime);
void FolderSetLastWriteTimeUtc(string path, DateTime dateTime);
void FileSetLastWriteTime(string path, DateTime dateTime);
void FileSetLastAccessTime(string path, DateTime dateTime);
bool IsFileLocked(string path);
string GetPathRoot(string path);
string GetParentFolder(string path);