A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: Deprecate Google Drive support and remove BTFS support

+3 -244
+2
CHANGELOG.md
··· 5 - **Improve audio playback, processing and error handling**. 6 - **Added collections, an alternative to playlists**. Tracks can only appear once in a collection and cannot be ordered. 7 - **Basic setup for themes**. 8 - No longer resets shuffle history when the collection or search changes. 9 - WebDAV improvements. 10 - Command palette improvements.
··· 5 - **Improve audio playback, processing and error handling**. 6 - **Added collections, an alternative to playlists**. Tracks can only appear once in a collection and cannot be ordered. 7 - **Basic setup for themes**. 8 + - **Deprecated Google Drive support**. Google Drive sources can still be used, but no longer added through the UI. 9 + - Removed BTFS support. 10 - No longer resets shuffle history when the collection or search changes. 11 - WebDAV improvements. 12 - Command palette improvements.
+1 -2
README.md
··· 21 - [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) 22 - [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/) 23 - [Dropbox](https://dropbox.com/) 24 - - [Google Drive](https://drive.google.com/) 25 - [IPFS](https://ipfs.io/) 26 - [WebDAV](https://en.wikipedia.org/wiki/WebDAV) 27 ··· 41 42 Diffuse is a static web application, which means it's just HTML, CSS, and Javascript. No REST API, database, or anything backend-related involved. The app uses a hash (aka. fragment-based) routing system, so you don't need any special server rules for routing. You can download a pre-build web-only version of Diffuse on the [releases](https://github.com/icidasset/diffuse/releases) page. Diffuse uses service workers, so you may need HTTPS for it to work smoothly in certain browsers. 43 44 - I should also note that some source services use OAuth, so you'll need to use your own application credentials (eg. Google Drive client ID + secret). That said, if you're working locally, you can use `http://localhost:8000` or `http://127.0.0.1:44999` to use the default ones, that's what the old Electron app was using. 45 46 In short: 47 - Diffuse is a static, serverless web application
··· 21 - [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) 22 - [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/) 23 - [Dropbox](https://dropbox.com/) 24 - [IPFS](https://ipfs.io/) 25 - [WebDAV](https://en.wikipedia.org/wiki/WebDAV) 26 ··· 40 41 Diffuse is a static web application, which means it's just HTML, CSS, and Javascript. No REST API, database, or anything backend-related involved. The app uses a hash (aka. fragment-based) routing system, so you don't need any special server rules for routing. You can download a pre-build web-only version of Diffuse on the [releases](https://github.com/icidasset/diffuse/releases) page. Diffuse uses service workers, so you may need HTTPS for it to work smoothly in certain browsers. 42 43 + I should also note that some source services use OAuth, so you'll need to use your own application credentials (eg. Dropbox). That said, if you're working locally, you can use `http://localhost:8000` or `http://127.0.0.1:44999` to use the default ones, that's what the old Electron app was using. 44 45 In short: 46 - Diffuse is a static, serverless web application
-13
src/Core/Themes/Sunrise/Sources/Form.elm
··· 226 AzureFile -> 227 corsWarning "CORS__Azure" 228 229 - Btfs -> 230 - corsWarning "CORS__BTFS" 231 - 232 Dropbox -> 233 [] 234 ··· 414 415 AzureFile -> 416 nothing 417 - 418 - Btfs -> 419 - howNote 420 - [ inline [ "font-semibold" ] [ text "Diffuse will try to use the default local gateway" ] 421 - , text "." 422 - , lineBreak 423 - , text "If you would like to use another gateway, please provide it below." 424 - , lineBreak 425 - , text "This is basically the same as the IPFS implementation, just with a different prefix." 426 - ] 427 428 Dropbox -> 429 howNote
··· 226 AzureFile -> 227 corsWarning "CORS__Azure" 228 229 Dropbox -> 230 [] 231 ··· 411 412 AzureFile -> 413 nothing 414 415 Dropbox -> 416 howNote
-5
src/Library/Sources.elm
··· 43 = AmazonS3 44 | AzureBlob 45 | AzureFile 46 - | Btfs 47 | Dropbox 48 | Google 49 | Ipfs ··· 59 , ( "azure_blob", AzureBlob ) 60 , ( "azurefile", AzureFile ) 61 , ( "azure_file", AzureFile ) 62 - , ( "btfs", Btfs ) 63 , ( "dropbox", Dropbox ) 64 , ( "google", Google ) 65 , ( "ipfs", Ipfs ) ··· 105 106 AzureFile -> 107 False 108 - 109 - Btfs -> 110 - True 111 112 Dropbox -> 113 False
··· 43 = AmazonS3 44 | AzureBlob 45 | AzureFile 46 | Dropbox 47 | Google 48 | Ipfs ··· 58 , ( "azure_blob", AzureBlob ) 59 , ( "azurefile", AzureFile ) 60 , ( "azure_file", AzureFile ) 61 , ( "dropbox", Dropbox ) 62 , ( "google", Google ) 63 , ( "ipfs", Ipfs ) ··· 103 104 AzureFile -> 105 False 106 107 Dropbox -> 108 False
-36
src/Library/Sources/Services.elm
··· 9 import Sources.Services.AmazonS3 as AmazonS3 10 import Sources.Services.AzureBlob as AzureBlob 11 import Sources.Services.AzureFile as AzureFile 12 - import Sources.Services.Btfs as Btfs 13 import Sources.Services.Dropbox as Dropbox 14 import Sources.Services.Google as Google 15 import Sources.Services.Ipfs as Ipfs ··· 33 AzureFile -> 34 AzureFile.initialData 35 36 - Btfs -> 37 - Btfs.initialData 38 - 39 Dropbox -> 40 Dropbox.initialData 41 ··· 61 AzureFile -> 62 AzureFile.makeTrackUrl 63 64 - Btfs -> 65 - Btfs.makeTrackUrl 66 - 67 Dropbox -> 68 Dropbox.makeTrackUrl 69 ··· 95 AzureFile -> 96 AzureFile.makeTree 97 98 - Btfs -> 99 - Btfs.makeTree 100 - 101 Dropbox -> 102 Dropbox.makeTree 103 ··· 123 AzureFile -> 124 AzureFile.parseErrorResponse 125 126 - Btfs -> 127 - Btfs.parseErrorResponse 128 - 129 Dropbox -> 130 Dropbox.parseErrorResponse 131 ··· 151 AzureFile -> 152 AzureFile.parsePreparationResponse 153 154 - Btfs -> 155 - Btfs.parsePreparationResponse 156 - 157 Dropbox -> 158 Dropbox.parsePreparationResponse 159 ··· 179 AzureFile -> 180 AzureFile.parseTreeResponse 181 182 - Btfs -> 183 - Btfs.parseTreeResponse 184 - 185 Dropbox -> 186 Dropbox.parseTreeResponse 187 ··· 206 207 AzureFile -> 208 AzureFile.postProcessTree 209 - 210 - Btfs -> 211 - Btfs.postProcessTree 212 213 Dropbox -> 214 Dropbox.postProcessTree ··· 241 AzureFile -> 242 AzureFile.prepare 243 244 - Btfs -> 245 - Btfs.prepare 246 - 247 Dropbox -> 248 Dropbox.prepare 249 ··· 269 AzureFile -> 270 AzureFile.properties 271 272 - Btfs -> 273 - Btfs.properties 274 - 275 Dropbox -> 276 Dropbox.properties 277 ··· 301 "AzureFile" -> 302 Just AzureFile 303 304 - "Btfs" -> 305 - Just Btfs 306 - 307 "Dropbox" -> 308 Just Dropbox 309 ··· 332 AzureFile -> 333 "AzureFile" 334 335 - Btfs -> 336 - "Btfs" 337 - 338 Dropbox -> 339 "Dropbox" 340 ··· 356 [ ( typeToKey AmazonS3, "Amazon S3" ) 357 , ( typeToKey AzureBlob, "Azure Blob Storage" ) 358 , ( typeToKey AzureFile, "Azure File Storage" ) 359 - , ( typeToKey Btfs, "BTFS" ) 360 , ( typeToKey Dropbox, "Dropbox" ) 361 - , ( typeToKey Google, "Google Drive" ) 362 , ( typeToKey Ipfs, "IPFS" ) 363 , ( typeToKey WebDav, "WebDAV" ) 364 ]
··· 9 import Sources.Services.AmazonS3 as AmazonS3 10 import Sources.Services.AzureBlob as AzureBlob 11 import Sources.Services.AzureFile as AzureFile 12 import Sources.Services.Dropbox as Dropbox 13 import Sources.Services.Google as Google 14 import Sources.Services.Ipfs as Ipfs ··· 32 AzureFile -> 33 AzureFile.initialData 34 35 Dropbox -> 36 Dropbox.initialData 37 ··· 57 AzureFile -> 58 AzureFile.makeTrackUrl 59 60 Dropbox -> 61 Dropbox.makeTrackUrl 62 ··· 88 AzureFile -> 89 AzureFile.makeTree 90 91 Dropbox -> 92 Dropbox.makeTree 93 ··· 113 AzureFile -> 114 AzureFile.parseErrorResponse 115 116 Dropbox -> 117 Dropbox.parseErrorResponse 118 ··· 138 AzureFile -> 139 AzureFile.parsePreparationResponse 140 141 Dropbox -> 142 Dropbox.parsePreparationResponse 143 ··· 163 AzureFile -> 164 AzureFile.parseTreeResponse 165 166 Dropbox -> 167 Dropbox.parseTreeResponse 168 ··· 187 188 AzureFile -> 189 AzureFile.postProcessTree 190 191 Dropbox -> 192 Dropbox.postProcessTree ··· 219 AzureFile -> 220 AzureFile.prepare 221 222 Dropbox -> 223 Dropbox.prepare 224 ··· 244 AzureFile -> 245 AzureFile.properties 246 247 Dropbox -> 248 Dropbox.properties 249 ··· 273 "AzureFile" -> 274 Just AzureFile 275 276 "Dropbox" -> 277 Just Dropbox 278 ··· 301 AzureFile -> 302 "AzureFile" 303 304 Dropbox -> 305 "Dropbox" 306 ··· 322 [ ( typeToKey AmazonS3, "Amazon S3" ) 323 , ( typeToKey AzureBlob, "Azure Blob Storage" ) 324 , ( typeToKey AzureFile, "Azure File Storage" ) 325 , ( typeToKey Dropbox, "Dropbox" ) 326 , ( typeToKey Ipfs, "IPFS" ) 327 , ( typeToKey WebDav, "WebDAV" ) 328 ]
-121
src/Library/Sources/Services/Btfs.elm
··· 1 - module Sources.Services.Btfs exposing (..) 2 - 3 - {-| BTFS Service. 4 - 5 - Resources: 6 - 7 - - <https://docs.btfs.io/> 8 - 9 - -} 10 - 11 - import Dict 12 - import Sources exposing (Property, SourceData) 13 - import Sources.Processing exposing (..) 14 - import Sources.Services.Ipfs as Ipfs 15 - import Time 16 - 17 - 18 - 19 - -- PROPERTIES 20 - -- 📟 21 - 22 - 23 - defaults = 24 - { gateway = "" 25 - , name = "Music from BTFS" 26 - } 27 - 28 - 29 - defaultGateway = 30 - "http://127.0.0.1:8080" 31 - 32 - 33 - {-| The list of properties we need from the user. 34 - 35 - Tuple: (property, label, placeholder, isPassword) 36 - Will be used for the forms. 37 - 38 - -} 39 - properties : List Property 40 - properties = 41 - [ { key = "directoryHash" 42 - , label = "Directory object hash / DNSLink domain" 43 - , placeholder = "QmVLDAhCY3X9P2u" 44 - , password = False 45 - } 46 - , { key = "gateway" 47 - , label = "Gateway (Optional)" 48 - , placeholder = defaultGateway 49 - , password = False 50 - } 51 - ] 52 - 53 - 54 - {-| Initial data set. 55 - -} 56 - initialData : SourceData 57 - initialData = 58 - Dict.fromList 59 - [ ( "directoryHash", "" ) 60 - , ( "name", defaults.name ) 61 - , ( "gateway", defaults.gateway ) 62 - ] 63 - 64 - 65 - 66 - -- PREPARATION 67 - 68 - 69 - prepare = 70 - Ipfs.prepare 71 - 72 - 73 - 74 - -- TREE 75 - 76 - 77 - {-| Create a directory tree. 78 - -} 79 - makeTree = 80 - Ipfs.makeTree 81 - 82 - 83 - {-| Re-export parser functions. 84 - -} 85 - parsePreparationResponse = 86 - Ipfs.parsePreparationResponse 87 - 88 - 89 - parseTreeResponse = 90 - Ipfs.parseTreeResponse 91 - 92 - 93 - parseErrorResponse = 94 - Ipfs.parseErrorResponse 95 - 96 - 97 - 98 - -- POST 99 - 100 - 101 - {-| Post process the tree results. 102 - 103 - !!! Make sure we only use music files that we can use. 104 - 105 - -} 106 - postProcessTree = 107 - Ipfs.postProcessTree 108 - 109 - 110 - 111 - -- TRACK URL 112 - 113 - 114 - {-| Create a public url for a file. 115 - 116 - We need this to play the track. 117 - 118 - -} 119 - makeTrackUrl : Time.Posix -> String -> SourceData -> HttpMethod -> String -> String 120 - makeTrackUrl _ _ srcData _ path = 121 - Ipfs.extractGateway srcData ++ "/btfs/" ++ Ipfs.rootHash srcData ++ "/" ++ Ipfs.encodedPath path
···
-34
src/Static/About/CORS.md
··· 42 ] 43 ``` 44 45 - <div id="CORS__BTFS" /> 46 - 47 - #### BTFS 48 - 49 - Add the domain of the app, with the protocol, to the __list of allowed origins__. 50 - 51 - ```shell 52 - btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["https://diffuse.sh", "http://diffuse.sh.ipns.localhost:8080", "http://127.0.0.1:44999"]' 53 - ``` 54 - 55 - You can also make this change in the Web UI, you'll find it under "Settings → BTFS Config". 56 - 57 - ```javascript 58 - { 59 - "API": { 60 - "HTTPHeaders": { 61 - "Access-Control-Allow-Origin": [ 62 - ... // Default BTFS values 63 - 64 - "https://diffuse.sh", // 🎵 Default 65 - "http://diffuse.sh.ipns.localhost:8080", // IPNS 66 - "http://127.0.0.1:44999" // Electron app 67 - ] 68 - } 69 - } 70 - } 71 - ``` 72 - 73 <div id="CORS__Dropbox" /> 74 75 #### Dropbox 76 - 77 - _Not necessary._ 78 - 79 - <div id="CORS__Google-Drive" /> 80 - 81 - #### Google Drive 82 83 _Not necessary._ 84
··· 42 ] 43 ``` 44 45 <div id="CORS__Dropbox" /> 46 47 #### Dropbox 48 49 _Not necessary._ 50
-32
src/Static/About/Dev.md
··· 60 directoryPath 61 ``` 62 63 - ### BTFS 64 - 65 - ```yaml 66 - kind: 67 - btfs 68 - 69 - data: 70 - # Required 71 - directoryHash 72 - name 73 - 74 - # Optional 75 - gateway 76 - ``` 77 - 78 ### Dropbox 79 80 ```yaml ··· 89 90 # Optional 91 directoryPath 92 - ``` 93 - 94 - ### Google 95 - 96 - ```yaml 97 - kind: 98 - google 99 - 100 - data: 101 - # Required 102 - authCode 103 - clientId 104 - clientSecret 105 - name 106 - 107 - # Optional 108 - folderId 109 ``` 110 111 ### IPFS
··· 60 directoryPath 61 ``` 62 63 ### Dropbox 64 65 ```yaml ··· 74 75 # Optional 76 directoryPath 77 ``` 78 79 ### IPFS
-1
src/Static/About/Index.md
··· 20 - [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) 21 - [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/) 22 - [Dropbox](https://dropbox.com/) 23 - - [Google Drive](https://drive.google.com/) 24 - [IPFS](https://ipfs.io/) <small>(supports DNSLink & IPNS)</small> 25 - [WebDAV](https://en.wikipedia.org/wiki/WebDAV) 26
··· 20 - [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) 21 - [Azure File Storage](https://azure.microsoft.com/en-us/services/storage/files/) 22 - [Dropbox](https://dropbox.com/) 23 - [IPFS](https://ipfs.io/) <small>(supports DNSLink & IPNS)</small> 24 - [WebDAV](https://en.wikipedia.org/wiki/WebDAV) 25