This forum has been archived. All content is frozen. Please use KDE Discuss instead.

idea: Collectors script

Tags: collector, collection, db, ratings collector, collection, db, ratings collector, collection, db, ratings
(comma "," separated)
Lukas
Registered Member
Posts
427
Karma
0

idea: Collectors script

Fri Dec 18, 2009 11:14 pm
[insert all reasons why you would need collection managment functionality in Amarok as a plugin, leaving Amarok itself concentrated in the best music playing experience]. The key problems I've identified:

  • Loss of meta data (e.g fresh install)
  • Inaccurate meta data (mistypes, junk data)
  • Duplicate tracks
  • Now way to easy tag newly added files
  • Prevent adding previously deleted tracks

Duplicates and Mistype correction
The idea is to create a table based by song itself, rather than a file.
collector_tracks table:
id | artist | title | artist_slug | title_slug | rating | playcount | deleted etc.

This way 1 song == 1 entry (even if 100 files of the same song is present)

The key here is artist_slug | title_slug fields. They are cleaned (having _-/* etc removed)/trimmed/lowered/etc versions of artist | title fields.
They will be used to match songs in collector_tracks and Amarok native storage, as the same sulug'ization algorithm for title/artist fileds would be applied on the fly.

artist | title
fields would be "the real" names of those tracks.
They could be got by:
* User edits song details manually.
* Look in online service DB (like last.fm)
* If online service didn't find the song, use googles "Did you mean:" capabilities. Would do the job in case of mistypes and repeat step 2
* Leave the same if previous fails :)

To tie collector_tracks and Amarok native storage a
collector_tracks_ids table wold be used
track_id | collector_track_id

Rating
The rating itself.

Playcount
Merge of palycounts if same song is in local collection and e.g. mp3 player

Deleted
If song gets deleted from DB (and PC) mark it as so, in the future it would be easier to track tracks you don't like easily.


Preventing loss of data
Do a simple import/export of collector_tracks table to backup you settings.
Have a hope, that with other music players, a standard file type would be created to sync personal data without modifying file itself.

Optional feature - to sync all ratings of the same songs in all devices (e.g. if tag is updated in mp3, update in local collection, and vice versa)


Dealing with newly added files
Once I add more songs to collection (like top hits of XYZ) i find it hard to track them down and properly tag or delete (e.g. same file was already in DB)

To deal with this, all newly added tracks AND/OR possible matches would be tagged with new_tracks tag.
Doing a simple search tag:new_tracks would display them all :)
Of course new_tracks tag should be auto-removed after short period of time.


----
I can write most of the scripts, however, I'm going to need some help from You, as I'm more webdev rather than Qt. Also all this must be done with caution since safety of user data is the no1 task.

Last edited by Lukas on Tue Jan 05, 2010 6:16 pm, edited 1 time in total.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Could you please send a mail to our mailing list? I am really not sure this belongs here... amarok@kde.org


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
valoriez
KDE CWG
Posts
625
Karma
3
OS
You might look at http://amarok.kde.org/wiki/Amarok_File_Tracking

I think much of what you want is already done.
Lukas
Registered Member
Posts
427
Karma
0
valoriez wrote:You might look at http://amarok.kde.org/wiki/Amarok_File_Tracking

I think much of what you want is already done.


This tracks files itself, not the songs.

Think about a case, when you have had a "Artist_X" artists album "Album_Z". Later you bought a CD "Artists_X greatest hist", ripped it and added to your collection. You probably get at least one duplicated file. AFT is not going to deal with this, especially since codec/bitrate/track length doesn't match.

But if both songs has at least similar (eg 'The Beatles' vs 'Beatles, the) it is possible to auto-match them.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], daret, Evergrowing, Google [Bot], lockheed, sandyvee, Sogou [Bot]