Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works with recent beet version, basic http auth support #4

Merged
merged 12 commits into from
May 26, 2018

Conversation

nico202
Copy link
Contributor

@nico202 nico202 commented May 24, 2018

Hi, I wasn't able to use it with beet 1.4.5, now it's working. Also, in order to prevent having my music public on the internet I added a basic HTTP auth support.
Code quality is low, it's just an hack to get it working, if you are still using it you might use some code

@maxammann
Copy link
Owner

Woop woop cool! will look over it tomorrow :) Looks like there is actually some interrest in the music-cyclon app.

And actually I see a usage again in my day-to-day use :)

@nico202
Copy link
Contributor Author

nico202 commented May 24, 2018

A couple of comments: the password storage is unsafe (and the input is plain text), I'm passing username/password around and maybe a class "Account" would be cleaner. The library subfolder customization is untested. Right now I'm creating the output dir as /$library/$artist/$title_$id.$(lowercase(extension)), I don't know if it's possible to ask beets for a filename (and probably the string must be converted into a path to fix encodings). Also, I'm removing duplicates from the download list because it happened to me that it was trying to download 10 times the same 10 songs. The list -> set -> list thing I'm doing is stupid, it might word using a set by default.

@nico202
Copy link
Contributor Author

nico202 commented May 24, 2018

PS: thanks for the app, that has a clean code. I'm not a java dev but it took me a really short time to fix problems and adding things :)

Copy link
Owner

@maxammann maxammann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see the inputTypes as critical :)


// I don't want to support proprietary things
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahah 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops sorry XD I forgot to delete it before committing

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its ok though :) I'm no longer the only user and I dont user poweramp anymore because I'm google apps free :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment on it

@@ -92,6 +97,10 @@ public BeetsFetcher(String address, Resources resources) {
for (ArrayList<Item> album : randomAlbums) {
items.addAll(album);
}
// terrible way to remove duplicates
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ok and very fast way to remove duplicates. It would be cool though if you could remove the List and only use a Set.

Copy link
Contributor Author

@nico202 nico202 May 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes just using the Set everywhere is better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

<EditTextPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input type should be text

<EditTextPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input type should be text

<EditTextPreference
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Input type should be password

@maxammann
Copy link
Owner

Also bump the app version so fdroid can update the app :)

@nico202
Copy link
Contributor Author

nico202 commented May 25, 2018

I'll fix those in a new commit and squash everything after the review

@maxammann
Copy link
Owner

@nico202 Ok, but dont squash everything. Squash commits that belong together

@maxammann
Copy link
Owner

Btw does the integration with the beets server still work? :P Can't test it right now, maybe in the evening

@nico202
Copy link
Contributor Author

nico202 commented May 25, 2018

Btw does the integration with the beets server still work? :P Can't test it right now, maybe in the evening

You mean "does it sync"? The answer is "now yes".

Can't get input type to be a password, fixed other things, let me know what's missing

@maxammann
Copy link
Owner

Just tested it, works good :) Thanks

@nico202
Copy link
Contributor Author

nico202 commented May 25, 2018

Fine, small refactor done, thanks!

@maxammann maxammann merged commit c826593 into maxammann:master May 26, 2018
@nico202
Copy link
Contributor Author

nico202 commented May 26, 2018

Perfect! Can you tag the release? :)

@maxammann
Copy link
Owner

Will do when I push the update to fdroid. Btw if you are interrested in supporting another open source project take a look at https://integreat-app.de/en/

We just won the Google Impact Challange :)

@maxammann
Copy link
Owner

@nico202 I opened a MR for fdroid: https://gitlab.com/fdroid/fdroiddata/merge_requests/3277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants