diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 13:48:03 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-27 13:48:03 +0100 |
commit | b6a2bd53628bd2824bac1dafc7b4eafdf3c815dd (patch) | |
tree | 64df88ec33ffeb34d635e66785853a4a33b3cafc /module/plugins/hoster/UnrestrictLi.py | |
parent | [SimpleHoster] Improve _isDirectLink + move here secondsToMidnight routine + ... (diff) | |
download | pyload-b6a2bd53628bd2824bac1dafc7b4eafdf3c815dd.tar.xz |
Update plugins after SimpleHoster changes
Diffstat (limited to 'module/plugins/hoster/UnrestrictLi.py')
-rw-r--r-- | module/plugins/hoster/UnrestrictLi.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py index 1476efa96..6e16cace7 100644 --- a/module/plugins/hoster/UnrestrictLi.py +++ b/module/plugins/hoster/UnrestrictLi.py @@ -6,30 +6,13 @@ from datetime import datetime, timedelta from module.common.json_layer import json_loads from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo - - -def secondsToMidnight(gmt=0): - now = datetime.utcnow() + timedelta(hours=gmt) - - if now.hour is 0 and now.minute < 10: - midnight = now - else: - midnight = now + timedelta(days=1) - - td = midnight.replace(hour=0, minute=10, second=0, microsecond=0) - now - - if hasattr(td, 'total_seconds'): - res = td.total_seconds() - else: #@NOTE: work-around for python 2.5 and 2.6 missing timedelta.total_seconds - res = (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 - - return int(res) +from module.plugins.internal.SimpleHoster import secondsToMidnight class UnrestrictLi(MultiHoster): __name__ = "UnrestrictLi" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'https?://(?:[^/]*\.)?(unrestrict|unr)\.li' |