[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amarok-devel
Subject:    Re: Implementing CUE sheet support in Amarok
From:       Matěj Laitl <matej () laitl ! cz>
Date:       2013-09-15 18:28:11
Message-ID: 3066582.OtQCTMS6WQ () edgy
[Download RAW message or body]

On 15. 9. 2013 Abhinandan Ramprasath wrote:
> Hi,
> 
> After spending a lot of time staring at the code, I would like to propose
> the following changes to implement CUE sheet support in Amarok.
> 
> Most of the necessary CUE decoding and track splitting functions are already
> available in CueFileSupport.h . It's got functions to scan for and validate
> CUE sheets too. I'd like to use these functions in the collectionscanner,
> scan for .cue files once the XML is read. To be even more precise, just
> before/after the CollectionScanner::Track for each track is created. So
> each child track would be treated as a separate track right from the
> beginning.
> 
> I was thinking of having a few additional data members in
> CollectionScanner::Track and Meta::SqlTrack to represent child tracks and
> to store their start times and end times.

Yeah, that makes sense.

> This would then be stored in the database. To do that, I'd like to do that
> by adding a few columns to the track or the urls table such as, a child or
> not boolean, start time and end time.

Yep, this is the natural approach, however, this might lead to some problems. 
There are assumptions all over that (deviceid, rpath) in the urls table is 
unique for all urls. This wouldn't hold anymore.

One possibility would be to change the assumption everywhere (tricky, perhaps 
doable).

Second to somehow mix the start/end times into the rpath (is there a character 
not allowed in UNIX file paths?) and carefully treat places that use it.

Third to recreate the child tracks late - after picking them up from the 
database (extremely tricky IMO).

Another open questions:
what should happen when you try to copy/move one child track out of Local 
Collection? What would happen if you edit the metadata? (I guess the change to 
title would go to the cuesheet, everything else to the underlying file).

	Matěj
_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic