예제 #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
예제 #2
0
 def custum_description(self, index, limit_index, text):
     description_stan = index in self.WindowSize and limit_index in self.WindowSize
     Error.throw_error_bool(
         index + " or " + limit_index + " not found in WindowSize ",
         description_stan)
     data = self.WindowSize[index]
     limit = self.WindowSize[limit_index]
     self.BaseView.description(stringManipupations.short(text, limit), data)
예제 #3
0
 def description(self):
     description_stan = 'description' in self.WindowSize and 'description_limit' in self.WindowSize
     Error.throw_error_bool(
         'description or description_limit not found in WindowSize ',
         description_stan)
     data = self.WindowSize['description']
     limit = self.WindowSize['description_limit']
     self.BaseView.description(
         stringManipupations.short(self.data.description, limit), data)
예제 #4
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)
         })
예제 #5
0
 def title(self, grid, seriesItem, item, Obj):
     font = Obj['section']['font']
     strings_in_title = Obj['section']['strings_in_title']
     title = QtWidgets.QLabel(grid)
     title.setObjectName("seriesTitle")
     title.setText("<html><head/><body><span style=\" font-size:" +
                   str(font) + " px; font-weight:600; \">"
                   "" +
                   stringManipupations.short(item.name, strings_in_title) +
                   "</span></body></html>")
     seriesItem.addWidget(title, 0, 0, 1, 2)
예제 #6
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)
예제 #7
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