Open TFTomSun opened 8 years ago
Hello, Tom. Yes, I'm still maintaining. I will glad to any help you can do. :) Right now I have no access to PC and wrote from phone. I will be available after 18 October and will text you. :)
Ok, i have already added a generic batch collection method that does the new next_ref based pagination. I saw that u have already added it somewhere, but I think it didn't work yet, since you never handled the next_ref parameter. It seems also that some duplicated code can be eliminated by using generics.
So current status: I can get all my likes in one call ( over 400). And if we refactor all collection calls that way it should work for the other entities, too. I'm checkin now if the offset parameter has any function, when the next_ref pagination is used.
The offset doesn't make sense anymore. I think it only works for the first 200 entries. When you specify an offset higher than 200 you'll always get back 0 results. So it's probably better to remove that parameter.
I've added a new method to get the reposters of a track. But its only possible using the V2 API.
Whats the reason behind the duplication of the entities? Seems that you've defined always two entities for the same thing (e.g. Track and SCTrack). Whats the reason for it? I just wanted to add a method that returns the reposts of a users and i felt a bit annoyed by defining the Repost entity 2 times incl. a converter.
Update: I did a complete refactoring... removed all the duplicated entities and converters and implemented a proper serialization to the type safe value types instead. I guess that decreased the lines of code about 40 percent and while keeping all existing functionality and increasing simplicity and maintainability.
Update2: During testing my refactored I discovered that the explore API doesn't work. Can you confirm that? When I analyze with fiddler, you get those personalized tracks calls. I guess that the explore API is not up to date...
@TFTomSun What's the status? Is SoundCloud Client fully functional as a PCL?
@theweavrs yes I have a fully functional PCL, including some bugfixes and additional functionality that is not available in kipwokers version. Unfortunatelly, kipwoker didn't contact me... so the sources are not yet integrated into github. I can send you a copy of the sources. Is there a private message system on github? If so, just send me a message.
You can send it here. Just make a .zip and then drag and drop it into comment box.
@TFTomSun Why not commit all the code into your forked repo? Or I can commit it into my forked version, if you want.
My current source control system is Visual Studio Online. Everything is there, so I don't want to start mixing between multiple source control systems. There are some few extensions that I used from my framework, that you would have to reimplement... actually basic reflection stuff like getting a field value. If you need help on this, just tell me. And you will have to create a new project file, because I have a MSBuild target framework that allows me to minimize the project file content. My portable class library settings (see attachment). SoundCloud.API.Client.zip
Ah i forgot to mention the nuget packages. You need to add: Zlib.Portable JSON.NET
Alright, thanks. I will let you know if I need help :)
btw. I would like to provide nuget packages for my stuff. If you know any framework that automatically detects project references and creates separate nuget packages for them... let me know.
@TFTomSun Why are you targeting Windows 8 and not 10?
when you target windows 8, windows 10 is included. Windows 8 support is actually a subset. I started using portable class libraries several years ago. Up to now I was not forced to shrink the platform support... so I simply keep the support as long as I don't need to change it.
I'll probably switch to .NET standard libraries when they support MSBuild as build platform and Xamarin, Windows App Development, Linux and Mac as Platforms. As far as I know this is planned for Visual Studio 15
@TFTomSun .NET Standard is a beast compared to PCL but PCL does the Windows work and support for Xamarin makes it enough. I would love to help you with porting this to .NET Standard. It would be cool to have this on Linux.
actually it should be possible to reference PCL in .NET Core. So I think you can already use it on Linux. .NET Standard has a bigger set of functionality. But there are 2 things that I don't like at the moment:
However the bigger functional set is a big plus... so maybe I live with the second point.... lets see.
@theweavrs btw. just looked at your profile... I think we have alot of common code. I have a portable TagLib version and also a Youtube mp3 downloader. What I planned to do is a conversion from Soundcloud playlists to YouTube playlists and some offline synchronization for myself.
@TFTomSun You can use FFmpeg for conversion of mp3 into flv/mp4 with a static image (album art) and then use Youtube API to upload it into a playlist. Of course, that's a rough way to do things.
@theweavrs no what i meant is actually a logic that finds the songs that i have liked on soundcloud in YouTube and create a YouTube playlist out of it. I have some algorithm that calculates whether to songs matches (based on their length, title and search result order in YouTube) I think there a legal issues if you simply upload songs from someone without asking for his/her permission.
@TFTomSun If the Youtube video is titled correctly or if it is an official video, there is usually a patterned title: Artist - Title
. 90% of the time you will get the correct video by alternating these two. Adding length
match to it will actually decrease the match % because videos are usually longer than the actual song. Additionally, you can search in description for title
and artist
matches.
@TFTomSun @theweavrs Sorry guys. I totally forget about this issue and was offline during weekend. I will write here when i will have time to modify repository.
@kipwoker What a surprise! Glad to have you back. Waiting desperately for the updated SoundCloud Client in the repo.
@theweavrs its actually not that easy the soundcloud title often contains nonsense like out now or now on spotify. Also sometimes the artist is part of the title and sometimes the artist is the poster. I do the duration check with a limit of 5 seconds difference...actually i calculate a probability value that indicates whether i can automatically use one of the youtube search results or whether i need to show the most probable search results to the user so he can select on his own. Additionally there are multiple uploads of the same song,sometimes with different quality ..that might also be a criteria for the algorithm.
@TFTomSun How accurate is your algorithm? You must have carried out some tests.
Hello KipWoker,
are u still actively maintaining this API? I've adapted the source code to make it portable, but I was a bit disappointed to see that the pagination is not yet switched to the inofficial but working linked_partitioning way. With "offset" and "limit" parameters you don't get all items (e.g. from the users likes).
If you still work on the API, I would like to share my portable solution, but I never contributed to github yet, so i don't know how it works. There would also be some further steps to do. Currently i switched the web handling to TPL but I didn't change all methods to async yet. Shouldn't be a big thing, but a breaking interface change, of course.
Further steps (beside WebRequest adaption) I had to do:
If you r not yet familiar with Portable Class libraries, this is what you get:
Best regards, Tom