Skip to content

Add script to create dummy media files#1432

Merged
JonnyWong16 merged 1 commit intopushingkarmaorg:masterfrom
JonnyWong16:feature/plex-dummyfiles
Jun 22, 2024
Merged

Add script to create dummy media files#1432
JonnyWong16 merged 1 commit intopushingkarmaorg:masterfrom
JonnyWong16:feature/plex-dummyfiles

Conversation

@JonnyWong16
Copy link
Collaborator

Description

Adds tools/plex-dummyfiles.py to create dummy files for testing with the proper Plex folder and file naming structure.

Examples

Movies

References:

Separators for --versions argument:

  • | = Movie part separator
> python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982 D:\Movies\ ├─ Blade Runner (1982)\ │ ├─ Blade Runner (1982).mp4 > python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Batman Begins" --year 2005 --tmdb 272 D:\Movies\ ├─ Batman Begins (2005) {tmdb-272}\ │ ├─ Batman Begins (2005) {tmdb-272}.mp4 > python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982 --edition "Director's Cut" D:\Movies\ ├─ Blade Runner (1982) {edition-Director's Cut}\ │ ├─ Blade Runner (1982) {edition-Director's Cut}.mp4 > python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "The Dark Knight" --year 2008 --versions "|2" D:\Movies\ ├─ The Dark Knight (2008)\ │ ├─ The Dark Knight (2008) - pt1.mp4 │ ├─ The Dark Knight (2008) - pt2.mp4 > python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Pulp Fiction" --year 1994 --versions "1080p|2" --versions "SD" D:\Movies\ ├─ Pulp Fiction (1994)\ │ ├─ Pulp Fiction (1994) - 1080p - pt1.mp4 │ ├─ Pulp Fiction (1994) - 1080p - pt2.mp4 │ ├─ Pulp Fiction (1994) - SD.mp4 > python tools/plex-dummyfiles.py movie --root "D:\Movies" --title "Blade Runner" --year 1982 --edition "Director's Cut" --versions "1080p.h264" --versions "1080p.hvec" --versions "4k.h264" --versions "4k.hevc" D:\Movies\ ├─ Blade Runner (1982) {edition-Director's Cut}\ │ ├─ Blade Runner (1982) - 1080p.h264 {edition-Director's Cut}.mp4 │ ├─ Blade Runner (1982) - 1080p.hvec {edition-Director's Cut}.mp4 │ ├─ Blade Runner (1982) - 4k.h264 {edition-Director's Cut}.mp4 │ ├─ Blade Runner (1982) - 4k.hevc {edition-Director's Cut}.mp4

TV Shows

References:

Separators for --seasons and --episodes arguments:

  • , = Season/episode list separator
  • - = Season/episode range separator
  • + = Episode stack separator
  • | = Episode part separator
> python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "The Office (US)" --year 2005 --tvdb 73244 --seasons 1 --episodes "1-3,6-8" D:\TV Shows\ ├─ The Office (US) (2005) {tvdb-73244}\ │ ├─ Season 01\ │ │ ├─ The Office (US) (2005) - S01E01.mp4 │ │ ├─ The Office (US) (2005) - S01E02.mp4 │ │ ├─ The Office (US) (2005) - S01E03.mp4 │ │ ├─ The Office (US) (2005) - S01E06.mp4 │ │ ├─ The Office (US) (2005) - S01E07.mp4 │ │ ├─ The Office (US) (2005) - S01E08.mp4 > python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "Doctor Who" --year 1963 --seasons "1-3" --episodes "1-3" D:\TV Shows\ ├─ Doctor Who (1963)\ │ ├─ Season 01\ │ │ ├─ Doctor Who (1963) - S01E01.mp4 │ │ ├─ Doctor Who (1963) - S01E02.mp4 │ │ ├─ Doctor Who (1963) - S01E03.mp4 │ ├─ Season 02\ │ │ ├─ Doctor Who (1963) - S02E01.mp4 │ │ ├─ Doctor Who (1963) - S02E02.mp4 │ │ ├─ Doctor Who (1963) - S02E03.mp4 │ ├─ Season 03\ │ │ ├─ Doctor Who (1963) - S03E01.mp4 │ │ ├─ Doctor Who (1963) - S03E02.mp4 │ │ ├─ Doctor Who (1963) - S03E03.mp4 > python tools/plex-dummyfiles.py show --root "D:\TV Shows" --title "Grey's Anatomy" --year 2005 --seasons 0 --episodes 1 --seasons 1 --episodes "1|2,2-3" --seasons 2 --episodes "1+3,4" D:\TV Shows\ ├─ Grey's Anatomy (2005)\ │ ├─ Season 00\ │ │ ├─ Grey's Anatomy (2005) - S00E01.mp4 │ ├─ Season 01\ │ │ ├─ Grey's Anatomy (2005) - S01E01 - pt1.mp4 │ │ ├─ Grey's Anatomy (2005) - S01E01 - pt2.mp4 │ │ ├─ Grey's Anatomy (2005) - S01E02.mp4 │ │ ├─ Grey's Anatomy (2005) - S01E03.mp4 │ ├─ Season 02\ │ │ ├─ Grey's Anatomy (2005) - S02E01-E03.mp4 │ │ ├─ Grey's Anatomy (2005) - S02E04.mp4 

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the docstring for new or existing methods
  • I have added tests when applicable
@JonnyWong16 JonnyWong16 merged commit ffbbf59 into pushingkarmaorg:master Jun 22, 2024
@JonnyWong16 JonnyWong16 deleted the feature/plex-dummyfiles branch June 22, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant