librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1641] Prompt both with and without -j.


From: Daniel Watkins
Subject: [Librefm-commits] [1641] Prompt both with and without -j.
Date: Fri, 15 May 2009 19:41:14 +0000

Revision: 1641
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1641
Author:   odd_bloke
Date:     2009-05-15 19:41:14 +0000 (Fri, 15 May 2009)
Log Message:
-----------
Prompt both with and without -j.

Modified Paths:
--------------
    trunk/scripts/offline-submit.py

Modified: trunk/scripts/offline-submit.py
===================================================================
--- trunk/scripts/offline-submit.py     2009-05-15 19:41:12 UTC (rev 1640)
+++ trunk/scripts/offline-submit.py     2009-05-15 19:41:14 UTC (rev 1641)
@@ -19,13 +19,17 @@
     return datetime.datetime.utcfromtimestamp(float(string))
 
 
-def _get_date_from_string(start_string):
-    dt = _parse_date(start_string)
+def _date_prompt(dt):
     input = ''
     while input not in ['y', 'n']:
         input = raw_input("Did you mean '%s UTC'? [Y/n]: " % (dt,)).lower()
     if input == 'n':
         sys.exit()
+
+
+def _get_date_from_string(start_string):
+    dt = _parse_date(start_string)
+    _date_prompt(dt)
     return dt
 
 
@@ -33,7 +37,9 @@
     offset = datetime.timedelta()
     for track in tracks:
         offset += datetime.timedelta(seconds=_get_track(track).info.length)
-    return datetime.datetime.now() - offset
+    dt = datetime.datetime.now() - offset
+    _date_prompt(dt)
+    return dt
 
 
 def _get_track(filename):





reply via email to

[Prev in Thread] Current Thread [Next in Thread]