Commits

Vladimir Kolev committed 0409e8c

New version released. Still not working with grooveshark, but at least the user
is notified that the service is changed, and that we are working on a salution.

  • Participants
  • Parent commits 6968255
  • Tags gsharkdown-0.5.1

Comments (0)

Files changed (13)

-0.4.1
+0.5.1

File data/about_dialog.ui

     <property name="icon">gsharkdown_64.png</property>
     <property name="type_hint">dialog</property>
     <property name="program_name">gSharkDown</property>
-    <property name="version">0.5 beta</property>
+    <property name="version">0.5.1</property>
     <property name="copyright" translatable="yes">(c) Vladimir Kolev 2011</property>
     <property name="comments" translatable="yes">Gnome-toolkit based desktop application for downloading music files from Grooveshark.com</property>
     <property name="website">https://bitbucket.org/vkolev/gsharkdown</property>

File gsharkdown.pot

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Spanish - Dami&#xE1;n Nohales"
 msgstr ""
 
-#: data/about_dialog.ui.h:8 lib/guihelpers.py:196 lib/guihelpers.py:245
+#: data/about_dialog.ui.h:8 lib/guihelpers.py:197 lib/guihelpers.py:246
 msgid "Check for update"
 msgstr ""
 
 msgid "Love song on Last.fm"
 msgstr ""
 
-#: data/main_window.ui.h:12 lib/tfuncs.py:392
+#: data/main_window.ui.h:12 lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr ""
 
 " A song should be playing"
 msgstr ""
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr ""
+
+#: lib/guihelpers.py:180
 msgid "Hide gSharkDown"
 msgstr ""
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 msgid "gSharkDown :: Player and Downloader"
 msgstr ""
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr ""
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr ""
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr ""
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr ""

File lib/groove.py

 
 _useragent = \
 """Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"""
-_referer = "http://grooveshark.com/JSQueue.swf?20110725.01"
+_referer = "http://grooveshark.com/JSQueue.swf?20111111.111"
 _token = None
 
 h = {}
                   "Accept-Encoding": "gzip",
                   "Cookie": "PHPSESSID=" + h["session"]})
     resp = conn.getresponse().read()
-    gzipfile = gzip.GzipFile(fileobj=(StringIO.StringIO(resp)))
+    gzipfile = gzip.GzipFile(fileobj = (StringIO.StringIO(resp)))
     _token = json.JSONDecoder().decode(gzipfile.read())["result"]
 
 
