fix bug of index
@@ -5,7 +5,7 @@ import os
from bgmi.config import SAVE_PATH
from bgmi.front.base import BaseHandler, COVER_URL
-from bgmi.models import STATUS_NORMAL, STATUS_UPDATING, STATUS_END, Followed
+from bgmi.models import STATUS_NORMAL, STATUS_UPDATING, STATUS_END, Followed, STATUS_FOLLOWED
from bgmi.utils import normalize_path
@@ -37,13 +37,7 @@ def get_player(bangumi_name):
class MainHandler(BaseHandler):
def get(self, type_=''):
-
- data = Followed.get_all_followed(STATUS_NORMAL, STATUS_UPDATING)
-
- followed = list(map(lambda b: b['bangumi_name'], data))
- followed.extend(list(map(lambda b: b['bangumi_name'], self.patch_list)))
-
- data = Followed.get_all_followed(STATUS_NORMAL, STATUS_UPDATING if not type_ == 'old' else STATUS_END)
+ data = Followed.get_all_followed(STATUS_FOLLOWED, STATUS_UPDATING if not type_ == 'old' else STATUS_END)
if type_ == 'index':
data.extend(self.patch_list)
