Skip to content

Commit

Permalink
clean ups
Browse files Browse the repository at this point in the history
  • Loading branch information
khjxiaogu committed Oct 12, 2020
1 parent 538162f commit e2830cc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.khjxiaogu</groupId>
<artifactId>MiraiSongPlugin</artifactId>
<version>0.1.16</version>
<version>0.1.17</version>
<name>MiraiSongPlugin</name>
<description>使用“#音乐 关键词”、“#QQ 关键词”、“#网易 关键词”等方式进行点歌的插件。</description>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@
import com.khjxiaogu.MiraiSongPlugin.musicsource.NetEaseMusicSource;
import com.khjxiaogu.MiraiSongPlugin.musicsource.QQMusicSource;

import net.mamoe.mirai.console.extensions.BotConfigurationAlterer;
import net.mamoe.mirai.console.internal.extension.GlobalComponentStorage;
import net.mamoe.mirai.console.plugin.jvm.JavaPlugin;
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription;
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescriptionBuilder;
import net.mamoe.mirai.console.plugin.jvm.SimpleJvmPluginDescription;
import net.mamoe.mirai.event.EventHandler;
import net.mamoe.mirai.event.Events;
import net.mamoe.mirai.event.SimpleListenerHost;
Expand All @@ -46,7 +42,6 @@
import net.mamoe.yamlkt.YamlElement;
import net.mamoe.yamlkt.YamlLiteral;
import net.mamoe.yamlkt.YamlMap;
import net.mamoe.yamlkt.YamlPrimitive;

// TODO: Auto-generated Javadoc
/**
Expand Down Expand Up @@ -160,7 +155,7 @@ public BiConsumer<MessageEvent, String[]> makeSearchesTemplate(String card) {
continue;
}
try {
if(mi.source=="QQ音乐"&&cb instanceof LightAppCardProvider)
if(mi.source.equals("QQ音乐")&&cb instanceof LightAppCardProvider)
Utils.getRealSender(event).sendMessage(cards.get("XML").process(mi, Utils.getRealSender(event)));
else
Utils.getRealSender(event).sendMessage(cb.process(mi, Utils.getRealSender(event)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.google.gson.JsonObject;
import com.khjxiaogu.MiraiSongPlugin.MusicCardProvider;
import com.khjxiaogu.MiraiSongPlugin.MusicInfo;
import com.khjxiaogu.MiraiSongPlugin.Utils;

import net.mamoe.mirai.contact.Contact;
import net.mamoe.mirai.message.data.LightApp;
import net.mamoe.mirai.message.data.MessageChain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class NetEaseHQMusicSource extends NetEaseMusicSource {

public NetEaseHQMusicSource() {
}
@Override
public String queryRealUrl(String id) throws Exception {
JsonObject params = new JsonObject();
params.add("ids", new JsonPrimitive("[" + id + "]"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package com.khjxiaogu.MiraiSongPlugin.musicsource;

import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
import com.khjxiaogu.MiraiSongPlugin.MusicInfo;
import com.khjxiaogu.MiraiSongPlugin.MusicSource;
import com.khjxiaogu.MiraiSongPlugin.NetEaseCrypto;
import com.khjxiaogu.MiraiSongPlugin.Utils;

public class NetEaseMusicSource implements MusicSource {
Expand Down

0 comments on commit e2830cc

Please sign in to comment.