Browse Source

subscription: correct attribute name in check_and_delete

Helmut Pozimski 6 years ago
parent
commit
7088f36a2f
2 changed files with 4 additions and 4 deletions
  1. 3 3
      lib_stov/generic_video.py
  2. 1 1
      lib_stov/subscription.py

+ 3 - 3
lib_stov/generic_video.py

@@ -36,7 +36,7 @@ class Video(object):
         self._id = video_id
         self.title = title
         self.site_id = site_id
-        self.__conf = conf
+        self._conf = conf
         self.downloaded = downloaded
         self.failcnt = int(failcount)
 
@@ -55,7 +55,7 @@ class Video(object):
         :return: boolean value
         :rtype: bool
         """
-        targetdir = self.__conf.values["downloaddir"] + "/" + directory
+        targetdir = self._conf.values["downloaddir"] + "/" + directory
         if not os.access(targetdir, os.F_OK):
             try:
                 LOGGER.debug(_("Creating directory %s"), targetdir)
@@ -66,7 +66,7 @@ class Video(object):
         os.chdir(targetdir)
         if self.downloaded == 0:
             try:
-                youtubedl_wrapper.download_video(self.__conf, url,
+                youtubedl_wrapper.download_video(self._conf, url,
                                                  itag_value)
             except stov_exceptions.YoutubeDlCallFailed:
                 self.failcnt = int(self.failcnt) + 1

+ 1 - 1
lib_stov/subscription.py

@@ -158,7 +158,7 @@ class Sub(object):
         for entry in parsed_response.videos:
             self._id_list.append(entry.video_id)
         for item in self._video_list:
-            if item.video_id not in self._id_list:
+            if item.site_id not in self._id_list:
                 self.to_delete.append(item)
 
     def update_data(self):