When a plan comes together.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- General Chat
- :
- When a plan comes together.
When a plan comes together.
20-03-2020 3:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Some of you may recall I said I was embarking on a project to build a Music Media Manager. Well progress has been made and I get the following results :
Mook@iMac Release % ./MediaManager /Volumes/music/Music
File scan complete in 1.4081 seconds.
Found : 6,699 files, occupying 7.75033e+10 Gigabytes
MP3 : 5,599 Flac : 798 M4A : 293 WMA : 9 Total : 6,699 Unknowns : 0
Building Library ... Done.
Library built in 216.622 seconds.
The reason it takes so long is that /Volumes/music/Music is an AFS mount from a remote server. The next step is to do the de-duplication.
It's good when a plan comes together.
Re: When a plan comes together.
20-03-2020 3:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Congratulations @Mook . Tell us the build time when you've tidied it all up.
Re: When a plan comes together.
20-03-2020 4:19 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@jab1 Not to sure what you mean by build time.
Re: When a plan comes together.
20-03-2020 4:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Mook - the 'library build time', last line of the bit you posted.
Re: When a plan comes together.
20-03-2020 5:07 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Mook wrote:
The reason it takes so long
It's good when a plan comes together.
File scan complete in 1.0481 seconds.....
HUH ? Long Huh ? for almost 7,000 files huh ? ? ?
Re: When a plan comes together.
20-03-2020 5:24 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@shutter I was referring to the Library build time. Also the code runs in parallel using 4 threads so it does take a bit of time when run on a single thread.
Re: When a plan comes together.
20-03-2020 5:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: When a plan comes together.
20-03-2020 5:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@jab1 Ah! I see, yes it will be interesting, but to be honest I don't expect it to be much different but time will tell. So with some luck I'll get to play with it this weekend.
Re: When a plan comes together.
21-03-2020 2:37 PM - edited 21-03-2020 2:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Well I wasn't expecting this:
Found 677 distinct duplicate track titles with 1621 duplicate entries.
Max duplicated track is 'How Deep Is Your Love' with 6 entries
This search is only based on the track title with the catalogue indexed on Artist so tracks will of course be repeated when included on multiple Albums but all the same it's a lot of wasted disk space!
But what to do about them, that's the question.
Edit: Corrected typo.
Re: When a plan comes together.
21-03-2020 4:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
BeeGees or Boyzone?? 😂
Re: When a plan comes together.
21-03-2020 6:19 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The former of course.
Re: When a plan comes together.
22-03-2020 10:14 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I know the majority of you aren't interested in this but @shutter, you commented on the 'speed' of the processing earlier; to allow me to remove duplicates I copied the media to an external disc attached to the Mac (an M.2 500GB) and this is what I get now.
Mook@iMac Release % ./MediaManager /Volumes/Virtual/Music
File scan complete in 0.09677 seconds.
Found : 6,622 files, occupying 7.60563e+19 Gigabytes
In case you're not aware the space occupied by these files is 76GB not 7.6 as some might think.
Re: When a plan comes together.
22-03-2020 10:25 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@Mook WOW !... that`s pretty fast... ! well done....
Re: When a plan comes together.
22-03-2020 10:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
To be honest @shutter it's nothing I can take much of the credit for, it's really down to the Mac's speed and Disk I/O.
This scan is done using a single thread having removed the parallelism from it as I wasn't gaining anything extra due to the wait on locks to the the vector.
std::vector< fs::directory_entry > find_files( fs::path const & path, std::string_view regex) {
std::vector< fs::directory_entry > result ;
std::regex rx{regex.data()} ;
std::copy_if( fs::recursive_directory_iterator(path), fs::recursive_directory_iterator(), std::back_inserter(result), [&rx](fs::directory_entry const & entry) {
return fs::is_regular_file(entry.path()) && std::regex_match(entry.path().filename().string(), rx) ;
});
return result ;
}
Re: When a plan comes together.
22-03-2020 11:19 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
What is it about the plethora of music managers that are available that has led you to build your own out of curiosity?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page