• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Edit database manually

    Scheduled Pinned Locked Moved
    Technical Help
    1
    2
    240
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      OriNOVet
      last edited by

      I have found a way to export lastplayed timestamp and playcount from my old Media Monkey database. No i have tried to update the Strawberry database with this data via a standard SQlite editor. The changes are written to the database, but i didnt see them reflecting in the GUI. Is there any thing i have todo? When i edit the strawberry database, i use a SQL like this:

      UPDATE `songs` SET `lastplayed` = 1631919400, `playcount` = 4 WHERE `artist` = "Some Artist" AND `album` = "Some album" AND `track` = 5 AND `title` = "some title";
      

      The SQL seems to be fine and the date in the expected format (Unix timestamp), but i get 1.1.1970 in the GUI. The playcount is updated. Do i miss something?

      1 Reply Last reply Reply Quote 0
      • O
        OriNOVet
        last edited by

        Ahh got it to work. I have to refresh the opened playlist. Then the imported dates are visible. If someone needs the export SQL from Media Monkey to Strawberry:

        SELECT SongPath, Artist, Album, AlbumArtist, TrackNumber, DiscNumber, SongTitle, PlayCounter, strftime('%s', datetime(LastTimePlayed + 2415019.0)) as lastplayed
        FROM Songs
        WHERE LastTimePlayed > 0;
        

        Media Monkey uses juliandate to save the date. I export the other fields additionally, to match the fields in Strawberry and find the correct songs. Form the returned entrys, i create the above UPDATE statement for Strawberry:

        UPDATE `songs` SET `lastplayed` = 1631919400, `playcount` = 4 WHERE `artist` = "Some Artist" AND `album` = "Some album" AND `track` = 5 AND `title` = "some title";
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | Contributors