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

Smarties #13

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Smarties #13

wants to merge 43 commits into from

Conversation

Eve00000
Copy link
Owner

@Eve00000 Eve00000 commented Oct 26, 2024

Smarties pt 1 : save lineditsearch to new smarties

some remarks:

  • I read #5575 carefully and tried to follow some ideas from that conversation.

  • smarties are crates with other capabilities : No autoDJcrate, no adding tracks, no export (make crate of the smarties)...

  • smarties can be 'live' and 'cached' : when the smarties are locked they are cached, else the search is executed when selected (but this goes fast, I'm testing with 13000 tracks table in Virtual Machine, it's just a wink). Cached = tracks in smarties_tracks
    -> when title / name of track is changed and the track is no longer conform with the condition the track continues to stay in the smarties until the smarties is unlocked.

  • at the moment the search isn't that 'smart', the search is just a artist, title album, composer, genre, comment like %value%
    I wanted to get this straight up before creating the different search items with UI

-> Smarties are SMART
all meaningful fields of the library can be selected, with matching operators.
also playlist / crate & history can be selected for search

  • extra fields in the smartiestable will be
  SearchContainer (all tracks / cratename / playlistname) 
  Condition#LineConnector (AND / OR = relation to previous conditionlien)  
  Condition#SearchField (All library fields) 
  Condition#Operator (is / is not / contains / contains not / > / < ... depending on selected field type)
  Condition#Value

to test:
add smartiestable (I added it as nr 40 in the schema but the github compiler doesn't like it)

CREATE TABLE smarties (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        name varchar(48) UNIQUE NOT NULL,
        count INTEGER DEFAULT 0,
        show INTEGER DEFAULT 1, locked INTEGER DEFAULT 0, autodj_source INTEGER DEFAULT 0, search_input varchar(255), search_sql varchar(255), condition1_field VARCHAR(64), condition1_operator VARCHAR(16), condition1_value VARCHAR(255), condition1_combiner VARCHAR(4), condition2_field VARCHAR(64), condition2_operator VARCHAR(16), condition2_value VARCHAR(255), condition2_combiner VARCHAR(4), condition3_field VARCHAR(64), condition3_operator VARCHAR(16), condition3_value VARCHAR(255), condition3_combiner VARCHAR(4), condition4_field VARCHAR(64), condition4_operator VARCHAR(16), condition4_value VARCHAR(255), condition4_combiner VARCHAR(4), condition5_field VARCHAR(64), condition5_operator VARCHAR(16), condition5_value VARCHAR(255), condition5_combiner VARCHAR(4), condition6_field VARCHAR(64), condition6_operator VARCHAR(16), condition6_value VARCHAR(255), condition6_combiner VARCHAR(4), condition7_field VARCHAR(64), condition7_operator VARCHAR(16), condition7_value VARCHAR(255), condition7_combiner VARCHAR(4), condition8_field VARCHAR(64), condition8_operator VARCHAR(16), condition8_value VARCHAR(255), condition8_combiner VARCHAR(4), condition9_field VARCHAR(64), condition9_operator VARCHAR(16), condition9_value VARCHAR(255), condition9_combiner VARCHAR(4), condition10_field VARCHAR(64), condition10_operator VARCHAR(16), condition10_value VARCHAR(255), condition10_combiner VARCHAR(4), condition11_field VARCHAR(64), condition11_operator VARCHAR(16), condition11_value VARCHAR(255), condition11_combiner VARCHAR(4), condition12_field VARCHAR(64), condition12_operator VARCHAR(16), condition12_value VARCHAR(255), condition12_combiner VARCHAR(4))```
this table will change with a lot of search fields(see up)

add smarties_tracks

CREATE TABLE smarties_tracks (
smarties_id INTEGER NOT NULL REFERENCES crates(id),
track_id INTEGER NOT NULL REFERENCES "library_old"(id),
UNIQUE (smarties_id, track_id))


NOTE: there are still a lot of 'leftovers' from conversion of crates to smarties, things that might be used in the future (I'm still in dubio).
NOTE 2: this is as WIP :-)

@github-actions github-actions bot added the skins label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants