From 2aa7e5b7f58d283c2a807016f7654cbddaa060ac Mon Sep 17 00:00:00 2001 From: FindMalek Date: Sat, 30 Apr 2022 20:05:08 +0100 Subject: [PATCH] Removed the use of the library Spotipy. (It caused so many errors and inconsistesy in the code) --- Data/Playlists Informations.json | 226 ------------------ .../playlistHandeling.cpython-39.pyc | Bin 3035 -> 0 bytes .../__pycache__/trackHandeling.cpython-39.pyc | Bin 1780 -> 0 bytes .../playlistHandeling.cpython-39.pyc | Bin 3001 -> 0 bytes .../systemFunctions.cpython-39.pyc | Bin 2931 -> 0 bytes .../__pycache__/trackHandeling.cpython-39.pyc | Bin 1729 -> 0 bytes .../spotifyHandenler/requestsHandeling.py | 18 -- Settings.json | 11 - .../playlistHandeling.cpython-39.pyc | Bin 0 -> 2642 bytes .../systemFunctions.cpython-39.pyc | Bin 2948 -> 3101 bytes .../__pycache__/trackHandeling.cpython-39.pyc | Bin 0 -> 1779 bytes .../playlistHandeling.py | 69 +++--- .../systemFunctions.py | 8 + .../trackHandeling.py | 20 +- main.py | 68 +++--- .../requestsHandeling.cpython-39.pyc | Bin 0 -> 1625 bytes .../systemHandeling.cpython-39.pyc | Bin 0 -> 1008 bytes spotifyHandenler/requestsHandeling.py | 49 ++++ .../systemHandeling.py | 16 +- 19 files changed, 139 insertions(+), 346 deletions(-) delete mode 100644 Data/Playlists Informations.json delete mode 100644 Functions/SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc delete mode 100644 Functions/SyncifyFunctions/__pycache__/trackHandeling.cpython-39.pyc delete mode 100644 Functions/__pycache__/playlistHandeling.cpython-39.pyc delete mode 100644 Functions/__pycache__/systemFunctions.cpython-39.pyc delete mode 100644 Functions/__pycache__/trackHandeling.cpython-39.pyc delete mode 100644 Functions/spotifyHandenler/requestsHandeling.py delete mode 100644 Settings.json create mode 100644 SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc rename {Functions/SyncifyFunctions => SyncifyFunctions}/__pycache__/systemFunctions.cpython-39.pyc (75%) create mode 100644 SyncifyFunctions/__pycache__/trackHandeling.cpython-39.pyc rename {Functions/SyncifyFunctions => SyncifyFunctions}/playlistHandeling.py (58%) rename {Functions/SyncifyFunctions => SyncifyFunctions}/systemFunctions.py (92%) rename {Functions/SyncifyFunctions => SyncifyFunctions}/trackHandeling.py (72%) create mode 100644 spotifyHandenler/__pycache__/requestsHandeling.cpython-39.pyc create mode 100644 spotifyHandenler/__pycache__/systemHandeling.cpython-39.pyc create mode 100755 spotifyHandenler/requestsHandeling.py rename {Functions/spotifyHandenler => spotifyHandenler}/systemHandeling.py (66%) mode change 100644 => 100755 diff --git a/Data/Playlists Informations.json b/Data/Playlists Informations.json deleted file mode 100644 index d59a377..0000000 --- a/Data/Playlists Informations.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "Playlists Informations": [ - { - "heavy chill": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2738a2f9fa2bcc0c93703978a52ab67616d0000b273a49eff6d64cafc2551553380ab67616d0000b273a7e4d2b8e3514866dd34720bab67616d0000b273d6eb84f2391f9206d00f0660", - "Links": { - "URL": "https://open.spotify.com/playlist/4uau55EZrUw4hrQf4La32i", - "ID": "spotify:playlist:4uau55EZrUw4hrQf4La32i" - } - } - }, - { - "late nights mood": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b273a3a2cbd848c826ebe90d33e0ab67616d0000b273a3b3f48ca81acacb3ad4ec8aab67616d0000b273ad2af428ccc52bc175bab64bab67616d0000b273d68e7bf7f2092849bc7f2a9d", - "Links": { - "URL": "https://open.spotify.com/playlist/5ZKp6FwxfFlnLnq62qy4tW", - "ID": "spotify:playlist:5ZKp6FwxfFlnLnq62qy4tW" - } - } - }, - { - "just the mood to be sad": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2730bed9affdad909c9c4baf35dab67616d0000b2731624590458126fc8b8c64c2fab67616d0000b27367291695d95d55b5504156f1ab67616d0000b273a3b3f48ca81acacb3ad4ec8a", - "Links": { - "URL": "https://open.spotify.com/playlist/2kPyOGqApBFu5CuuJBsRfA", - "ID": "spotify:playlist:2kPyOGqApBFu5CuuJBsRfA" - } - } - }, - { - "A mixed mood": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b273066d0a5c0b2603ac06da7feaab67616d0000b27353f6fa0d2589c6a7174f4b81ab67616d0000b2737983ced300f3b01f99b01350ab67616d0000b273a7e4d2b8e3514866dd34720b", - "Links": { - "URL": "https://open.spotify.com/playlist/7sZPLbpT69BVVilpYe5p6O", - "ID": "spotify:playlist:7sZPLbpT69BVVilpYe5p6O" - } - } - }, - { - "One More Rep": { - "Image": "https://i.scdn.co/image/ab67706f0000000382894e9aedb86fd9f2f724db", - "Links": { - "URL": "https://open.spotify.com/playlist/37i9dQZF1DX5OUjSS1OMgV", - "ID": "spotify:playlist:37i9dQZF1DX5OUjSS1OMgV" - } - } - }, - { - "energy pill": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2730ea1ecb2d5271c2db402b0c2ab67616d0000b2731e76eaa664f5b71699066c72ab67616d0000b273822cf865426a24c2237f4747ab67616d0000b2739989949d5b4f76d1aa9e0304", - "Links": { - "URL": "https://open.spotify.com/playlist/4uhe84j6DaY22GObugBSwE", - "ID": "spotify:playlist:4uhe84j6DaY22GObugBSwE" - } - } - }, - { - "BERSERK": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb629e78f147374acf9bf8a748", - "Links": { - "URL": "https://open.spotify.com/playlist/62lE4LViAuBykovM5yq2zY", - "ID": "spotify:playlist:62lE4LViAuBykovM5yq2zY" - } - } - }, - { - "Anger.": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb717519cbb235eaadbd1de867", - "Links": { - "URL": "https://open.spotify.com/playlist/3TK5Tq4L9Q5P6YkFz70DiE", - "ID": "spotify:playlist:3TK5Tq4L9Q5P6YkFz70DiE" - } - } - }, - { - "Feel my rage.": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b27302add2c77fb6999e311a3248ab67616d0000b27373334683c071cfa000319c53ab67616d0000b2739989949d5b4f76d1aa9e0304ab67616d0000b273b5836f92f626bb4fe05b016a", - "Links": { - "URL": "https://open.spotify.com/playlist/4eBoEZ89xY9nqcVigCBoaU", - "ID": "spotify:playlist:4eBoEZ89xY9nqcVigCBoaU" - } - } - }, - { - "the holy": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2730c100c40bdedea776770e7aaab67616d0000b2734f41a332a8deb1ff7b9ebafeab67616d0000b27355a21bacb7082eff509ed279ab67616d0000b273e0c2d5b7d5842299671c7320", - "Links": { - "URL": "https://open.spotify.com/playlist/2lbgWON6x5EVK2kI5v6FQv", - "ID": "spotify:playlist:2lbgWON6x5EVK2kI5v6FQv" - } - } - }, - { - "a workout mix": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb0a2d723528b0c7c75c4fd2bf", - "Links": { - "URL": "https://open.spotify.com/playlist/1hRFW8th6zBKKqSh7Lf7dE", - "ID": "spotify:playlist:1hRFW8th6zBKKqSh7Lf7dE" - } - } - }, - { - "unleash the god within": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b27302add2c77fb6999e311a3248ab67616d0000b2734eaa6b95827dced309afbe04ab67616d0000b27373334683c071cfa000319c53ab67616d0000b27396b4163add6c85325f8961fd", - "Links": { - "URL": "https://open.spotify.com/playlist/3HyxE55XuaORFtL4SLKA7U", - "ID": "spotify:playlist:3HyxE55XuaORFtL4SLKA7U" - } - } - }, - { - "Coding playlist": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2730856770dd28cc929d052bcd3ab67616d0000b27398708da71a3cb39d6297a033ab67616d0000b273bc475d512ed99639f005bd8cab67616d0000b273d62dc29c6bf16a9059fd56e5", - "Links": { - "URL": "https://open.spotify.com/playlist/0fLFlZ3RPQPl72TuFBEXbg", - "ID": "spotify:playlist:0fLFlZ3RPQPl72TuFBEXbg" - } - } - }, - { - "Felt sad": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2731624590458126fc8b8c64c2fab67616d0000b2734627b6aa3c28314c2479c17bab67616d0000b273a3b3f48ca81acacb3ad4ec8aab67616d0000b273d68e7bf7f2092849bc7f2a9d", - "Links": { - "URL": "https://open.spotify.com/playlist/4295WQ4KvsUAtp3vAzC9NN", - "ID": "spotify:playlist:4295WQ4KvsUAtp3vAzC9NN" - } - } - }, - { - "The love mood.": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b27336b8b20d156605c4d5d1ee68ab67616d0000b273a3a2cbd848c826ebe90d33e0ab67616d0000b273a3b3f48ca81acacb3ad4ec8aab67616d0000b273f894be72a77b1488292672c7", - "Links": { - "URL": "https://open.spotify.com/playlist/43AE0H4dITYXiC3KziqTZK", - "ID": "spotify:playlist:43AE0H4dITYXiC3KziqTZK" - } - } - }, - { - "lovely": { - "Image": "https://i.scdn.co/image/ab67706c0000bebba617f0d86d3ebbc5cb909e2a", - "Links": { - "URL": "https://open.spotify.com/playlist/6VnR28qfPwj0zVbrKjFHug", - "ID": "spotify:playlist:6VnR28qfPwj0zVbrKjFHug" - } - } - }, - { - "get you into the mood": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb964946e8237a45269972071e", - "Links": { - "URL": "https://open.spotify.com/playlist/0Dt0CmBIUJ94JV7coMwYNg", - "ID": "spotify:playlist:0Dt0CmBIUJ94JV7coMwYNg" - } - } - }, - { - "Mind loop": { - "Image": "https://i.scdn.co/image/ab67706c0000bebbde1ebd51ef91b9c8b2761948", - "Links": { - "URL": "https://open.spotify.com/playlist/624UgHw3C3WllV8P9ynSB4", - "ID": "spotify:playlist:624UgHw3C3WllV8P9ynSB4" - } - } - }, - { - "Vibing": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb52ee089e6e4530825a9995b8", - "Links": { - "URL": "https://open.spotify.com/playlist/1u1oMXEiC9Y2Rwy8tcpgux", - "ID": "spotify:playlist:1u1oMXEiC9Y2Rwy8tcpgux" - } - } - }, - { - "just dark metal": { - "Image": "https://mosaic.scdn.co/640/ab67616d0000b2737cf2fa22321c862465e237daab67616d0000b2738d529980602b892735c091c7ab67616d0000b273f01ff2ac22f31e1dc480fb0bab67616d0000b273faf17a6ceb9fe1feada91ef0", - "Links": { - "URL": "https://open.spotify.com/playlist/7vjXezNk8qMwCsW4Xcg1Ll", - "ID": "spotify:playlist:7vjXezNk8qMwCsW4Xcg1Ll" - } - } - }, - { - "Vlad Holiday Radio": { - "Image": "https://seeded-session-images.scdn.co/v1/img/artist/4kzBapiIVMxwhJLsTm28Gc/en", - "Links": { - "URL": "https://open.spotify.com/playlist/37i9dQZF1E4yxe1Kpukk4E", - "ID": "spotify:playlist:37i9dQZF1E4yxe1Kpukk4E" - } - } - }, - { - "Vlad Holiday": { - "Image": "https://i.scdn.co/image/ab67706c0000bebb8f385797339261665713a76c", - "Links": { - "URL": "https://open.spotify.com/playlist/1sMJcXffo3LuUvt24KWKcL", - "ID": "spotify:playlist:1sMJcXffo3LuUvt24KWKcL" - } - } - } - ], - "Playlists links": [ - "https://open.spotify.com/playlist/4uau55EZrUw4hrQf4La32i", - "https://open.spotify.com/playlist/5ZKp6FwxfFlnLnq62qy4tW", - "https://open.spotify.com/playlist/2kPyOGqApBFu5CuuJBsRfA", - "https://open.spotify.com/playlist/7sZPLbpT69BVVilpYe5p6O", - "https://open.spotify.com/playlist/37i9dQZF1DX5OUjSS1OMgV", - "https://open.spotify.com/playlist/4uhe84j6DaY22GObugBSwE", - "https://open.spotify.com/playlist/62lE4LViAuBykovM5yq2zY", - "https://open.spotify.com/playlist/3TK5Tq4L9Q5P6YkFz70DiE", - "https://open.spotify.com/playlist/4eBoEZ89xY9nqcVigCBoaU", - "https://open.spotify.com/playlist/2lbgWON6x5EVK2kI5v6FQv", - "https://open.spotify.com/playlist/1hRFW8th6zBKKqSh7Lf7dE", - "https://open.spotify.com/playlist/3HyxE55XuaORFtL4SLKA7U", - "https://open.spotify.com/playlist/0fLFlZ3RPQPl72TuFBEXbg", - "https://open.spotify.com/playlist/4295WQ4KvsUAtp3vAzC9NN", - "https://open.spotify.com/playlist/43AE0H4dITYXiC3KziqTZK", - "https://open.spotify.com/playlist/6VnR28qfPwj0zVbrKjFHug", - "https://open.spotify.com/playlist/0Dt0CmBIUJ94JV7coMwYNg", - "https://open.spotify.com/playlist/624UgHw3C3WllV8P9ynSB4", - "https://open.spotify.com/playlist/1u1oMXEiC9Y2Rwy8tcpgux", - "https://open.spotify.com/playlist/7vjXezNk8qMwCsW4Xcg1Ll", - "https://open.spotify.com/playlist/37i9dQZF1E4yxe1Kpukk4E", - "https://open.spotify.com/playlist/1sMJcXffo3LuUvt24KWKcL" - ] -} \ No newline at end of file diff --git a/Functions/SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc b/Functions/SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc deleted file mode 100644 index 029b6a6f60c2a1c20e20802178cd819c31100719..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3035 zcmZ`*O>Y~=8J?N_;PO+n9Y~hjxI&$NFhIm4KBQ2MpoJBuDr6+R2Vn#{I#!z}E69Ea0*s58B_mmH;P6lTLT zS+*F^xaG%@p}pNl(AN=VY{BL%zp@&8>l*y+62^zCQ|+@HkQ(M+x*a z6;10LPfev*uySGkim3p}`IGL`bQE<*VH}-wchkXSgk9+F;WQawZ>#jdBpKMXmX-^{ zxY*Ng!bC&b48dMHn3%~;qwrD1iRt?A(L~-PlVdf zSS}V^ZA+2kKjqRn$IyF~XJsMEI)F&^N*EpCf| z|5(%z)89r=ucLNAyDUGV4Dr?S;~&UmxD1jn#2jqMz=pXvW^EpSZxwtA$ z?k=3UXY+3E=H9}c`?lm2rHU>2MJdRgQ!n@PN*?5%th^91cp--TjC1zI?P8{C?&MWj zy~i>?qg-v_kkA10`hf|`Yk$60?p<%u$!SHGKs6~^qlm6`M;Hgd+A8Ed3$^hGDm`1j z7~sMC7sJc^D~q@R`zXwsiyeEoAoj1xax-oW3Y-*JWDg2GGprTa>}@*Bh+wT-slVNL~x z6?6WI!X@SqhXgnztj$5r$)GaQ-C*F3N7^F&4F-0(KpIN05P#d5d%1V&%78e5R!{@* zZGG;O70f_;S=(TiF^@k1FI@b@kfi+%(|>xKar^%PalsjN8>^aal*iuv7+C3*t2n=T zrD8XIp2TS=^*QfaI?dee(cOuQKfL>-M(N(e4|ld|#`{RgNEu%1cVq_S7O9M8Gj0k_81Fez0_5^i+oN?DK7$h|=fB_s_32ed6FnT*?!ghTvf!`e zVRSdNiVJaqF4m&q+6iI$#Z4ewLr}kjZ9pEZ{76*DPgo832ALI-OZ*5) z2MR87+*c^LE1gYt4BzlV05g~Hl)go)2ej}AKsi7lJx5DIt+1j56zeDp+1P~FI74|} zfg(WTf%391wBGhxL%T|W_%AZBgIX;(rKAzEniV}4&?|7|-8pFs+T@u1B6k|dwKFc; znA!TZvgRK9;y<|ub-8w6nWDPbx@sZnh^3sogS_!G6%J0c@c`ini7lE+s4{wQSeG$# zw%*z@eB1aB?At?8M|G1T2hrCgxSi?+N7N<^#*5SEky3OEjjvOcMbdaGOz_0mfK9D0 zdy#}(@(x3(-h-vrmIYn+(}8{MEC+?d>06Si_o-FYuGTs|KD^49m5@GMK5Tx69;GM{ zWgH(O;CpSc&TFqA2(N^wy+rK4;k5ZWe_Nzj z4j&!G5k0xCZn`>7$JSfx6ZF&e84P`ESP!Z8X)Lbll(ZB*oO;WL#(27&hLh~+yUVxV zo2zHqb|LN;20hha%BpNtLEXhrcG>okX8nS78&+5Cm9&Rx7jS9GB(Tal{ovjxm6JGn bpN?1)H?U|Y5H1g#!1bNlYr*S5Gr09F=*so) diff --git a/Functions/SyncifyFunctions/__pycache__/trackHandeling.cpython-39.pyc b/Functions/SyncifyFunctions/__pycache__/trackHandeling.cpython-39.pyc deleted file mode 100644 index 668c5a1f2525813ed8860a3724fc213824715ea5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1780 zcmZuyOK)366rQ;c``UTpR!M_URRN;CRk0%>Wl=?;h%};r45}lbma6F1GfpqLugr|o z+PdB}MHIw_e~>Kumu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5Jii0aD1Wt$u4l=BXsYSi@SptzIWVx5^-|@Du>l2w zM$DX~OQQBDu=G?oljTmJ>9gqW0L!gq&|!(FlwhbWg>wTq-#r_6ho-p1ySXl(oCu^ONBRxV~`C&~0BOb+D^W)HPo zaWusrHO2PwAxM4hgJR2JBi`Ab|79PkbblIHhz~kouVLbVogD!)0uEu$=*Ivy`9VNz z&_eK1ys3aX${qD*>RQxIAgWa?-=(cLsCx_D_DjELbyQo2XZxJH`*$RoH7k(Wl;t)| zZfnN^6;M>?k+hyR%0|5`F=Pc>84<4{Ds?&G^n~Jn!bV&zi)=tyrQ;t>6R3t(20`$HF$^pGorKjCp&e?-gE)%?s?FDBwig=SgHY=!Y&r#%F04bFc zhuQ``)dl7Fs01ca#(HTX+WwDpPnQX4R&o;R$L&sH^>*{qXSYroW!>O?z4I=H!SWoFO zA??rbc6%8thd&9V4+Zo-EO&zyi#{{n;KJdbibAZCq`wz9Niik)@lnY`y9X_k_gdRw zYo(KP?xxKOLhf$gbTeB~xlw64GJSZheMPBKslP%Wyh`)(VG6ty#K-Y2Nt9ueZl-y! zREZi8c>O5^H3cE#f-i&NE8|g-U#9R=ygNToEs=;MF!79}B1=9P{SC4~lHKm->ziZa zy8yU}TmE3Os!Z-38dC5k$2pjG`!r&iWq4 HFslC_SwDV9 diff --git a/Functions/__pycache__/trackHandeling.cpython-39.pyc b/Functions/__pycache__/trackHandeling.cpython-39.pyc deleted file mode 100644 index a7dfaa294c9f170ff8a8336be6eab224a47ca975..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1729 zcmZuyOK)366rQ;c``UTpR!IY>ssKSR0y`2?7Eu&hkwz4dK{(=Jsj_Z8>!H zxjGzd?m*-oCPo-d$kBAAc6Ab`>oAvj&q&v0KC58$Sd|4>eO6<2tQF>TNVxPHJdluT z`fj^#+|Gv&C4hVckxwxxq9~*1&ctC(NlSWx0GCv`%sr=@2>!jZMK;OA9XCpH;gvX> zcwdv#F66dHlt22467#1j7ggq6QcAwX$u^|)n7>6>1yY3sn*3oT*ZUYt`brIWOrP#YwH*pWBl=O z&I|1)`C~3ZU$1pcGR3IZ;ZowWZp~i&EY424OIDp`-EGXWJ~BzqY|{_EUh80mFux}Oa! zUib)vBGPy#v`%lj4(5O^(}p7&u=Nd0^Wj0MK`aS=f}%)C&Z&4^q5LJe1R+o`6n;Xp z25j!jwqr5@RSw95HfXUkyZa3a3VJXXH@z+Rpd{Ov*$fS?*g>5gOP!}v>VPmiAk0o_ zm|JPG3*KQg)wiX<8( z;E1k7MZr<@;8Q-jCqynnPy0pEi&=MF*uvO?-8bQ81?>Un6RACug00zfdd2v!fn4^2 zypFBBfr$X?>rTV*usT+M71#$<+{9Vmd@vuT84dm}MBc$PZ@?eP4`e_Y+V5GQoad;= z0c3*80O^ehWnM|osCWx)=$6#rdkP(h`R(zIMf-dKic3)HahBu}lP{Isgf=X>29YMQ zV>maiO$yIRiB|w5K$xGMQ?E0nYUt=nEC+GIwf9{fXV^QeNSP}xQ>Y5z&s z_BC`8@4*&U_15AwXv&cUEf;(J+Cpv4Ilp)-g!#Gl39wwWNm-Xy@-VN)6trM3&Dk*F S`{uc@NEwU*H&_iCLH%#84XfY) diff --git a/Functions/spotifyHandenler/requestsHandeling.py b/Functions/spotifyHandenler/requestsHandeling.py deleted file mode 100644 index fa669b5..0000000 --- a/Functions/spotifyHandenler/requestsHandeling.py +++ /dev/null @@ -1,18 +0,0 @@ -import requests, base64 - -#Importing the Client_ID and Client_Secret -from systemHandeling import CLIENT_ID, CLIENT_SECRET - -#From Text to base64 -def convertBase64(string): - string_byte = string.encode('ascii') - base64_byte = base64.b64encode(string_byte) - base64_string = base64_byte.decode('ascii') - return base64_string - -authURL = "https://accounts.spotify.com/api/token" -authHeader = {} -authData = {} - -base64Client = convertBase64(f"{CLIENT_ID}:{CLIENT_SECRET}") -print(base64) \ No newline at end of file diff --git a/Settings.json b/Settings.json deleted file mode 100644 index 0fc0e24..0000000 --- a/Settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "System Os": "Linux", - "Settings": { - "Quality": "BEST", - "Format": "MP3", - "Paths": { - "Downloads": "/home/malek/Music/", - "Playlist": "/home/malek/Music/Playlists/Playlists for PC/" - } - } -} \ No newline at end of file diff --git a/SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc b/SyncifyFunctions/__pycache__/playlistHandeling.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3692471456ef87f681fdea07e9d230b4cf0e466c GIT binary patch literal 2642 zcmZ8j%WfRU6|Jg%Oi#~)V>=*4#<2+}Has@WaV#JR1i^?QnhpbsGDP{+fFZP|id36D z-J|Ln$sEiC0qAU#AJBqY<_EI$&OcGxth~twXd(IBn&}a(Zq)nHb?-TKZl|42%B zj_&=m#@PR;aryDk_zO~Xj7&1gbCxVho^Z59E=FGBaq9DO|IVTeQ2I%z8ZtQNNhDv9 z4H^BwlcsFS_y?B6vL)LnTe2g&DBE&P_E2^tKVtn?f5x}iVV~P8N8{3D$7eV4Ocmya zRuV;)<`u^Hd(+O5GA1ids-5quvY2k~rY0SHo~LJdR+(yhzc?=SC^cDGEM{0X6twm7 zA=@b3K&swCX4s6MbNw5`XH*k&QN%{n^_jrg_+j6(t*ko8iqlW>dy|n3QddOd<##dO zuFi@fj(w**RYek%_rBYgwo{QU5{RuG+NkEq)3w?s)iykJT1`WT-eB6Sy*RLb zk&cuNvr&4YDow7j-bClNqrNvv7ioSMt;#kWp2uf>VZASIA6T)!i)ye>%WOdWsHW>L zK6eR(%JN73*tP%>G4^jqw+=y>1(olPQ*+-&w^b_l_76U_o%&pEKnHXh|2Qk8^>S4> z^lX@p#|k~ouXJVj|{&yBMe_V>}iS_jwy!dtGda*z-lmyCUY|ng7gxE}n<&2xIzf z%>5My8|YYZ@Ly9%>%$sF3~!n=#@Jm=$g?@YDwreAze`|GqX4X2FFo zBjOBZflXlUIv9suFbDHxyulo!?tBH-`gn;!MemQS`p1WiyZ0O9l7UmLL*2otrW>_m z2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GXO0id@@M_9N!H z^1x&F6|aeGBJ6*Aoo9I}I%$-M!_H1V7^Nc9s?#fdEXKP#;#eek0elv!-BC8M0jrL4 z`(>1Ikzl`FjLmhYdXx-4tA(1&!1HrW!DH=(^klp2(mh%%)!D&N-> zQ~+T(MKUctSk~0+P2B-#Gi5vEr|zjg+0^z1l|M|qGY`r4aMNESmN41MTo*uhNe_x` zf@1#o=aOO|)+UIxIrTu4O4pRUP$ocTQe~FK3oT?8CHo_pC{vx|E*tm)WUCP?o1D*+ zr=!#aksHDyiN*=2V=7Tm2yh|%T8tk`nIpgQU0gIlk?hC3f4!ufOX4HzZl2_QAbqHe zZ$of-EV~=_Y7NA57t|`2>J~Zzv~RK|^D#0vzYX+5D%Y_$um={+7OW5PAnF0SMUnnS zekDW78TVd>n!O@3x&t{SQv#${PAQ6x9#eT|N`N!9_#R;n#DebR)?BL_ zh^v9EoJF&)D-in;>H~BKFm6rT5MH^&Bav|P2Rrh6C4F1WRAM!Z6Jh-4d7NR*+V>0{ zzNYRT54L7o=dpTf`I5Hk7L*6YQM62SIWk`JOpZDX>yG4b1JalhqD zJflQfVwg5~PtBTOtnGn)-pAIC(l*q7MW1v0Y1Sr5-CGU0Xib}e8kms)UVx5XS!O>Kdd zdXr5{vHBmC`*5b*ABihqODEZeu2q%G7|iNc+G?yo(Tla&xN>4q3l|TFdl2M0 k?70w~gG*7_SEPh6+)8skO2oEhk;5(YfSDIw3!7p6Ke0!=3IG5A literal 0 HcmV?d00001 diff --git a/Functions/SyncifyFunctions/playlistHandeling.py b/SyncifyFunctions/playlistHandeling.py similarity index 58% rename from Functions/SyncifyFunctions/playlistHandeling.py rename to SyncifyFunctions/playlistHandeling.py index ab2b00d..c4c5170 100644 --- a/Functions/SyncifyFunctions/playlistHandeling.py +++ b/SyncifyFunctions/playlistHandeling.py @@ -1,60 +1,51 @@ +import time + #importing Spotipy import spotipy from spotipy.oauth2 import SpotifyClientCredentials #importing systemFunctions -from Functions.SyncifyFunctions.systemFunctions import * +from SyncifyFunctions.systemFunctions import * + +#Importing spotifyHandeler +from spotifyHandenler.requestsHandeling import * + setting_path = "Settings.json" playlist_path = convertPath("Data/Playlists Informations.json") -#Log in Spotipy_Session -def SpotipySession(): - client_credentials_manager = SpotifyClientCredentials()#Spotify Client - return spotipy.Spotify(client_credentials_manager = client_credentials_manager) - -Spotipy_Session = SpotipySession() #get the needed informations to fill up the Playlist JSON file -def getPlaylistInformation(Spotipy_Session, toGet, link, playlist_ID=""): - if(toGet == "ID"): - if(isLinkAlbum(link)): - return "spotify:album:" + link[link.find("album/") + len("album/"):] - else: - return "spotify:playlist:" + link[link.find("playlist/") + len("playlist/"):] - - if(isLinkAlbum(link)): - spotipyResult = Spotipy_Session.album(link[link.find("album/") + len("album/"):]) +def getPlaylistInformation(syncifyToken, objId=""): + if(isLinkAlbum(objId)): + spotipyResult = album(syncifyToken, objId) else: - spotipyResult = Spotipy_Session.playlist(playlist_ID) - - if(toGet == "Name"): - return spotipyResult["name"] - elif(toGet == "Image URL"): - return spotipyResult["images"][0]["url"] - elif(toGet == "Playlist URL"): - return spotipyResult["external_urls"]["spotify"] + spotipyResult = playlist(syncifyToken, objId) + + return spotipyResult #Updates and Add Playlists from the Playlist JSON file -def RefreshPlaylistFile(Spotipy_Session): +def RefreshPlaylistFile(syncifyToken): SyncifySettings = getDataJSON(setting_path, "Settings") playlistFile = ReadFILE(playlist_path) playlist_list = [] for link in playlistFile["Playlists links"]: - playlist_ID = getPlaylistInformation(Spotipy_Session, "ID", link) - playlist_Name = getPlaylistInformation(Spotipy_Session, "Name", link, playlist_ID) - playlist_Image = getPlaylistInformation(Spotipy_Session, "Image URL", link, playlist_ID) - playlist_URL = getPlaylistInformation(Spotipy_Session, "Playlist URL", link, playlist_ID) + if(isLinkAlbum(link)): + spotifyObjId = link[link.find("album/") + len("album/"):] + else: + spotifyObjId = link[link.find("playlist/") + len("playlist/"):] - #Structure of the + spotipyResult = getPlaylistInformation(syncifyToken, spotifyObjId) + + #Structure of the playlist playlist_list.append( { - playlist_Name : { - "Image": playlist_Image, + spotipyResult["name"] : { + "Image": spotipyResult["images"][0]["url"], "Links": { - "URL": playlist_URL, - "ID": playlist_ID + "URL": spotipyResult["external_urls"]["spotify"], + "ID": spotifyObjId } } } @@ -76,19 +67,19 @@ def CreatePlaylist(order): for line in order["Order"]: playlistm3a.write(musicPath + line + "\n") - #Manage .m3u playlists -def PlaylistManager(Spotipy_Session, playlist_id): +def PlaylistManager(syncifyToken, playlist_id): SavifySettings = getDataJSON(setting_path, "Settings") downloadLocation = getDataJSON(setting_path, "Settings/Paths/Downloads") - playlist = Spotipy_Session.playlist(playlist_id) + playlistList = playlist(syncifyToken, playlist_id) pl_order = { - "Name": playlist["name"], + "Name": playlistList["name"], "Order": [] } + #ALBUM*TRACKLOCATION+TrackName - for track in playlist["tracks"]["items"]: + for track in playlistList["tracks"]["items"]: trackName = ( track["track"]["artists"][0]["name"] + ' - ' + track["track"]["name"] + '.' + diff --git a/Functions/SyncifyFunctions/systemFunctions.py b/SyncifyFunctions/systemFunctions.py similarity index 92% rename from Functions/SyncifyFunctions/systemFunctions.py rename to SyncifyFunctions/systemFunctions.py index 09bacce..fd0eef2 100644 --- a/Functions/SyncifyFunctions/systemFunctions.py +++ b/SyncifyFunctions/systemFunctions.py @@ -91,6 +91,14 @@ def deleteTemporaryFiles(path): os.remove(convertPath(path + '/.cache')) except OSError: pass + try: + shutil.rmtree(convertPath(path + '/Functions/__pycache__')) + except: + pass + try: + shutil.rmtree(convertPath(path + '/Functions/SyncifyFunctions/__pycache__')) + except: + pass #Checks if a link is playlist or album def isLinkAlbum(link): diff --git a/Functions/SyncifyFunctions/trackHandeling.py b/SyncifyFunctions/trackHandeling.py similarity index 72% rename from Functions/SyncifyFunctions/trackHandeling.py rename to SyncifyFunctions/trackHandeling.py index f457900..9c16219 100644 --- a/Functions/SyncifyFunctions/trackHandeling.py +++ b/SyncifyFunctions/trackHandeling.py @@ -1,27 +1,29 @@ -from Functions.SyncifyFunctions.systemFunctions import * -from Functions.SyncifyFunctions.playlistHandeling import * import time +#Importing Syncify functions +from SyncifyFunctions.systemFunctions import * +from SyncifyFunctions.playlistHandeling import * + #Get {Artist} - {Trackname}.{format} -def trackInformation(Spotipy_Session, trackLink): +def trackInformation(syncifyToken, trackLink): trackFormat = getDataJSON(setting_path, "Settings/Format") - spotifyTrackFormat = "spotify:track:" + trackLink[trackLink.find("track/") + len("track/"):] + spotifyTrackFormat = trackLink[trackLink.find("track/") + len("track/"):] while True: try: - trackResult = Spotipy_Session.track(spotifyTrackFormat) + trackResult = track(syncifyToken, spotifyTrackFormat) break except Exception: time.sleep(1.25) - + return trackResult["artists"][0]["name"] + ' - ' + trackResult["name"] + '.' + trackFormat.lower() #Returns playlist songs in whatever order -def getTracks(pl_id): +def getTracks(syncifyToken, pl_id): if(isLinkAlbum(pl_id)): - resultTrackItems = Spotipy_Session.album(pl_id)["tracks"]["items"] + resultTrackItems = album(syncifyToken, pl_id)["tracks"]["items"] else: - resultTrackItems = Spotipy_Session.playlist(pl_id)["tracks"]["items"] + resultTrackItems = playlist(syncifyToken, pl_id)["tracks"]["items"] track_links = [] for item in resultTrackItems: diff --git a/main.py b/main.py index 85fbf4d..9accfb2 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ __title__ = "Syncify" __author__ = "Malek Gara-Hellal" __email__ = 'malekgarahellalbus@gmail.com' -__version__ = '1.0.6' +__version__ = '1.0.6.1' @@ -11,29 +11,28 @@ from savify.utils import PathHolder from savify.logger import Logger -#importing Spotipy -import spotipy +#Importing spotifyHandeler +from spotifyHandenler.requestsHandeling import * #importing systemFunctions import logging, json, shutil, os, fnmatch -from Functions.SyncifyFunctions.systemFunctions import * +from SyncifyFunctions.systemFunctions import * +from spotifyHandenler.systemHandeling import * #Setting up needed files SettingUp() +setting_path = "Settings.json" +playlist_path = convertPath("Data/Playlists Informations.json") #Importing playlistHandeling -from Functions.SyncifyFunctions.playlistHandeling import * +from SyncifyFunctions.playlistHandeling import * #Importing trackHandeling -from Functions.SyncifyFunctions.trackHandeling import * - - -setting_path = "Settings.json" -playlist_path = convertPath("Data/Playlists Informations.json") +from SyncifyFunctions.trackHandeling import * #Downloader -def Downloads(Spotipy_Session): +def Downloads(syncifyToken): #Get time before downloading the music and then compare every #music that its created time is later than that time and move it to #newly downloaded music @@ -60,8 +59,8 @@ def Downloads(Spotipy_Session): #Download each song individually tracksPath = getDataJSON(setting_path, "Settings/Paths/Downloads") - for link in getTracks(Playlists[counterPlaylist][playlist_Name]["Links"]["ID"]): - track = trackInformation(Spotipy_Session, link) + for link in getTracks(syncifyToken, Playlists[counterPlaylist][playlist_Name]["Links"]["ID"]): + track = trackInformation(syncifyToken, link) if(isDownloaded(track) == False): print(f"Downloading > {track[:-4]}") Session.download(link) @@ -72,17 +71,17 @@ def Downloads(Spotipy_Session): print("\n>Download is finished! All songs are downloaded.") #print the name of the playlist and the description -def printPlaylist(link, Spotipy_Session): +def printPlaylist(link, syncifyToken): if(isLinkAlbum(link) == False): - playlist_ID = "spotify:playlist:" + link[link.find("playlist/") + len("playlist/"):] - Result = Spotipy_Session.playlist(playlist_ID) + playlist_ID = link[link.find("playlist/") + len("playlist/"):] + Result = playlist(syncifyToken, playlist_ID) print(f"\n\t{Result['name']}\n{Result['description']}\n{Result['owner']['display_name']} • {len(Result['tracks']['items'])} songs.") else: album_ID = link[link.find("album/") + len("album/"):link.find("?")] while True: try: - Result = Spotipy_Session.album(album_ID) + Result = album(syncifyToken, album_ID) except Exception: time.sleep(1.25) @@ -98,13 +97,13 @@ def AddLink(list): WriteJSON(playlist_path, playlistLinks, 'w') #Add playlists to the settings.json "Playlists Informations" -def AddPlaylist(Spotipy_Session): +def AddPlaylist(syncifyToken): link, listPL = ".", [] while(link != ""): link = input("\n.Enter playlist link: ") if(link != ""): #Print the name of the playlist and the description - printPlaylist(link, Spotipy_Session) + printPlaylist(link, syncifyToken) if("?" in link): listPL.append(link[:link.find("?")]) else: @@ -114,7 +113,7 @@ def AddPlaylist(Spotipy_Session): AddLink(listPL) #updating the playlists -def PlaylistUpdate(): +def PlaylistUpdate(syncifyToken): playlist_list = getDataJSON(playlist_path, "Playlists Informations") playlistID_list = [] for playlist in playlist_list: @@ -123,7 +122,7 @@ def PlaylistUpdate(): for pl_id in playlistID_list: if(isLinkAlbum(pl_id) == False): - pl_order = PlaylistManager(Spotipy_Session, pl_id) + pl_order = PlaylistManager(syncifyToken, pl_id) CreatePlaylist(pl_order) print("\n>All playlist files are created.") @@ -131,7 +130,7 @@ def PlaylistUpdate(): popAlbums() #Print the load text, load the savify client -def Load(Spotipy_Session): +def Load(syncifyToken): printLoad(0, 18) settingFile = ReadFILE(setting_path) @@ -146,9 +145,9 @@ def Load(Spotipy_Session): playlistFile = getDataJSON(playlist_path, "Playlists Informations") if(playlistFile == []): - AddPlaylist(Spotipy_Session) + AddPlaylist(syncifyToken) -#download ettings +#Download settings def DownloadSettings(Savify): SavifySettings = ReadFILE(setting_path)["Settings"] @@ -171,6 +170,7 @@ def DownloadSettings(Savify): return qual, download_format +#Add information in settings file def addInformation(stroption, info, infoList, Settings): infoEntered = '.' while(infoEntered not in infoList): @@ -181,27 +181,27 @@ def addInformation(stroption, info, infoList, Settings): return Settings #Select which action the user wants -def SelectCommand(Spotipy_Session): +def SelectCommand(syncifyToken): printLoad(19, 42) #Printing for the user answer = input("Choose the number of the command: ") if(answer == "1"): #Enter Playlists Informations - AddPlaylist(Spotipy_Session) + AddPlaylist(syncifyToken) elif(answer == "2"): #Downloads newly added songs and Refresh playlists #And move Outdated Playlists to the Outdated folder #It keeps a version of each playlist - RefreshPlaylistFile(Spotipy_Session) - Downloads(Spotipy_Session) - PlaylistUpdate() + RefreshPlaylistFile(syncifyToken) + Downloads(syncifyToken) + PlaylistUpdate(syncifyToken) elif(answer == "3"): SavifyPlaylists = ReadFILE(playlist_path)["Playlists Informations"] for playlist in SavifyPlaylists: playlistLink = playlist[list(playlist.keys())[0]]["Links"]["URL"] - printPlaylist(playlistLink, Spotipy_Session) + printPlaylist(playlistLink, syncifyToken) input() elif(answer == "4"): @@ -257,10 +257,12 @@ def SelectCommand(Spotipy_Session): print("") quit() + #Main if __name__ == '__main__': - Spotipy_Session = SpotipySession() - Load(Spotipy_Session) + syncifyToken = getAccessToken(CLIENT_ID, CLIENT_SECRET) + + Load(syncifyToken) while(True): - SelectCommand(Spotipy_Session) + SelectCommand(syncifyToken) deleteTemporaryFiles(os.getcwd()) \ No newline at end of file diff --git a/spotifyHandenler/__pycache__/requestsHandeling.cpython-39.pyc b/spotifyHandenler/__pycache__/requestsHandeling.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63ee07591dea44dadec24dbf9dd6f719a3131f66 GIT binary patch literal 1625 zcmb7EO=}!C7?w02JNxAr=ff$X#Vu`M3h|H-atNk0@fu@s_DulWU`usQnF|D$V9{R_Udue7_a<3k}D=KUIt-dE4_O0?T;AsD^i^1+`TLVp?O z=5WCI5ng!=f+2=;6fZQ6vGqwzK$F}#Ld;?A?(P>risGvDNi+WW$E_kVAbT}!~?0B-$PkQ{E=hX-@ zL~>Lq`1FRBjF&kVk>KyfTq{S{%5yH%Yg=<*wr&K%E>z*eNlQrAccp3W9@*~c<;=e zk7(xCJ`27;fM~NneSE6aNWP3Bnx@qlwz<9B%XV575glcbs?KqPhdAxRi-qICSl{ zb+AHAyQ4}f?G9yCh7H}^eY?NcKT7s{y1O(F_jV8Vj^YM|GJZLD8@G({#-@k^WA`9S z+*we&Ym1B9g2TQ_$$uIQEy)XEPK;hV;p&ww>BwyL4#ea-2!vhxY>*BP@I5RZLM%01 zyBa3+#CB$(#TWUhM$~eqVIq&uQZ| zr-F;E>7#2#M%gE1oIj1Oa1>%;iVGca7nF9OcyZqZeC=68wNnj-nq(|)!nY+ZZHVoa z?B^;gRqTUvz~yZm?k<_%FOMrxSaRhfSXtV8g#`b&&N|*8;wy-K(x#?muVLtbV_K8p z8ec4rtxxm8xR96F{(DJ;Syp^$ggJ0GxbW=E?;t4cLBPUX4xg8;Im+oI&*1clEwlR9 zM%>C1tmcI9ah2*@us<)AuLMoc{wI%TCp@{4= Q3EZF&bb=OWH*f;{FJStBG5`Po literal 0 HcmV?d00001 diff --git a/spotifyHandenler/__pycache__/systemHandeling.cpython-39.pyc b/spotifyHandenler/__pycache__/systemHandeling.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a64f32544aecb24ad9cc77643248e82c90f8d4f7 GIT binary patch literal 1008 zcmZ`&y>8nu5GM6!S#^dCEjk56mqbIVrBe{30c;0xQFy4cL`xuxtfN>K1(J3m!=2Ix zamKz9*G_$fqC=08lcr5dfcMAK-SPXVWNRxxuztPD#$y|y@5Xt&Acl@%%To{(QJkZ= z(KyDnZ^ah1sQneiHg%{A+F{Nu!ib@@OT9ZBdkkH*);?{4-KKbiLjMO;L&Ma_`(=S) zx^-d8JrD}I-Qq7sTcGg@DSQQ;4$%tNmU9S`Ks9%`+}S@OgQA=(vO78-b_XZt7u}D8 z{_yN#(AzyA%Qyc$AN9MR`e%@%x1W5eU;Yznl0#d&nQ5jiE_I6)i%jq$v|>NaGghbp zjXRAsVyR&28xk$J&(E{ylFwK)OL8`idOV%aAX!GEsz|fX)xF;Du?5R{nH7^rmR!Nn zX;M&D;s%02fzL7Nt-cT3NhH~TY-*83BC=$hGr4>h^f;;boLnamR~*t5 z6VE5VCwo;?gg`W|!nSZ>Q0+~ag37`(jt!1>OOX{y7&Nt;^J^w*9JRx4G8JNN3s%-_ zHo^d|gY=T6)Ba5+RR?@&1j0Lp2i(CP7Te(efhP=_<~ES2134d;f~QQ%x>1w+0zS~~ rhZkJWCrnwrwFx#bJ(|S4Fj0@=AI>