ExportXMLWordPrintable

      Maloja can export JSON history files, which we should allow importing in the file importer.

      The server-side importer files are located here: https://github.com/metabrainz/listenbrainz-server/tree/master/listenbrainz/background/listens_importer
      A new importer should be created for maloja that can take inspiration from the Spotify importer for example which processes json files.
      Some front-end changes are also required at ImportListens.tsx to add the Maloja service, as well as other places in the file where the list of services is mentioned:
      https://github.com/metabrainz/listenbrainz-server/blob/master/frontend/js/src/settings/import/ImportListens.tsx#L31-L42

      The file format is as follows:

      {
         "maloja": {
            "export_time": 1761035593
         },
         "scrobbles": [
            {
               "time": 1760532613,
               "track": {
                  "artists": [
                     "Alabaster Deplume"
                  ],
                  "title": "Not Now, Jesus",
                  "album": {
                     "artists": [
                        "Alabaster Deplume"
                     ],
                     "albumtitle": "To Cy & Lee: Instrumentals Vol. 1"
                  },
                  "length": null
               },
               "duration": null,
               "origin": "client:turntable"
            },
            {
               "time": 1760532855,
               "track": {
                  "artists": [
                     "Vega Trails"
                  ],
                  "title": "Old Friend; The Sea",
                  "album": {
                     "artists": [
                        "Vega Trails"
                     ],
                     "albumtitle": "Sierra Tracks"
                  },
                  "length": null
               },
               "duration": null,
               "origin": "client:turntable"
            },
            {
               "time": 1760595975,
               "track": {
                  "artists": [
                     "Big Daddy Kane"
                  ],
                  "title": "Warm It Up, Kane",
                  "album": {
                     "artists": [
                        "Big Daddy Kane"
                     ],
                     "albumtitle": "The Very Best Of Big Daddy Kane"
                  },
                  "length": null
               },
               "duration": null,
               "origin": "client:brave"
            },
            {
               "time": 1760596253,
               "track": {
                  "artists": [
                     "Femi Kuti + Macy Gray D'Angelo"
                  ],
                  "title": "Water Get No Enemy",
                  "album": {
                     "artists": [
                        "Femi Kuti + Macy Gray D'Angelo"
                     ],
                     "albumtitle": "Red Hot + Riot"
                  },
                  "length": null
               },
               "duration": null,
               "origin": "client:brave"
            }
         ]
      }
      

            Assignee:
            failure
            Reporter:
            Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package