Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last Played date is null #9

Closed
sterling-tenn opened this issue Mar 12, 2024 · 3 comments · Fixed by #10
Closed

Last Played date is null #9

sterling-tenn opened this issue Mar 12, 2024 · 3 comments · Fixed by #10

Comments

@sterling-tenn
Copy link

Hello, I've encountered an issue and I hope to hear your advice.

I've been able to successfully run a fullSync to my navidrome.db (see this issue for extra details) and everything appears to be working properly with the exception of the "Last Played" date as seen here:
image

Digging a bit further into the source code, logging the value of musicBeeCollection in MBNDSynchronizer.js after it's assignment on line 191, the output of a single entry looks something like this

{
  filePath: 'C:\\Users\\sterl\\OneDrive\\Music',
  filename: '[.que] - rest.mp3',
  folder: 'Music',
  title: 'rest',
  lastPlayed: null,
  love: 0,
  skipCount: 0
}

Where the lastPlayed value is null. My first guess is something to do with grabbing the date value from the MusicBee_Export.csv on line 167?

For reference a truncated version of my MusicBee_Export.csv looks like this:

"<File Path>","<Filename>","<Folder>","Title","Last Played","Play Count","Rating","Love","Skip Count"
"C:\Users\sterl\OneDrive\Music","[.que] - rest.mp3","Music","rest","2023-10-24 23:50","4","","","0"

Thank you

@rombat
Copy link
Owner

rombat commented Apr 6, 2024

Hi
I'm sorry to answer this late, I'm really busy at work these past weeks, and I totally missed your issue.
I'll have a look as soon as I can and answer you properly afterwards, thank you for your patience 🙏🏼

Is the lastPlayed property missing from all of your tracks, or just some ? If so, can you provide a more complete csv, including tracks that don't have this property?
Thanks in advance

@rombat
Copy link
Owner

rombat commented Apr 6, 2024

I think I can see why it's null, I think it's a matter of date format. I'm checking all this on my phone, so I'll catch you up later when I can access my computer.

@rombat rombat linked a pull request Apr 6, 2024 that will close this issue
@rombat rombat closed this as completed in #10 Apr 6, 2024
@rombat
Copy link
Owner

rombat commented Apr 6, 2024

@sterling-tenn I've fixed this by adding a new option (--datetime-format <format>) to pass a specific datetime format. DD/MM/YYYY HH:mm was used, but yours is YYYY-MM-DD HH:mm, I wasn't aware that MusicBee could output different formats for datetime.
I've released a new version with this option and updated the readme accordingly.

Regarding your other issue with path, I'll fix that properly later, but thanks for the input 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants