#lavasrc - Spotify Local Files
1 messages · Page 1 of 1 (latest)
It is on purpose
Since there is no guarantee on which fields may be set we just skip those
no plans to add optional support for it (such as a setting)? i format my local files 🥲
Not really, since I really don't want to have to deal with unset fields lol
It's not about you formatting local files
Others do not
I've never heard of anyone
Since people using local files usually don't even have Spotify
it’s only for unreleased/leaked/edited versions of songs to be honest
hmm interesting
question, would it be possible for me to edit lavasrc and add support for local files? 🤔
i’ve worked with java only like once or twice, but i’ll attempt to do it
and test everything first
i’ll post some results here when i work on it 🤝
Do you set the isrc for local files?
Since that would make resolving way more reliable
Just as a general tip
i sadly do not
Well, I'm not saying all need it,
yeah i’ll sift thru and see if there’s any i can add isrc to, thanks for the suggestion
what meta data do you think should be optional? obviously local files don’t have the same meta data as actual songs but for example song title and artists is what i’m gonna set as mandatory so far and the rest is gonna be null if not found, what else do you think should be mandatory?
well, there is one thing which is 100% needed
without title there isn't anything to match
alrighty then i’ll just make title and artists mandatory just to make it a tad bit easier finding a match
the only reason why i wanna do artists is because that’s one of the ways to know if people actually formatted their local files
just set author to unknown if there is none
lavaplayer is very strict about which fields are nullable and which not
alrighty
so uri artworkUrl and isrc are able to be nullable but title cant, author can be unknown if need be and length, identifier and isStream is from yt correct?
length, identifier and isStream is from yt correct
no
tracks are resolved on playback
not on search
it's all data from spotify
hey so i got local files to work but i ran into an issue, when a local file track is loaded most of the time duration is mismatched since local files can rly be edited into anything and there could be multiple versions so i think when tracks are loaded from youtube duration should be updated. also the second issue is the url is null obviously cuz there isnt one so i also think that url should be updated to the youtube one if there isnt a spotify url.
are you able to do that? if not how can i go about doing that because ive been searching thru lavaplayer and lavalink but i cant find where spotify metadata gets used to search on youtube 🥲
?
Since tracks are resolved at playtime not possible
There is I reason I skipped them
¯_(ツ)_/¯
damn so no possible way what so ever? thing is i know that v3 supported local files and there was no issues there..
alrighty, for local use then i wanted to make the local file just search on youtube inside of the spotify getPlaylist function do you have any idea why youtube is returning no search results?
if (track.get("is_local").asBoolean(false)) {
String trackName = track.get("name").text();
String artistName = track.get("artists").index(0).get("name").text();
String searchTerm = "ytsearch:" + track.get("name").text() + " " + track.get("artists").index(0).get("name").text();
AudioSearchResult searchResult = youtubeSearchManager.loadSearch(searchTerm, Collections.singleton(AudioSearchResult.Type.TRACK));
if (searchResult != null && !searchResult.getTracks().isEmpty()) {
tracks.add(searchResult.getTracks().get(0));
System.out.println("match found")
} else {
System.out.println("no match found");
}
} else {
tracks.add(this.parseTrack(track, preview));
}
that's not how mirroring works in lavasrc
it is intended to mirror at playtime
this is a feature and not a bug
if there is not enough info, than thats it
what if someone doesn't want to resolve tracks from yt?
but deezer instead
thats why i was just gonna edit the plugin and keep it local
cuz tbh i dont see any production-worthy way of allowing local files
you mean as in with the local file?
yes
well i filled in almost everything really
this is what its searching for yt for one of the songs for example: ytsearch:We Did It Kid (feat. Baby Keem & Migos) Kanye West
which shouldve came back with results
but im not getting any sadly
comes back with results for me
yes, I searched normal
here which is inside of the spotifysourcemanager, nothing
no errors or anything either
I mean, I have no idea where this yt source manager is coming from
¯_(ツ)_/¯
but this also seems to use the search manager
which uses a different endpoint to get search results
yt infact only supports texts on that endpoint
i imported it
import com.github.topi314.lavasrc.youtube.YoutubeSearchManager;
import com.github.topi314.lavasearch.result.AudioSearchResult;
import com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager;
private YoutubeSearchManager youtubeSearchManager = new YoutubeSearchManager(() -> new YoutubeAudioSourceManager());
so then what should i be doing?
im so confused man, i dont rly use java so i dont rly know what tf im doing 😭
ended up just allowing local files then when i load the local files back in my bot when i get the search details id research for it and replace it with the youtube info then play the playlist
surprisingly doesn’t even take that long for a 600 song playlist
you can close this, thanks for your help on trying to work on it thru lavasrc but it was too hard for me tbh 😭
topi actually did it btw, chad
wrong
Please note `uri` & `iscr` will be `null` & `identifier` will be `"local"`
you mean isrc right?
Oh damn, clapann chad
nice typo yes
should be fixed
chad