|
@@ -86,14 +86,14 @@ class sub(object):
|
|
|
outputlevel="default", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
|
|
|
for i in self.__ParsedResponse.videos:
|
|
|
- printf(_('Checking if video "%s" exists in the database' % i.title),
|
|
|
+ printf(_('Checking if video "%s" exists in the database') % i.title,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
self.__ytid = i.ytid
|
|
|
self.__videoquery = "SELECT id FROM videos WHERE ytid=?"
|
|
|
self.__cursor.execute(self.__videoquery, (self.__ytid,))
|
|
|
self.__tmpid = self.__cursor.fetchall()
|
|
|
if self.__tmpid == []:
|
|
|
- printf(_("Video %s not found in database, inserting..." % i.title),
|
|
|
+ printf(_("Video %s not found in database, inserting...") % i.title,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel,
|
|
|
descriptor="stderr")
|
|
|
self.__query = "INSERT INTO videos (title, description, \
|
|
@@ -118,15 +118,15 @@ class sub(object):
|
|
|
"Please check permissions and try again."),
|
|
|
outputlevel="default", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
|
|
|
- printf(_("Getting all videos for subscription %s from database"
|
|
|
- % self.__title), outputlevel="verbose", level=self.__conf.outputlevel,
|
|
|
+ printf(_("Getting all videos for subscription %s from database")
|
|
|
+ % self.__title, outputlevel="verbose", level=self.__conf.outputlevel,
|
|
|
descriptor="stderr")
|
|
|
self.__videoquerybysubscription = "SELECT id, title, description, \
|
|
|
ytid, downloaded, failcnt FROM videos WHERE subscription_id=?"
|
|
|
self.__cursor.execute(self.__videoquerybysubscription, (self.__ID,))
|
|
|
self.__videodata = self.__cursor.fetchall()
|
|
|
for i in self.__videodata:
|
|
|
- printf(_("Got video %s" % i[1]),
|
|
|
+ printf(_("Got video %s") % i[1],
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
self.__videos.append(youtube.video(id=i[0],
|
|
|
title=i[1], description=i[2], ytid=i[3],
|
|
@@ -174,10 +174,10 @@ class sub(object):
|
|
|
else:
|
|
|
self.__cursor = self.__connection.cursor()
|
|
|
self.__title = self.__ParsedResponse.title
|
|
|
- printf(_("Found subscription title %s" % self.__title),
|
|
|
+ printf(_("Found subscription title %s") % self.__title,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
self.__directory = self.__name + "_" + self.__search.replace(" ", "_")
|
|
|
- printf(_("Directory: %s" % self.__directory),
|
|
|
+ printf(_("Directory: %s") % self.__directory,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
self.__query = "INSERT INTO subscriptions (title, type, searchstring, \
|
|
|
directory, name) VALUES (?, ?, ?, ?, ?)"
|
|
@@ -193,7 +193,7 @@ class sub(object):
|
|
|
self.__cursor.execute(self.__query, self.__data)
|
|
|
self.__ID = self.__cursor.fetchone()
|
|
|
self.__ID = self.__ID[0]
|
|
|
- printf(_("Subscription got internal ID %s" % self.__ID),
|
|
|
+ printf(_("Subscription got internal ID %s") % self.__ID,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
self.__connection.close()
|
|
|
|
|
@@ -243,7 +243,7 @@ class sub(object):
|
|
|
printf(_("None or invalid subscription type given, "
|
|
|
"please check the type option and try again"),
|
|
|
outputlevel="default", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
- printf(_("Constructed the following API URL: %s" % self.__APIURL),
|
|
|
+ printf(_("Constructed the following API URL: %s") % self.__APIURL,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel, descriptor="stderr")
|
|
|
|
|
|
def CheckAndDelete(self):
|
|
@@ -259,7 +259,7 @@ class sub(object):
|
|
|
for item in self.__videos:
|
|
|
if item.ytid not in self.__id_list:
|
|
|
if item.delete() is True:
|
|
|
- printf(_("Video %s deleted from the database!" % item.title),
|
|
|
+ printf(_("Video %s deleted from the database!") % item.title,
|
|
|
outputlevel="verbose", level=self.__conf.outputlevel,
|
|
|
descriptor="stdout")
|
|
|
else:
|