Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #230 from takayamaki/feature-add-new-nicovideo-cat…
Browse files Browse the repository at this point in the history
…egory

ニコニコ動画の新カテゴリ追加に対応
  • Loading branch information
takayamaki authored Nov 16, 2018
2 parents 14c5ef4 + 2123f11 commit 529aa97
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
35 changes: 20 additions & 15 deletions app/javascript/mastodon/features/nicovideo/rankings/categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@ export default [
{ value: 'music', label: '音楽' },
{ value: 'ent', label: 'エンターテイメント' },
{ value: 'jikkyo', label: '実況プレイ動画' },
{ value: 'radio', label: 'ラジオ' },
{ value: 'sport', label: 'スポーツ' },
{ value: 'science', label: '科学' },
{ value: 'cooking', label: '料理' },
{ value: 'g_politics', label: '政治' },
{ value: 'play', label: '演奏してみた' },
{ value: 'dance', label: '踊ってみた' },
{ value: 'nicoindies', label: 'ニコニコインディーズ' },
{ value: 'asmr', label: 'ASMR' },
{ value: 'mmd', label: 'MMD' },
{ value: 'virtual', label: 'バーチャル' },
{ value: 'animal', label: '動物' },
{ value: 'history', label: '歴史' },
{ value: 'cooking', label: '料理' },
{ value: 'nature', label: '自然' },
{ value: 'travel', label: '旅行' },
{ value: 'sport', label: 'スポーツ' },
{ value: 'lecture', label: 'ニコニコ動画講座' },
{ value: 'play', label: '演奏してみた' },
{ value: 'dance', label: '踊ってみた' },
{ value: 'draw', label: '描いてみた' },
{ value: 'drive', label: '車載動画' },
{ value: 'history', label: '歴史' },
{ value: 'train', label: '鉄道' },
{ value: 'g_politics', label: '政治' },
{ value: 'science', label: '科学' },
{ value: 'tech', label: 'ニコニコ技術部' },
{ value: 'imas', label: 'アイドルマスター' },
{ value: 'handcraft', label: 'ニコニコ手芸部' },
{ value: 'make', label: '作ってみた' },
{ value: 'toho', label: '東方' },
{ value: 'imas', label: 'アイドルマスター' },
{ value: 'radio', label: 'ラジオ' },
{ value: 'draw', label: '描いてみた' },
{ value: 'trpg', label: 'TRPG' },
{ value: 'are', label: '例のアレ' },
{ value: 'diary', label: '日記' },
{ value: 'other', label: 'その他' },
{ value: 'nicoindies', label: 'ニコニコインディーズ' },
{ value: 'travel', label: '旅行' },
{ value: 'drive', label: '車載動画' },
{ value: 'handcraft', label: 'ニコニコ手芸部' },
{ value: 'make', label: '作ってみた' },
];
2 changes: 1 addition & 1 deletion app/workers/scheduler/nicovideo_ranking_scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def perform
service = NicovideoRankingService.new

logger.info 'Update niconico ranking cache'
tags = %w(all game sing anime vocaloid music ent jikkyo radio sport science cooking g_politics animal history nature lecture play dance draw tech imas toho are diary other nicoindies travel drive handcraft make)
tags = %w(all game sing anime vocaloid music ent jikkyo radio sport science cooking g_politics animal history nature lecture play dance draw tech imas toho are diary other nicoindies travel drive handcraft make asmr mmd virtual train trpg)

ranking = tags.map {|tag| [tag, service.call(tag, true)]}.to_h
Redis.current.publish('nicovideo:ranking:streaming', Oj.dump(event: 'update', payload: ranking))
Expand Down

0 comments on commit 529aa97

Please sign in to comment.