@@ -320,11 +320,11 @@ def get_title_for_clip(self, clip):
320320 @staticmethod
321321 def extract_clip_title_values (clip ):
322322 viewers = clip .get (Keys .VIEW_COUNT )
323- viewers = viewers if (viewers or isinstance (viewers , int )) else i18n ( 'unknown_viewer_count' )
323+ viewers = viewers if (viewers or isinstance (viewers , int )) else ''
324324
325325 streamer = clip .get (Keys .BROADCASTER_NAME )
326326 title = clip .get (Keys .TITLE )
327- game = clip .get (Keys .GAME_NAME ) if clip .get (Keys .GAME_NAME ) else i18n ( 'unknown_game' )
327+ game = clip .get (Keys .GAME_NAME ) if clip .get (Keys .GAME_NAME ) else ''
328328 broadcaster_language = clip .get (Keys .LANGUAGE ) if clip .get (Keys .LANGUAGE ) else i18n ('unknown_language' )
329329
330330 return {'streamer' : streamer ,
@@ -342,13 +342,16 @@ def extract_search_title_values(stream):
342342 streamer = stream .get (Keys .DISPLAY_NAME ) \
343343 if stream .get (Keys .DISPLAY_NAME ) else stream .get (Keys .BROADCASTER_LOGIN )
344344 title = stream .get (Keys .TITLE ) if stream .get (Keys .TITLE ) else i18n ('untitled_stream' )
345- game = stream .get (Keys .GAME_NAME ) if stream .get (Keys .GAME_NAME ) else i18n ( 'unknown_game' )
345+ game = stream .get (Keys .GAME_NAME ) if stream .get (Keys .GAME_NAME ) else ''
346346 broadcaster_language = stream .get (Keys .BROADCASTER_LANGUAGE ) \
347347 if stream .get (Keys .BROADCASTER_LANGUAGE ) else i18n ('unknown_language' )
348+ viewers = stream .get (Keys .VIEWER_COUNT )
349+ viewers = viewers if (viewers or isinstance (viewers , int )) else ''
348350
349351 return {'streamer' : streamer ,
350352 'title' : title ,
351353 'game' : game ,
354+ 'viewers' : viewers ,
352355 'broadcaster_language' : broadcaster_language }
353356
354357 def get_title_for_stream (self , stream ):
@@ -358,11 +361,11 @@ def get_title_for_stream(self, stream):
358361 @staticmethod
359362 def extract_stream_title_values (stream ):
360363 viewers = stream .get (Keys .VIEWER_COUNT )
361- viewers = viewers if (viewers or isinstance (viewers , int )) else i18n ( 'unknown_viewer_count' )
364+ viewers = viewers if (viewers or isinstance (viewers , int )) else ''
362365
363366 streamer = stream .get (Keys .USER_NAME ) if stream .get (Keys .USER_NAME ) else stream .get (Keys .USER_LOGIN )
364367 title = stream .get (Keys .TITLE ) if stream .get (Keys .TITLE ) else i18n ('untitled_stream' )
365- game = stream .get (Keys .GAME_NAME ) if stream .get (Keys .GAME_NAME ) else i18n ( 'unknown_game' )
368+ game = stream .get (Keys .GAME_NAME ) if stream .get (Keys .GAME_NAME ) else ''
366369 broadcaster_language = stream .get (Keys .LANGUAGE ) if stream .get (Keys .LANGUAGE ) else i18n ('unknown_language' )
367370
368371 return {'streamer' : streamer ,
@@ -378,11 +381,11 @@ def get_title_for_video(self, video):
378381 @staticmethod
379382 def extract_video_title_values (video ):
380383 viewers = video .get (Keys .VIEW_COUNT )
381- viewers = viewers if (viewers or isinstance (viewers , int )) else i18n ( 'unknown_viewer_count' )
384+ viewers = viewers if (viewers or isinstance (viewers , int )) else ''
382385
383386 streamer = video .get (Keys .USER_NAME ) if video .get (Keys .USER_NAME ) else video .get (Keys .USER_LOGIN )
384387 title = video .get (Keys .TITLE ) if video .get (Keys .TITLE ) else i18n ('untitled_stream' )
385- game = video .get (Keys .GAME_NAME ) if video .get (Keys .GAME_NAME ) else i18n ( 'unknown_game' )
388+ game = video .get (Keys .GAME_NAME ) if video .get (Keys .GAME_NAME ) else ''
386389 broadcaster_language = video .get (Keys .LANGUAGE ) if video .get (Keys .LANGUAGE ) else i18n ('unknown_language' )
387390
388391 return {'streamer' : streamer ,
@@ -396,10 +399,11 @@ def extract_channel_title_values(channel):
396399 streamer = channel .get (Keys .DISPLAY_NAME ) if channel .get (Keys .DISPLAY_NAME ) else channel .get (Keys .NAME )
397400 title = channel .get (Keys .TITLE ) if channel .get (Keys .TITLE ) else i18n ('untitled_stream' )
398401 game = channel .get (Keys .GAME ) if channel .get (Keys .GAME ) else channel .get (Keys .META_GAME )
399- game = game if game else i18n ( 'unknown_game' )
402+ game = game if game else ''
400403 viewers = channel .get (Keys .CURRENT_VIEWERS ) \
401- if (channel .get (Keys .CURRENT_VIEWERS ) or isinstance (channel .get (Keys .CURRENT_VIEWERS ), int )) else i18n ('unknown_viewer_count' )
402- broadcaster_language = channel .get (Keys .BROADCASTER_LANGUAGE ) if channel .get (Keys .BROADCASTER_LANGUAGE ) else i18n ('unknown_language' )
404+ if (channel .get (Keys .CURRENT_VIEWERS ) or isinstance (channel .get (Keys .CURRENT_VIEWERS ), int )) else ''
405+ broadcaster_language = channel .get (Keys .BROADCASTER_LANGUAGE ) \
406+ if channel .get (Keys .BROADCASTER_LANGUAGE ) else i18n ('unknown_language' )
403407
404408 return {'streamer' : streamer ,
405409 'title' : title ,
0 commit comments