1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-14 14:12:31 +01:00
flox/flox-file-parser/generate_fixtures.sh
Tim Meier 70af78ab27 File parser update (#19)
* Insert movies into db

* refactoring

* Add current time into 'added' on fetch

* Only insert if src is not in db

* Insert tv into db

* Set removed field in field_history for missing files

* Add tv 'removed' field

* split up spec file

* Refactor tv and movies into own file

* Add migration

* Insert full file description

* Update tv fixtures

* Flatten tv hierarchy and redefined the output

* Add status property

* Add since param for movies

* Add since param for tv

* Sort output

* Remove 'added' column and integrated snapshot tests

* Refactor
2017-02-13 21:17:25 +01:00

90 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
GOT="Game of Thrones"
BB="Breaking Bad"
# cleanup
rm -rf app/fixtures/tv
rm -rf app/fixtures/movies
# tv
(
cd app/fixtures
mkdir tv && cd tv
mkdir "$GOT"
(
cd "$GOT"
mkdir s1
(
cd s1
touch 1.mkv
touch 2.mp4
)
mkdir S2
(
cd S2
touch 1.mkv
touch 2.mkv
)
)
mkdir "$BB"
(
cd "$BB"
mkdir S1
(
cd S1
touch 1.mkv
touch 1.srt
touch 2.mkv
touch 2.srt
)
mkdir s2
(
cd s2
touch 1.mp4
touch 1.srt
touch 2.mkv
touch 2.srt
)
)
)
# movies
WARCRAFT="Warcraft.2016.720p.WEB-DL"
STARWARS="StarWars.Episode.VI.Return.of.The.Jedi.1080p.BDRip"
(
cd app/fixtures
mkdir movies && cd movies
mkdir $WARCRAFT
(
cd "$WARCRAFT"
touch "$WARCRAFT.mkv"
touch "$WARCRAFT.srt"
)
mkdir "Star Wars"
(
cd "Star Wars"
mkdir "StarWars Episode VI Return of The Jedi 1080p BDRip"
(
cd "StarWars Episode VI Return of The Jedi 1080p BDRip"
touch "$STARWARS.mp4"
mkdir "subtitles"
(
cd "subtitles"
touch "$STARWARS.srt"
)
)
)
mkdir "Ignore.Movie.BDRip"
(
cd "Ignore.Movie.BDRip"
touch "Ignore.Movie.unsupported.filetype.abc"
)
)
find app/fixtures