Skip to content

Commit

Permalink
update deps and remove user id from config
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasVolkmann committed Feb 17, 2019
1 parent 245c2b7 commit 204220d
Show file tree
Hide file tree
Showing 23 changed files with 794 additions and 821 deletions.
21 changes: 11 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.gradle
.idea
/build
/out

/other

/access-token
/refresh-token
/test-config.yml
.gradle
.idea
/build
/out

/other

/access-token
/refresh-token
/test-config.yml
*.log
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ To customize the application, edit the
and fill in your own information.

```yaml
#Spotify user ID
userId: YOUR_USER_ID

# Add an entry for each playlist you want to update
playlists:
# First Playlist, based on the top tracks from last week
Expand Down Expand Up @@ -89,11 +86,6 @@ flairsToExclude:
minimumLength: 100
```
##### Spotify User ID
To find your Spotify user ID, click your profile, click the `...` and select `Share` > `Copy Spotify URI`.
The last numerical part is your user ID.

##### Spotify Playlist ID
To find the ID of your playlist, right click it, select `Share` > `Copy Spotify URI`.
The last part is your playlist's ID.
Expand Down Expand Up @@ -163,8 +155,7 @@ Use `schedule` to define when the lists should be updated. If the current date d

Example config:
```yaml
userId: xyz
playlists:
...
schedule:
Expand Down
25 changes: 9 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.2.61'
id 'org.jetbrains.kotlin.jvm' version '1.3.21'
id "com.github.ben-manes.versions" version "0.20.0"
}

ext {
ktor_version = '0.9.3'
spotify_api_vesrion = '2.0.4'
ktor_version = '1.1.2'
spotify_api_vesrion = '2.1.2'
jrawVersion = '1.1.0'
junit_version = '5.2.0'
junit_version = '5.4.0'
}

group 'me.avo'
version '0.7.0'
version '0.7.1'

task stage(dependsOn: ['fatJar', 'clean'])
build.mustRunAfter clean
Expand All @@ -29,8 +29,6 @@ task fatJar(type: Jar) {
}

repositories {
maven { url "http://dl.bintray.com/kotlin/ktor" }
maven { url "https://dl.bintray.com/avo/arkenv" }
jcenter()
}

Expand All @@ -50,11 +48,11 @@ dependencies {
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile 'org.kodein.di:kodein-di-generic-jvm:5.0.0'
compile 'com.github.salomonbrys.kotson:kotson:2.5.0'
compile 'org.yaml:snakeyaml:1.22'
compile 'com.apurebase:arkenv:1.0.2'
compile 'org.apache.commons:commons-text:1.4'
compile 'org.yaml:snakeyaml:1.23'
compile 'com.apurebase:arkenv:1.4.1'
compile 'org.apache.commons:commons-text:1.6'

testCompile group: 'org.amshove.kluent', name: 'kluent', version: '1.41'
testCompile group: 'org.amshove.kluent', name: 'kluent', version: '1.47'
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junit_version
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit_version"
}
Expand All @@ -78,9 +76,4 @@ compileKotlin {
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
kotlin {
experimental {
coroutines "enable"
}
}
99 changes: 48 additions & 51 deletions example_config.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,49 @@
#Spotify user ID
userId: YOUR_USER_ID

# Add an entry for each playlist you want to update
playlists:
# First Playlist, based on the top tracks from last week
- id: YOUR_PLAYLIST_ID

# How many tracks should the list contain at max?
maxSize: 10

# What subreddit do you want to target?
subreddit: trance

# can be either of: HOT, NEW, RISING, CONTROVERSIAL, TOP
sort: TOP

# can be either of: HOUR, DAY, WEEK, MONTH, YEAR, ALL
# Only applies when sort is set to CONTROVERSIAL or TOP
timePeriod: WEEK

# Minimum number of upvotes that a reddit post needs to have before being considered
minUpvotes: 10

# Whether to look for the exact mix or allow other versions
isStrictMix: true

# Second Playlist, based on the top tracks from all time
- id: YOUR_OTHER_PLAYLIST_ID
maxSize: 10
subreddit: trance
sort: TOP
timePeriod: ALL
# Omit minUpvotes to allow any reddit post to be added

# set this to true, if the playlist is private
isPrivate: true

# When a reddit post has any of the following flairs, it will be excluded
flairsToExclude:
- Mix
- Liveset
- Radio
- Show
- Album
- Upcoming
- AMA
- Concluded
- RIP

# minimum length of tracks in seconds in order to be added to the playlists
# Add an entry for each playlist you want to update
playlists:
# First Playlist, based on the top tracks from last week
- id: YOUR_PLAYLIST_ID

# How many tracks should the list contain at max?
maxSize: 10

# What subreddit do you want to target?
subreddit: trance

# can be either of: HOT, NEW, RISING, CONTROVERSIAL, TOP
sort: TOP

# can be either of: HOUR, DAY, WEEK, MONTH, YEAR, ALL
# Only applies when sort is set to CONTROVERSIAL or TOP
timePeriod: WEEK

# Minimum number of upvotes that a reddit post needs to have before being considered
minUpvotes: 10

# Whether to look for the exact mix or allow other versions
isStrictMix: true

# Second Playlist, based on the top tracks from all time
- id: YOUR_OTHER_PLAYLIST_ID
maxSize: 10
subreddit: trance
sort: TOP
timePeriod: ALL
# Omit minUpvotes to allow any reddit post to be added

# set this to true, if the playlist is private
isPrivate: true

# When a reddit post has any of the following flairs, it will be excluded
flairsToExclude:
- Mix
- Liveset
- Radio
- Show
- Album
- Upcoming
- AMA
- Concluded
- RIP

# minimum length of tracks in seconds in order to be added to the playlists
minimumLength: 100
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
10 changes: 5 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
Loading

0 comments on commit 204220d

Please sign in to comment.