-def getSearchResultsEx(query, type="Songs"):
+def getSearchResultsEx(query, type = "Songs"):
     """
     Method to get the search results from the gs service
     and returns them as dictionary.
     p["parameters"]["query"] = query
     p["header"] = h
     p["header"]["client"] = "htmlshark"
-    p["header"]["clientRevision"] = "20110606"
+    p["header"]["clientRevision"] = "20110906"
     p["header"]["token"] = prepToken("getSearchResultsEx", ":backToTheScienceLab:")
     p["method"] = "getSearchResultsEx"
     conn = httplib.HTTPConnection("grooveshark.com")
                   "Accept-Encoding": "gzip",
                   "Cookie": "PHPSESSID=" + h["session"]})
     resp = conn.getresponse().read()
-    gzipfile = gzip.GzipFile(fileobj=(StringIO.StringIO(resp)))
+    gzipfile = gzip.GzipFile(fileobj = (StringIO.StringIO(resp)))
     j = json.JSONDecoder().decode(gzipfile.read())
     try:
         return j['result']['result']['Songs']
                   "Accept-Encoding": "gzip",
                   "Cookie": "PHPSESSID=" + h["session"]})
     resp = conn.getresponse().read()
-    gzipfile = gzip.GzipFile(fileobj=(StringIO.StringIO(resp)))
+    gzipfile = gzip.GzipFile(fileobj = (StringIO.StringIO(resp)))
     j = json.JSONDecoder().decode(gzipfile.read())
     return j
 
 
 def init():
     conn = httplib.HTTPConnection("grooveshark.com")
-    conn.request("HEAD", "", headers={"User-Agent": _useragent})
+    conn.request("HEAD", "", headers = {"User-Agent": _useragent})
     res = conn.getresponse()
     cookie = res.getheader("set-cookie").split(";")
     h["session"] = cookie[0][10:]

File lib/guihelpers.py

                             gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
                             gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, message)
         self.set_default_response(gtk.RESPONSE_OK)
+        self.set_title(_("Error"))
         self.connect('response', self.handle_clicked)
 
     def handle_clicked(self, *args):

File lib/tfuncs.py

 class InitThread(threading.Thread):
     def __init__(self, _frame):
         threading.Thread.__init__(self)
+        self._stop = threading.Event()
         self.frame = _frame
 
     def run(self):
                 if e.args[0] == 11004:
                     time.sleep(1)
                 else:
-                    print e.args
+                    error = guihelpers.ErrorMessage(None,
+                                    "grooveshark service has changed!\n" +
+                                    "gSharkDown will not function propperly, so please" +
+                                    "be patient till we find a sallution")
+                    error.show_all()
+                    p = 0
+                    self.stop()
+    def stop(self):
+        self._stop.set()
+
+    def stopped(self):
+        return self._stop.isSet()
 
 
 class DownloadThread(threading.Thread):

File locale/bg_BG/LC_MESSAGES/gsharkdown.mo

Binary file modified.

File locale/bg_BG/LC_MESSAGES/gsharkdown.po

 msgstr ""
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
-"PO-Revision-Date: 2011-11-16 10:55+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
+"PO-Revision-Date: 2011-11-17 07:28+0100\n"
 "Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
 "Language-Team: Bulgarian\n"
 "MIME-Version: 1.0\n"
 "Spanish - Damián Nohales"
 
 #: data/about_dialog.ui.h:8
-#: lib/guihelpers.py:196
-#: lib/guihelpers.py:245
+#: lib/guihelpers.py:197
+#: lib/guihelpers.py:246
 msgid "Check for update"
 msgstr "Провери за нова версия"
 
 msgstr "Добавя песен в любими в Last.fm"
 
 #: data/main_window.ui.h:12
-#: lib/tfuncs.py:392
+#: lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr "Текст"
 
 "Няма песен, която да бъде харесана.\n"
 " Песента трябва да свири"
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr "Грешка"
+
+#: lib/guihelpers.py:180
 msgid "Hide gSharkDown"
 msgstr "Скрий gSharkDown"
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 msgid "gSharkDown :: Player and Downloader"
 msgstr "gSharkDown :: Player and Downloader"
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr "Неуспех при създаване на '%s' за записване."
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr "Нова версия"
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr "Последна версия"
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr "Зареждане на текста..."
 

File locale/de_DE/LC_MESSAGES/gsharkdown.mo

Binary file modified.

File locale/de_DE/LC_MESSAGES/gsharkdown.po

 msgstr ""
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
-"PO-Revision-Date: 2011-11-16 10:58+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
+"PO-Revision-Date: 2011-11-17 07:28+0100\n"
 "Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
 "Spanish - Damián Nohales"
 
 #: data/about_dialog.ui.h:8
-#: lib/guihelpers.py:196
-#: lib/guihelpers.py:245
+#: lib/guihelpers.py:197
+#: lib/guihelpers.py:246
 msgid "Check for update"
 msgstr "Nach Updates suchen"
 
 msgstr "Lied in Lieblingslieder in Last.fm"
 
 #: data/main_window.ui.h:12
-#: lib/tfuncs.py:392
+#: lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr "Songtext"
 
 "Da ist kein Lieb zu lieben.\n"
 " Das lied muss erst abgespielt werden."
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr "Fehler"
+
+#: lib/guihelpers.py:180
 msgid "Hide gSharkDown"
 msgstr "Verstecke gSharkDown"
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 msgid "gSharkDown :: Player and Downloader"
 msgstr "gSharkDown :: Player and Downloader"
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr "Fehler beim erstellen von '%s' zum schreiben."
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr "Neue Version"
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr "Neueste Version"
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr "Lade Songtext"
 

File locale/es/LC_MESSAGES/gsharkdown.po

 msgstr ""
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
 "PO-Revision-Date: 2011-11-01 11:53+0100\n"
 "Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
 "Language-Team: Damián Nohales <LL@li.org>\n"
 "Italiano -  Andrea Sciucca\n"
 "Español - Damián Nohales"
 
-#: data/about_dialog.ui.h:8 lib/guihelpers.py:196 lib/guihelpers.py:245
+#: data/about_dialog.ui.h:8 lib/guihelpers.py:197 lib/guihelpers.py:246
 msgid "Check for update"
 msgstr "Verificar actualizaciones"
 
 msgid "Love song on Last.fm"
 msgstr ""
 
-#: data/main_window.ui.h:12 lib/tfuncs.py:392
+#: data/main_window.ui.h:12 lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr "Letras"
 
 " A song should be playing"
 msgstr ""
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr ""
+
+#: lib/guihelpers.py:180
 #, fuzzy
 msgid "Hide gSharkDown"
 msgstr "Salir de gSharkDown"
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 msgid "gSharkDown :: Player and Downloader"
 msgstr "gSharkDown :: Player and Downloader"
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr "Error al abrir \"%s\" para escritura"
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr ""
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr ""
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr "Cargando letras..."
 

File locale/gl_ES/LC_MESSAGES/gsharkdown.po

 msgstr ""
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
 "PO-Revision-Date: 2011-11-01 11:53+0100\n"
 "Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
 "Language-Team: antiparvos <LL@li.org>\n"
 "Italiano -  Andrea Sciucca\n"
 "Castelán - Damián Nohales"
 
-#: data/about_dialog.ui.h:8 lib/guihelpers.py:196 lib/guihelpers.py:245
+#: data/about_dialog.ui.h:8 lib/guihelpers.py:197 lib/guihelpers.py:246
 msgid "Check for update"
 msgstr "Buscar actualizacións"
 
 msgid "Love song on Last.fm"
 msgstr ""
 
-#: data/main_window.ui.h:12 lib/tfuncs.py:392
+#: data/main_window.ui.h:12 lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr "Letras"
 
 " A song should be playing"
 msgstr ""
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr ""
+
+#: lib/guihelpers.py:180
 #, fuzzy
 msgid "Hide gSharkDown"
 msgstr "gSharkDown"
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 #, fuzzy
 msgid "gSharkDown :: Player and Downloader"
 msgstr "gSharkDown: descargador para Grooveshark"
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr "Produciuse un fallo ao crear '%s' para escritura."
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr ""
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr ""
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr "Cargando letras..."
 

File locale/it_IT/LC_MESSAGES/gsharkdown.po

 msgstr ""
 "Project-Id-Version: gsharkdown\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-16 10:53+0100\n"
+"POT-Creation-Date: 2011-11-17 07:26+0100\n"
 "PO-Revision-Date: 2011-11-01 11:54+0100\n"
 "Last-Translator: Vladimir Kolev <vladimir.r.kolev@gmail.com>\n"
 "Language-Team: Italiano\n"
 "Italian -  Andrea Sciucca\n"
 "Spanish - Damián Nohales"
 
-#: data/about_dialog.ui.h:8 lib/guihelpers.py:196 lib/guihelpers.py:245
+#: data/about_dialog.ui.h:8 lib/guihelpers.py:197 lib/guihelpers.py:246
 msgid "Check for update"
 msgstr "Controlla eventuali aggiornamenti"
 
 msgid "Love song on Last.fm"
 msgstr ""
 
-#: data/main_window.ui.h:12 lib/tfuncs.py:392
+#: data/main_window.ui.h:12 lib/tfuncs.py:404
 msgid "Lyrics"
 msgstr "Testi"
 
 " A song should be playing"
 msgstr ""
 
-#: lib/guihelpers.py:179
+#: lib/guihelpers.py:50
+msgid "Error"
+msgstr ""
+
+#: lib/guihelpers.py:180
 #, fuzzy
 msgid "Hide gSharkDown"
 msgstr "gSharkDown"
 
-#: lib/guihelpers.py:222
+#: lib/guihelpers.py:223
 #, fuzzy
 msgid "gSharkDown :: Player and Downloader"
 msgstr "gSharkDown: GrooveShark Downloader"
 
-#: lib/tfuncs.py:95
+#: lib/tfuncs.py:107
 #, python-format
 msgid "Failed to create '%s' for writing."
 msgstr "Fallimento nel creare '%s' in scrittura."
 
-#: lib/tfuncs.py:363
+#: lib/tfuncs.py:375
 msgid "New version"
 msgstr ""
 
-#: lib/tfuncs.py:368
+#: lib/tfuncs.py:380
 msgid "Latest version"
 msgstr ""
 
-#: lib/tfuncs.py:389
+#: lib/tfuncs.py:401
 msgid "Loading lyrics..."
 msgstr "Carico i testi..."