Skip to content

Commit fcc59ee

Browse files
committed
print url to the new playlist when finished
1 parent c7a1309 commit fcc59ee

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/discover_weekly_archivist/core.clj

+8-4
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@
4444
(str (#(f/unparse (f/formatters :year-month-day) %) (get-monday-from-week (t/now))) " Discover Weekly"))
4545

4646
(defn do-transfer [user-id, token, name, public?]
47-
(let [playlist-name (if (not (nil? name)) name (create-playlist-name))]
48-
(sptfy-playlist-copier/do-copy :user-id user-id :token token :playlist-name-to-copy "Discover Weekly" :playlist-name-new playlist-name :public? public?)
49-
(println "Done")))
47+
(let [playlist-name (if (not (nil? name)) name (create-playlist-name))
48+
{:keys [new-playlist-id]} (sptfy-playlist-copier/do-copy :user-id user-id
49+
:token token
50+
:playlist-name-to-copy "Discover Weekly"
51+
:playlist-name-new playlist-name
52+
:public? public?)]
53+
(println (str "Success: https://open.spotify.com/user/" user-id "/playlist/" new-playlist-id))))
5054

5155
(defn -main [& args]
5256
(let [{:keys [options arguments errors summary]} (cli/parse-opts args cli-options)]
@@ -61,4 +65,4 @@
6165
(:login options)
6266
(:token options)
6367
(:name options)
64-
(:public options))))
68+
(:public options))))

0 commit comments

Comments
 (0)