jpillora / media-sort

Automatically organise your movies and tv series
MIT License
120 stars 21 forks source link

Docker image #13

Open izissise opened 4 years ago

jpillora commented 4 years ago

Thanks for the PR though a multistage build is best for go binaries

On Wed, 30 Oct 2019 at 8:19 am Hugues Morisset notifications@github.com wrote:


You can view, comment on, or merge this pull request online at:

https://github.com/jpillora/media-sort/pull/13 Commit Summary

  • Add an option to watch only top directories
  • Skip output dir from the recursive scan
  • Add a Dockerfile in order to build a docker image

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X4ZPQF47Z5SLSQSKM3LQRCSFZA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HVGROSA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X43CZ4Z7YIRPOCNAJR3QRCSFZANCNFSM4JGPUVKA .

izissise commented 4 years ago

Done :)

jpillora commented 4 years ago

Cool, thanks - did you test it? Think it might need root certificates to reach the various APIs

Also, what's the use case for the top-level dirs only?

izissise commented 4 years ago

Yup I tested it and it works great, but you're right better add the certificates :)

About the watches on the top level dirs only, I don't see the use case of watching the whole fs tree, once downloaded the files won't change, torrent clients usually create a file or directory in a specified path and so you only want to watch this one for changes

jpillora commented 4 years ago

Oh, do sub directories fire FS events for deeply nested children? Linux and Mac?

On Sun, 3 Nov 2019 at 21:25, Hugues Morisset notifications@github.com wrote:

Yup I tested it and it works great, but you're right better add the certificates :)

About the watches on the top level dirs only, I don't see the use case of watching the whole fs tree, once downloaded the files won't change, torrent clients usually create a file or directory in a specified path and so you only want to watch this one for changes

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X45FNEX2UA3VB2LDAJ3QR2RK5A5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5PHAI#issuecomment-549122945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X4ZFEXOT2L33E75BKD3QR2RK5ANCNFSM4JGPUVKA .

izissise commented 4 years ago

I added the certificates from the build image.

It does watch all the sub-directories because

watch function watches all the directories in fs.dirs https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L174 And add function recursively adds it in to the map:

https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L225

jpillora commented 4 years ago

I mean, can we make watch-top-level the default and only option? Or another way, is watching child directories redundant?

On Mon, 4 Nov 2019 at 1:09 am Hugues Morisset notifications@github.com wrote:

I added the certificates from the build image.

It does watch all the sub-directories because

watch function watches all the directories in fs.dirs https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L174 And add function recursively adds it in to the map:

https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L225

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X43XENESOVKQCUGXRDLQR3LTHA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TNEA#issuecomment-549140112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X4YYZC2OR6XHAUCNYULQR3LTHANCNFSM4JGPUVKA .

izissise commented 4 years ago

I don't know if there is a use case, I'm fine with both :)

On Sun, Nov 3, 2019, 15:21 Jaime Pillora notifications@github.com wrote:

I mean, can we make watch-top-level the default and only option? Or another way, is watching child directories redundant?

On Mon, 4 Nov 2019 at 1:09 am Hugues Morisset notifications@github.com wrote:

I added the certificates from the build image.

It does watch all the sub-directories because

watch function watches all the directories in fs.dirs https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L174 And add function recursively adds it in to the map:

https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L225

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub < https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X43XENESOVKQCUGXRDLQR3LTHA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TNEA#issuecomment-549140112 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAE2X4YYZC2OR6XHAUCNYULQR3LTHANCNFSM4JGPUVKA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAQB2YCMX573MGMYPPTFM7TQR3M7BA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TVUI#issuecomment-549141201, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQB2YFJWAQYKYMS3LIJ2N3QR3M7BANCNFSM4JGPUVKA .

jpillora commented 4 years ago

All good, I’ll test it out soon

On Mon, 4 Nov 2019 at 1:24 am Hugues Morisset notifications@github.com wrote:

I don't know if there is a use case, I'm fine with both :)

On Sun, Nov 3, 2019, 15:21 Jaime Pillora notifications@github.com wrote:

I mean, can we make watch-top-level the default and only option? Or another way, is watching child directories redundant?

On Mon, 4 Nov 2019 at 1:09 am Hugues Morisset notifications@github.com wrote:

I added the certificates from the build image.

It does watch all the sub-directories because

watch function watches all the directories in fs.dirs

https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L174 And add function recursively adds it in to the map:

https://github.com/jpillora/media-sort/blob/master/sort/fs_sort.go#L225

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub <

https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X43XENESOVKQCUGXRDLQR3LTHA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TNEA#issuecomment-549140112

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AAE2X4YYZC2OR6XHAUCNYULQR3LTHANCNFSM4JGPUVKA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAQB2YCMX573MGMYPPTFM7TQR3M7BA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TVUI#issuecomment-549141201 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAQB2YFJWAQYKYMS3LIJ2N3QR3M7BANCNFSM4JGPUVKA

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jpillora/media-sort/pull/13?email_source=notifications&email_token=AAE2X42TLOKD7L56GEKT6UDQR3NLFA5CNFSM4JGPUVKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC5TYDA#issuecomment-549141516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X47P3DQBTH6W6NKLD43QR3NLFANCNFSM4JGPUVKA .