Walkyst / lavaplayer-fork

Apache License 2.0
174 stars 68 forks source link

Issue with custom branch and ip rotator #31

Closed rohank05 closed 2 years ago

rohank05 commented 2 years ago

It happens when i add ip rotator version 0.2.3 and try to build it

  1. artworkUrl - cannot find symbol variable artworkUrl
  2. YoutubeAudioSourceManager - no suitable constructor found for YoutubeAudioSourceManager(boolean,String,String)

using gradle 7.4 openJDK 15

error log:

1 actionable task: 1 executed
D:\BeatMusic\src\main\java\me\rohank05\commands\music\NowPlayingCommand.java:18: error: cannot find symbol
        MessageEmbed embed = new EmbedBuilder().setColor(16760143).setTitle("Now Playing").addField("Track Name", "["+currentTrack.getInfo().title+"]("+currentTrack.getInfo().uri+")", true).addField("By", currentTrack.getInfo().author,true).setThumbnail(currentTrack.getInfo().artworkUrl).build();
                                                                                                                                                                                                                                                                                    ^
  symbol:   variable artworkUrl
  location: class AudioTrackInfo
D:\BeatMusic\src\main\java\me\rohank05\utilities\music\TrackManager.java:74: error: cannot find symbol
                MessageEmbed embed = new EmbedBuilder().setTitle("Now Playing").setColor(16760143).setTitle("Now Playing").addField("Title", "["+track.getInfo().title+"]("+track.getInfo().uri+")", true).setThumbnail(track.getInfo().artworkUrl).build();
                                                                                                                                                                                                                                       ^
  symbol:   variable artworkUrl
  location: class AudioTrackInfo
D:\BeatMusic\src\main\java\me\rohank05\utilities\music\PlayerManager.java:51: error: no suitable constructor found for YoutubeAudioSourceManager(boolean,String,String)
        this.audioPlayerManager.registerSourceManager(new YoutubeAudioSourceManager(true, "", ""));
                                                      ^
    constructor YoutubeAudioSourceManager.YoutubeAudioSourceManager() is not applicable
      (actual and formal argument lists differ in length)
    constructor YoutubeAudioSourceManager.YoutubeAudioSourceManager(boolean) is not applicable
      (actual and formal argument lists differ in length)
    constructor YoutubeAudioSourceManager.YoutubeAudioSourceManager(boolean,YoutubeTrackDetailsLoader,YoutubeSearchResultLoader,YoutubeSearchMusicResultLoader,YoutubeSignatureResolver,YoutubePlaylistLoader,YoutubeLinkRouter,YoutubeMixLoader) is not applicable
      (actual and formal argument lists differ in length)
D:\BeatMusic\src\main\java\me\rohank05\utilities\music\PlayerManager.java:80: error: cannot find symbol
                        .setThumbnail(track.getInfo().artworkUrl)
                                                     ^
  symbol:   variable artworkUrl
  location: class AudioTrackInfo
4 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
18:56:37: Execution finished 'build'.

As soon as i remove ip rotator dependency it start to work

Walkyst commented 2 years ago

Can you show your build.gradle file? Also you just showed to everyone login and password to your google account

rohank05 commented 2 years ago

Thanks for letting me know. I have changed the password.

plugins {
    id 'java'
    id 'application'
    id "com.github.johnrengelman.shadow" version "7.1.2"
}

group 'me.rohank05'
version '1.0.0'

mainClassName = "me.rohank05.Bot"

repositories {
    maven { url 'https://m2.dv8tion.net/releases' }
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
}

dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
    //Bot stuff
    implementation (group: 'net.dv8tion', name: 'JDA', version: '5.0.0-alpha.9'){
        exclude module: 'opus-java'
    }
    implementation group: 'com.github.walkyst', name: 'lavaplayer-fork', version: 'fc6b9de7e7'
    implementation group: 'com.sedmelluq', name: 'lavaplayer-ext-youtube-rotator', version: '0.2.1'
    implementation group: 'com.github.natanbc', name: 'lavadsp', version: '0.7.7'
    implementation group: 'me.rohank05', name: 'lavadsp-extended', version: '0.0.2'
    implementation group: 'io.github.cdimascio', name: 'dotenv-java', version: '2.2.0'
    implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.8'
    implementation group: 'com.sedmelluq', name: 'jda-nas', version: '1.1.0'
    implementation group: 'me.rohank05', name: 'Topis-Source-Managers', version: '125dc466f6'
    implementation group: 'com.github.Topis-Lavalink-Plugins', name: 'jda-paginator', version: 'v2.0.1'
}

test {
    useJUnitPlatform()
}

shadowJar {
    def impl = project.configurations.implementation
    impl.canBeResolved(true)
    configurations = [impl]
    archiveClassifier.set("")
}

compileJava.options.encoding = 'UTF-8'

I have tried using https://github.com/Walkyst/lavaplayer-fork-youtube-rotator/tree/custom It works but it makes all the custom source manager like spotify by topis useless

Walkyst commented 2 years ago

Try completely remove rotator dep, all extensions already shipped with lavaplayer

rohank05 commented 2 years ago

Thanks that worked. Did not know it was in-built