Jump to content
6b6561

mp3 tags not scanned on new music on SD card

Recommended Posts

Hi,

Device: Xiaomi MiMax3, stock Android 9

Poweramp: Build 828

Workflow: I have all my music stored on a NAS device in a artist/album hierarchy. The entire hierarchy is replicated to the phone using FolderSync pro.

Issue: When new tracks are added then:

  • PA doesn't read the tags on tracks copied to the SD card.
  • Files copied to internal memory are properly read.
  • I don't have this issue on my Samsung xcover3.
  • It's not an SD card issue as the files copied from SD card -> internal memory are fine.

When did it start?: I know for sure that the workflow has been working and unfortunately I'm not sure when it broke. I have had quite a lot of changes done in my setup recently. Laptop used to copy CD's to MP3 has been replaced, NAS device has been upgraded from ARM based to Intel based Debian and with this the mp3 tools used has been upgraded. Phone OS upgraded from Android 8 to 9...

Workaround:

  • Full rescan will pick up tags, but I don't want to rescan 7000 tracks everytime files are added.
  • Rescan in the folder doesn't work. (Proposal rescan launched in a folder should do a full rescan of the folder where it's launched)
  • Tags are picked up by PA if the directory is re-named and named back in the filemeanager after the file has been copied to the device.

Replicatable:

  • Yes, it happens every time when new tracks are copied to the SD card.
  • Same thing happens if a directory is copied on the device, if a copy is made of a music dir, then PA will see the files and play them, tags are not picked up unless I do rename the folder.

Assumption: PA scans the file before it has been completly copied and therefore the meta data isn't available when the file is scanned?

Kim

Share this post


Link to post
Share on other sites

Same result, I did just a sdcard to sdcard copy of a couple of tracks into a test folder with music running. Tracks shows up in PA with blank tags, renaming the folder from the filemanager causes the tags to be properly read.

Share this post


Link to post
Share on other sites
30 minutes ago, 6b6561 said:

Same result, I did just a sdcard to sdcard copy of a couple of tracks into a test folder with music running. Tracks shows up in PA with blank tags, renaming the folder from the filemanager causes the tags to be properly read.

I thought perhaps that shutting down PA completely including background processes could help. You had thougths in the same direction :

47 minutes ago, 6b6561 said:

Assumption: PA scans the file before it has been completly copied and therefore the meta data isn't available when the file is scanned?

 

Share this post


Link to post
Share on other sites

Have you tried copying the files from your NAS to the SD Card manually, using a file explorer app? (Solid Explorer is a good one that supports copying to/from NAS drives) Could be something in your sync software is not triggering notification that the file/folders have been modified.

Andre

Share this post


Link to post
Share on other sites

PA see's the new files, plays them happily but without tags. A simple rename of the file or directory on the device makes PA re-scan the files and then the tags are picked up and I can rename back the directory to the initial name.

It doesn't matter how the file is created on the SD-card, always the same result.

  • New files/directories synchronized to device with "FolderSync pro".
  • Files copied from NAS -> phone with "ES File Manager"
  • Files copied from "SD card folder "-> "another SD card folder" with "ES File Manager" or the built in file manager.

A normal re-scan will not read the tags, and a full re-scan feels a bit excessive.

Share this post


Link to post
Share on other sites

bump, I have the exact same problem on my Realme x2, Android 9.0

 

interesting thing is, if I go to the unknown artist section and check tag info every tag is correct

Screenshot_2020-01-20-07-06-42-43_345bb2134bfb84a7decceb0b36861421.png

Screenshot_2020-01-20-07-07-10-19.png

Edited by loop

Share this post


Link to post
Share on other sites

