diff options
Diffstat (limited to 'module/plugins/crypter/YoutubeComFolder.py')
-rw-r--r-- | module/plugins/crypter/YoutubeComFolder.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py index 3c794e956..4a5c688aa 100644 --- a/module/plugins/crypter/YoutubeComFolder.py +++ b/module/plugins/crypter/YoutubeComFolder.py @@ -3,9 +3,8 @@ import re import urlparse -from module.common.json_layer import json_loads -from module.plugins.internal.Crypter import Crypter -from module.utils import save_join as fs_join +from module.plugins.internal.Crypter import Crypter, create_getInfo +from module.plugins.internal.utils import fs_join, json class YoutubeComFolder(Crypter): @@ -15,7 +14,7 @@ class YoutubeComFolder(Crypter): __status__ = "testing" __pattern__ = r'https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_play_list)(/|.*?[?&](?:list|p)=)(?P<ID>[\w\-]+)' - __config__ = [("activated", "bool", "Activated", True), + __config__ = [("activated" , "bool", "Activated" , True), ("use_subfolder" , "bool", "Save package to subfolder" , True ), ("subfolder_per_pack", "bool", "Create a subfolder for each package", True ), ("likes" , "bool", "Grab user (channel) liked videos" , False), @@ -34,7 +33,7 @@ class YoutubeComFolder(Crypter): req.update({'key': self.API_KEY}) url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref) html = self.load(url, get=req) - return json_loads(html) + return json.loads(html) def get_channel(self, user): @@ -147,3 +146,6 @@ class YoutubeComFolder(Crypter): self.packages.append((p_name, p_urls, p_folder)) #: Folder is NOT recognized by pyload 0.4.9! addedvideos.extend(p_videos) + + +getInfo = create_getInfo(YoutubeComFolder) |