-
Notifications
You must be signed in to change notification settings - Fork 123
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
Relative paths #659
Relative paths #659
Conversation
…folderids unless folderid is null
… built-in media_file folder which may be inaccurate (for podcasts)
This pull request introduces 8 alerts when merging 9606ef3 into e70a65a - view on LGTM.com new alerts:
|
c2424b3
to
67119fa
Compare
This pull request introduces 8 alerts when merging 67119fa into e70a65a - view on LGTM.com new alerts:
|
It isn't. As demonstrated by the example above. The former merely stops the indexing of a duplicate path, but it has already been created. The latter, is necessary, but is it sufficient? Are there any other paths that create a media file that might be a duplicate? Seems like createMediaFile is called in a bunch of other places?
The answer was actually posed in the original manipulation of the question. The issue isn't so much as adding something that's already part of the collection, because you're right, that is indeed redundant. However, a user might want to reduce or narrow the scope of a music folder. He or she may not longer want the entirety of /a/ scanned, instead opting to scan /a/b only.
Agreed, adding is a simple enough matter, until you realize that expanding the scope means your existing files are affected because their paths need adjusting also. Imagine a folder /a/b, and a media file in that folder with a relative path c/d.mp3. If you go and edit and expand the scope of the folder to /a now, the relative path of the existing media file needs to change with it and become b/c/d.mp3 Expansion and reduction of scope seem like symmetrical operations. |
The effect is the same as in "directories which do not belong to the current folder are excluded". I first put it in It should be sufficient from what I see, I've had more than enough acquaintance with |
This pull request introduces 2 alerts when merging 83de31e into 3d4d0c4 - view on LGTM.com new alerts:
|
…ded to the database using their relative position in the parent file and are played invidually by means of a "split" transcoding which is inserted into the transcoding chain. Base files - the files from which tracks are indexed - are shown or hidden depending on whether the 'Hide cue-indexed files' option (on the Media Folders settings page) is set or not. Cue-indexed tracks are represented in the database by their path and start position. The start position is stored in a new 'start_position' field in the database with a default value of '-1.0' - negative values indicate non-indexed files. New settings: - Media Folders/Hide cue-indexed files (boolean): show (unset) or hide (set) cue-indexed base files - Transcoding/Split command (text): command used to split off section of a file for streaming, the default command `ffmpeg -ss %o -t %d -i %s -vcodec copy -acodec copy -f %f -` achieves this without transcoding (i.e. losless) by splitting on frame boundaries. This is a continuation of the cue-support patch I submitted to the original airsonic (airsonic/airsonic#856) which never got merged. This version has been refactored for airsonic-advanced, rebased on the to-be-merged relative paths PR (airsonic-advanced#659). Database changes: - add column `start_position` (double) default -1.0 (used to identify and access indexed tracks) - add column `index_path` varchar (used to store and identify indexed files) - drop unique index on path+folder_id - add unique index on path+folder_id+start_position Rebase on relative-paths Merge relativepaths
This pull request introduces 2 alerts when merging f1abcc4 into 0a2439e - view on LGTM.com new alerts:
|
…ded to the database using their relative position in the parent file and are played invidually by means of a "split" transcoding which is inserted into the transcoding chain. Base files - the files from which tracks are indexed - are shown or hidden depending on whether the 'Hide cue-indexed files' option (on the Media Folders settings page) is set or not. Cue-indexed tracks are represented in the database by their path and start position. The start position is stored in a new 'start_position' field in the database with a default value of '-1.0' - negative values indicate non-indexed files. New settings: - Media Folders/Hide cue-indexed files (boolean): show (unset) or hide (set) cue-indexed base files - Transcoding/Split command (text): command used to split off section of a file for streaming, the default command `ffmpeg -ss %o -t %d -i %s -vcodec copy -acodec copy -f %f -` achieves this without transcoding (i.e. losless) by splitting on frame boundaries. This is a continuation of the cue-support patch I submitted to the original airsonic (airsonic/airsonic#856) which never got merged. This version has been refactored for airsonic-advanced, rebased on the to-be-merged relative paths PR (airsonic-advanced#659). Database changes: - add column `start_position` (double) default -1.0 (used to identify and access indexed tracks) - add column `index_path` varchar (used to store and identify indexed files) - drop unique index on path+folder_id - add unique index on path+folder_id+start_position Rebase on relative-paths Merge relativepaths
This pull request introduces 2 alerts when merging ba30cf6 into 9c1a7ca - view on LGTM.com new alerts:
|
…ded to the database using their relative position in the parent file and are played invidually by means of a "split" transcoding which is inserted into the transcoding chain. Base files - the files from which tracks are indexed - are shown or hidden depending on whether the 'Hide cue-indexed files' option (on the Media Folders settings page) is set or not. Cue-indexed tracks are represented in the database by their path and start position. The start position is stored in a new 'start_position' field in the database with a default value of '-1.0' - negative values indicate non-indexed files. New settings: - Media Folders/Hide cue-indexed files (boolean): show (unset) or hide (set) cue-indexed base files - Transcoding/Split command (text): command used to split off section of a file for streaming, the default command `ffmpeg -ss %o -t %d -i %s -vcodec copy -acodec copy -f %f -` achieves this without transcoding (i.e. losless) by splitting on frame boundaries. This is a continuation of the cue-support patch I submitted to the original airsonic (airsonic/airsonic#856) which never got merged. This version has been refactored for airsonic-advanced, rebased on the to-be-merged relative paths PR (airsonic-advanced#659). Database changes: - add column `start_position` (double) default -1.0 (used to identify and access indexed tracks) - add column `index_path` varchar (used to store and identify indexed files) - drop unique index on path+folder_id - add unique index on path+folder_id+start_position Rebase on relative-paths Merge relativepaths
This pull request introduces 2 alerts when merging 78dd0bd into 9c1a7ca - view on LGTM.com new alerts:
|
This change adds support for cue-indexed files. Indexed tracks are added to the database using their relative position in the parent file and are played invidually by means of a "split" transcoding which is inserted into the transcoding chain. Base files - the files from which tracks are indexed - are shown or hidden depending on whether the 'Hide cue-indexed files' option (on the Media Folders settings page) is set or not. Cue-indexed tracks are represented in the database by their path and start position. The start position is stored in a new 'start_position' field in the database with a default value of '-1.0' - negative values indicate non-indexed files. New settings: - Media Folders/Hide cue-indexed files (boolean): show (unset) or hide (set) cue-indexed base files - Transcoding/Split command (text): command used to split off section of a file for streaming, the default command `ffmpeg -ss %o -t %d -i %s -vcodec copy -acodec copy -f %f -` achieves this without transcoding (i.e. losless) by splitting on frame boundaries. This is a continuation of the cue-support patch I submitted to the original airsonic (airsonic/airsonic#856) which never got merged. This version has been refactored for airsonic-advanced, rebased on the recently-merged relative paths PR (airsonic-advanced#659), put on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying ‘Beware of the Leopard" to be finally (?) resubmitted as a new PR. Database changes: - add column `start_position` (double) default -1.0 (used to identify and access indexed tracks) - add column `index_path` varchar (used to store and identify indexed files) - drop unique index on path+folder_id - add unique index on path+folder_id+start_position
This significantly overhauls how paths are stored in the backend in media_files
There is more discussion about it on airsonic/airsonic#165
Previously:
Now:
there is now a path restriction on music folders so they don't overlap. this is the cost of relative paths. overlapping causes ambiguity in how a particular file may be resolved (using folder 1 or using folder 2)THIS IS A NON-BACKWARDS COMPATIBLE CHANGE! BACK UP YOUR DATABASE PRIOR TO RUNNING THIS VERSION IN CASE YOU WANT TO REVERT!