As a test (not sure if it's related) could you try re-editing the filename and/or tag contents to use plain ASCII characters, rather than accented characters, and see if the edited copy shows up after a Full Rescan. If so, the Unicode tagging may be either incorrect or just not getting read correctly by the scanner, and you could try adjusting Settings > Library > Scanner > Tag Encoding. It's also worth uploading one of the files which causes problem so Max can take a look at it.

Andre

Share this post


Link to post
Share on other sites

It's not a tagging issue or problem with the file. The issue is with files copied to a SD card not being properly picked up at the time of copy, the way to fix it is to either

  • run a full rescan or
  • rename the directory on the SD card.

If the same file is copied to the internal storage, then it's properly picked up.

My guess is that PA scans the file before it's completely copied to the card, and during this first scan the meta data isn't in place

Share this post


Link to post
Share on other sites

Yes, the tags are correct, they're always picked up and displayed correctly after a full rescan. This is definitely a Poweramp bug, i can't reproduce it with other players

Share this post


Link to post
Share on other sites

@6b6561 you're not wrong about the possibility of non-fully copied files being scanned. Unfortunately there is no way we can know if file is fully uploaded or not (unless another we scan again and compare file sizes). This is why by default Poweramp waits for all uploads to end and only then it tries to rescan.

You can have better results by disabling auto scanning options in Settings / Library / Scanner to prevent auto scans and then simple rescan from Library header menu will be enough - no full rescan will be needed.

Share this post


Link to post
Share on other sites

@maxmp thanks for the proposal to disable automatic scan, I believe that will solve my problem for now and I can then just do manual scans after upload has completed.

I assume you are using something like inotify for getting notifications to PA about new files in the library and this triggers a scan of the new object? If this is correct, wouldn't it be possible to put in a simple check in the scan to see if the file is open by another process and if so delay the scan?

How about changing the "rescan" behavior launched in a folder in such a way that it does a full rescan of the objects in the directory?

Share this post


Link to post
Share on other sites
21 hours ago, maxmp said:

You can have better results by disabling auto scanning options in Settings / Library / Scanner to prevent auto scans and then simple rescan from Library header menu will be enough - no full rescan will be needed.

Thanks, this did the trick, this saves me from the full re-scans.

Share this post


Link to post
Share on other sites

Turning off auto-scan doesn't fix tracks already on the device, it's only good for new tracks copied to the device. My new "workflow" is that I copy any new stuff to the device, once the files are there, then I run an manual rescan,

Have you tried to rename the files on your phone? That caused the files to be fully scanned on my phone.

Share this post


Link to post
Share on other sites

renaming files works, but doing that every time i add new music isn't ideal. guess I'll just stick to internal storage for now

Share this post


Link to post
Share on other sites
12 minutes ago, loop said:

renaming files works, but doing that every time i add new music isn't ideal. guess I'll just stick to internal storage for now

In which case, please could you upload a few sample files (ones which fail to scan properly) so Max can maybe figure out a workaround for whatever character set you are using? I assume using the Tag Encoding setting in PA did not work in this case?

Andre

Share this post


Link to post
Share on other sites
42 minutes ago, loop said:

renaming files works, but doing that every time i add new music isn't ideal. guess I'll just stick to internal storage for now

How do you copy new music to your device?

Share this post


Link to post
Share on other sites
28 minutes ago, andrewilley said:

In which case, please could you upload a few sample files (ones which fail to scan properly) so Max can maybe figure out a workaround for whatever character set you are using? I assume using the Tag Encoding setting in PA did not work in this case?

Andre

The problem isn't with the files, as full rescans will read them correctly. Problem is most likely that the first scan of the file is done while the file is still being copied and therefore the metadata isn't in place at the time of the scan.

Share this post


Link to post
Share on other sites
38 minutes ago, 6b6561 said:

The problem isn't with the files, as full rescans will read them correctly. Problem is most likely that the first scan of the file is done while the file is still being copied and therefore the metadata isn't in place at the time of the scan.

In which case just turn off automatic scanning, and don't run PA until the file copying has been completed.

However my reply was to another user, @loop , who said that renaming his files (to remove the extended character set content) solved the problem, but that this wasn't an ideal long-term solution. One of the complications of having several slightly different issues discussed in a single thread. 

Andre

Share this post


Link to post
Share on other sites

I transfer files mostly by downloading from Google Drive or from an FTP server on my PC. I tried out transferring with USB cable and it works, tags are read immediately after transfer and the music shows up in the library, however it doesn't show up in "Recently added" section.

Share this post


Link to post
Share on other sites
1 hour ago, loop said:

 however it doesn't show up in "Recently added" section.

Have you using 'added to library' date, or the filesystem time/date stamp (in menu > List Options for that category)?

Andre

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...