Esempio n. 1
0
    def return_data(self):
        self.data_info = []
        self.data_info.append({
            "itemNmae":
            "Views / Likes",
            "itemName2":
            str(self.BaseView.data.views) + ' / ' +
            str(self.BaseView.data.likes)
        })
        self.data_info.append({
            "itemNmae": "Favourite",
            "itemName2": str(self.BaseView.data.favourite)
        })
        self.data_info.append({
            "itemNmae": "Series",
            "itemName2": str(len(self.BaseView.data.series))
        })

        self.data_info.append({
            "itemNmae":
            "Movies",
            "itemName2":
            str(self.movies_count(self.BaseView.data.series))
        })

        if len(self.BaseView.data.tags) > 0:
            self.data_info.append({
                "itemNmae":
                "Tags",
                "itemName2":
                stringManipupations.short(
                    stringManipupations.array_to_string(
                        self.BaseView.data.tags), self.tag_limit)
            })
        return self.data_info
Esempio n. 2
0
 def add_tags(self):
     if len(self.BaseView.data.tags) > 0:
         self.data_info.append({
             "itemNmae":
             "Tags",
             "itemName2":
             stringManipupations.short(
                 stringManipupations.array_to_string(
                     self.BaseView.data.tags), self.tag_limit)
         })
Esempio n. 3
0
 def tags(self):
     tag_stan = 'tags' in self.WindowSize and 'tags_limit' in self.WindowSize
     Error.throw_error_bool('tags or tags_limit not found in WindowSize ',
                            tag_stan)
     data = self.WindowSize['tags']
     limit = self.WindowSize['tags_limit']
     Error.throw_error_bool('self.data do not have tags ',
                            hasattr(self.data, 'tags'))
     tags_list = stringManipupations.array_to_string(self.data.tags)
     self.BaseView.description(stringManipupations.short(tags_list, limit),
                               data)
Esempio n. 4
0
    def return_data(self):
        self.data_info = []

        if self.BaseView.data.years:
            self.data_info.append({
                "itemNmae": "Year",
                "itemName2": self.BaseView.data.years
            })

        if self.BaseView.data.country:
            self.data_info.append({
                "itemNmae": "Country",
                "itemName2": self.BaseView.data.country
            })

        if len(self.BaseView.data.sezons) != len(self.BaseView.data.movies):
            self.data_info.append({
                "itemNmae":
                "Sezons",
                "itemName2":
                str(len(self.BaseView.data.sezons))
            })

        self.data_info.append({
            "itemNmae": "Movies",
            "itemName2": str(len(self.BaseView.data.movies))
        })

        self.data_info.append({
            "itemNmae":
            "Views / Likes",
            "itemName2":
            str(self.BaseView.data.views) + ' / ' +
            str(self.BaseView.data.likes)
        })

        self.data_info.append({
            "itemNmae": "Favourite",
            "itemName2": str(self.BaseView.data.favourite)
        })
        if len(self.BaseView.data.tags) > 0:
            self.data_info.append({
                "itemNmae":
                "Tags",
                "itemName2":
                stringManipupations.short(
                    stringManipupations.array_to_string(
                        self.BaseView.data.tags), self.tag_limit)
            })

        return self.data_info