mackworth / cTiVo

TiVo Show Downloads for MacOS
220 stars 36 forks source link

Wrong file structure created when using "Plex Folders" filename template #39

Closed bryanmcain closed 8 years ago

bryanmcain commented 10 years ago

I've selected the "Plex Folders" filename template and it looks like it should create the files in the following format:

/Main TItle
     /Season Number
          Main Title - Series Ep Number - Episode Title.<ext>

However, instead it is adding an extra Main Title folder under the season folder.

/Main Title
     /Season Number
          /Main Title
               Main Title - Series Ep Number - Episode Title.<ext>
mackworth commented 10 years ago

That's probably due to having "create sub folders for series" turned on in Preferences.

bryanmcain commented 10 years ago

Yep, that was it. Thank you!

mackworth commented 10 years ago

Great. I'll add a note to the documentation.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

I am having a similar problem.

I want to use the standard Plex top level directory set (Home Videos, Movies, Music, Photos and TV Shows).

I used the Plex keyword string in adv settings: [MainTitle / "Season " Season / MainTitle " - " SeriesEpNumber " - " EpisodeTitle]["Movies" / MainTitle " (" MovieYear ")"]

However it lacked the leading keyword "TV Shows" / , so the corrected version: ["TV Shows" / MainTitle / "Season " Season / MainTitle " - " SeriesEpNumber " - " EpisodeTitle]["Movies" / MainTitle " (" MovieYear ")"]

Here is what I am expecting:

{partition root} Home Videos/ Movies/ Music/ Photos/ TV Shows/Main Title/Season SeasonNumber/ Main Title - Series Ep Number - Episode Title.

Before removing the "create sub folders for series" checkbox I was getting: {partition root}/ Home Videos/ Movies/ Music/ Photos/ TV Shows/Main Title/Season SeasonNumber/Main Title/Main Title - Series Ep Number - Episode Title.

After removing the "create sub folders for series" checkbox I am getting:

{partition root} Home Videos/ Movies/ Music/ Photos/ TV Shows/ Main Title/ Season SeasonNumber/Main Title/Main Title - Series Ep Number - Episode Title.

mackworth commented 8 years ago

I'm experimenting with a better Plex support for the next version. Try it out, and let me know what you think. Go to Adv Preferences and select Plex folder again; I think the built-in one works well now (Handles shows like the Evening News with no episode number. You can select a range of shows and do the "Test filename" command to see how they'll be named without having to run all the shows.

Note that if you do go back to 2.4.4, you'll want to reset the filename field, as 2.5 has capabilities that are incompatible with 2.4.4, so 2.4.4. will call all your videos names like ]-3.mp4 .

https://dl.dropboxusercontent.com/u/21507587/cTiVo%202.5%20alpha1.zip

AnVLYwMXcCEnArbVLHBH commented 8 years ago

Great work guys! I have run it for a day now and have some feedback.

The shows I tested were special episodes from The Walking Dead which ran during the 2015 season. The resulting saves:

TV Shows/The Walking Dead/Season 2015/ The Walking Dead - 2015 - A look at Fear the Walking Dead The Walking Dead - 2015 - Preview of Fear the Walking Dead The Walking Dead - 2015 - Season 6 Preview The Walking Dead - 2015 - A look at Season 6 The Walking Dead - 2015 - The Cast of Fear the Walking Dead

Plex however had troubles with this naming convention.

On the plex dashboard it returns: TV Shows

I manually edited the files to this:

TV Shows/The Walking Dead/ Season 2015/ The Walking Dead - S2015E0809 - A Look at Fear the Walking Dead The Walking Dead - S2015E0816 - Preview of Fear the Walking Dead The Walking Dead - S2015E0823 - The Cast of Fear the Walking Dead The Walking Dead - S2015E1009 - A Look at Season 6 The Walking Dead- S2015E1008 - Season 6 Preview

Where the Season remains the year of release and Episode is the date the show aired. 0809 for August 9; 0816 for August 16; 1008 for October 8 etc.

Works perfectly. Plex now returns the full season id as the folder name (Season 2015) and inside that folder it returns:

A thumbail from the video Episode title Episode number

If possible, I recommend that you extract the date (MMDD) from the air date and append it as the episode number S2015E1008

I have screenshots if those would help, but couldn’t attach them here as they exceeded the reply size limitation.

r/ Gilbert Blankenship

mackworth commented 8 years ago

Question: in cTiVo, in the episodeNumber column, what does it show for these? I"m guessing it says 2015, which is improper (should be an SxxxExx format). If that were blank, it would have named these shows:

TV Shows/The Walking Dead/ Season 2015/ The Walking Dead - 2015-08-09 - A Look at Fear the Walking Dead The Walking Dead - 2015-08-16 - Preview of Fear the Walking Dead

Can you try that format and confirm that it still works? (I'd rather mask out the 2015 than create a new SxxxxExxxx format).

AnVLYwMXcCEnArbVLHBH commented 8 years ago

I'll try other shows tonight, but to answer your question - in cTivo the episode column entry was empty.

Sent from my iPhone

On Nov 11, 2015, at 17:48, Hugh Mackworth notifications@github.com wrote:

Question: in cTiVo, in the episodeNumber column, what does it show for these? I"m guessing it says 2015, which is improper (should be an SxxxExx format). If that were blank, it would have named these shows:

TV Shows/The Walking Dead/ Season 2015/ The Walking Dead - 2015-08-09 - A Look at Fear the Walking Dead The Walking Dead - 2015-08-16 - Preview of Fear the Walking Dead

Can you try that format and confirm that it still works? (I'd rather mask out the 2015 than create a new SxxxxExxxx format).

— Reply to this email directly or view it on GitHub.

mackworth commented 8 years ago

And which version of cTiVo are you using?

Hugh Mackworth hugh@hughm.com @mackworth (503) 816-9711

AnVLYwMXcCEnArbVLHBH commented 8 years ago

Version 2.5 alpha 1 (573)

On Nov 12, 2015, at 3:01 PM, Hugh Mackworth notifications@github.com wrote:

And which version of cTiVo are you using?

Hugh Mackworth hugh@hughm.com @mackworth (503) 816-9711

— Reply to this email directly or view it on GitHub https://github.com/dscottbuch/cTiVo/issues/39#issuecomment-156218423.

mackworth commented 8 years ago

But the First Air column had a full date?

AnVLYwMXcCEnArbVLHBH commented 8 years ago

Yes

Sent from my iPhone

On Nov 12, 2015, at 19:03, Hugh Mackworth notifications@github.com wrote:

But the First Air column had a full date?

— Reply to this email directly or view it on GitHub.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

I think I see the problem. The Plex simple keywords contain the logic for entering the full date, while Plex Folders only contains the Year vice OriginalAirDate:

["TV Shows" / MainTitle / "Season " Season | Year / MainTitle " - " SeriesEpNumber | Year [" - " EpisodeTitle]]["Movies" / MainTitle " (" MovieYear ")"]

I have changed Plex Folders to: ["TV Shows" / MainTitle / "Season " Season | Year / MainTitle " - " SeriesEpNumber | OriginalAirDate [" - " EpisodeTitle]]["Movies" / MainTitle " (" MovieYear ")”]

That should fix it - but it will be a bit before I know for sure.

/r Gil

On Nov 12, 2015, at 7:16 PM, Gilbert Blankenship blankgm@me.com wrote:

Yes

Sent from my iPhone

On Nov 12, 2015, at 19:03, Hugh Mackworth <notifications@github.com mailto:notifications@github.com> wrote:

But the First Air column had a full date?

— Reply to this email directly or view it on GitHub https://github.com/dscottbuch/cTiVo/issues/39#issuecomment-156275807.

mackworth commented 8 years ago

Ah, that is correct. I actually had caught that, and thought it was in alpha1, but it was after. FYI, the last item in the keyword menu is Test on Selected Shows, so you can test a show's (or group of shows) filename without having to run the whole process.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

So far so good. Kudos to you folks!

Sent from my iPhone

On Nov 12, 2015, at 22:03, Hugh Mackworth notifications@github.com wrote:

Ah, that is correct. I actually had caught that, but didn't put out a new version yet. FYI, the last item in the keyword menu is Test on Selected Shows, so you can test a show's (or group of shows) filename without having to run the whole process.

— Reply to this email directly or view it on GitHub.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

I wanted to touch base with you to discuss my findings over the past 2 months of working with cTivo 2.5 alpha 573.

I continue to be impressed with the work you have done - especially with respect to adding Plex support. As I continue to learn the advanced capabilities, I have had little issue.

However, I have had two minor problems to report.

First, is an inability to record some programs for unknown reasons. One example is “The King’s Speech”. Despite this program not indicating that it is “Protected” - 2.5 a(573) will not record the program. Other problematic programs (this weekend) include:

Other programs from these stations have successfully recorded, so I do not believe it to be a channel issue.

Also, I have successfully transferred the recordings to secondary Tivos and the transfer via cTivo still fails. This would support the belief that it is not a “protected” program issue.

Finally - this weekend I attempted the <> subscription. Everything went fine until I deleted out my old Subscriptions (to clean the Subscription list) at which point - after a few moments my cTivo 2.5a (573) experienced a crash. Following the crash cTivo could not even load. The program continually crashed during Tivo program scan.

I downloaded the latest (release) of cTivo (2.4.4) and it loaded perfectly fine - scanned the Tivos and loaded the <> Subscription and began to record. I was surprised to discover that it downloaded “The King’s Speech” without issue. Although I failed to change the Plex setting so it saved (of course) as "].mp4”.

After a few show downloads I returned to cTivo 2.5a(573) and the application loaded, and executed - however it continued to fail to transfer the programs listed above.

It appears that cTivo 2.5a(573) has a problem downloading some programs - the reason for which I am at this point unable to identify myself.

I’ll also take this opportunity to voice my inputs for future designs (like you don’t have enough of those):

This may be a lack of understanding on how Commercial processing works, but ….

Hopefully, this report will be of help to you. If there is anything you would like me to do in an effort to assist in identifying the issue please let me know.

Again, thank you for your wonderful work on this application.

r/ Gilbert Blankenship

mackworth commented 8 years ago

Excellent report and thoughts!

I'll have to respond in more detail later, but I'm hoping I can get the logs from those failures.

I think I know what the startup crash is (from some data in Crashlytics.

mackworth commented 8 years ago

Also if you could set the logging to Verbose and run one of the shows you know will fail, that might help also. Be sure to set it back afterwards.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

The analytics come to you automatically then I am assuming?

Next time I get a failure, I will set to verbose and re-run the program.

The other thoughts I had, and I keep forgetting to send them

Thanks for the response!

On Jan 26, 2016, at 9:40 AM, Hugh Mackworth notifications@github.com wrote:

Excellent report and thoughts!

I'll have to respond in more detail later, but I'm hoping I can get the logs from those failures.

I think I know what the startup crash is (from some data in Crashlytics.

— Reply to this email directly or view it on GitHub https://github.com/dscottbuch/cTiVo/issues/39#issuecomment-175050469.

mackworth commented 8 years ago

They do.

If you can send the logs you have now, that'd be great. They probably have a failure message in them, if they haven't expired yet.

mackworth commented 8 years ago

The ALL SHOWS option should indeed be tracking which shows it has recorded, as do all subscriptions. When you first start using it, it will redundantly queue shows that you already have, but simply erase those from the queue and you should be all set from then on. (Although not a bad idea to avoid shows that are still on disk at that moment.)

The Delete idea is much more complicated, as it requires the realtime API, which we haven't implemented.

AnVLYwMXcCEnArbVLHBH commented 8 years ago

Meh - first attempt was apparently rejected. Try this one.

On Jan 26, 2016, at 10:18 AM, Hugh Mackworth notifications@github.com wrote:

They do.

If you can send the logs you have now, that'd be great. They probably have a failure message in them, if they haven't expired yet.

— Reply to this email directly or view it on GitHub https://github.com/dscottbuch/cTiVo/issues/39#issuecomment-175071131.

mackworth commented 8 years ago

I think you have to do it at the website, rather than through email

AnVLYwMXcCEnArbVLHBH commented 8 years ago

Yup I was thinking more the latter. If it was implemented there would probably have to be an option. I could easily see a situation where I might want to dupe a show - for example “Blazing Saddles” might be recorded from ABC with commercials, and also “edited for content…”. Which, once recorded I would never want it again off broadcast TV. But I would want the HBO version when it shows. There would probably have to be some user implemented logic there. Movie Channels take precedence over broadcast TV. I don’t even want to think about the complications of that logic. You’d need a list of the different kinds of channels - UG!

On Jan 26, 2016, at 10:21 AM, Hugh Mackworth notifications@github.com wrote:

The ALL SHOWS option should indeed be tracking which shows it has recorded, as do all subscriptions. When you first start using it, it will redundantly queue shows that you already have, but simply erase those from the queue and you should be all set from then on. (Although not a bad idea to avoid shows that are still on disk at that moment.)

adrian152 commented 8 years ago

Hello,

I'm having some problems, I need to specify the "Year" of the OriginalAirDate, not the year of the episode, but Not sure how to do this without modifying the source code.

Anyway to specify it and removing the month and day from the variable string?

[MainTitle " " OriginalAirDate / "Season " Season / MainTitle " - " SeriesEpNumber " - " EpisodeTitle]["Movies" / MainTitle " (" MovieYear ")"]

Thanks.

mackworth commented 8 years ago

Sorry, you are correct; the date components are defined as the broadcast date, not original Air Date. In terms of a workaround, you could have a filewatcher that renames them after they are created.

http://www.macissues.com/2015/02/02/how-to-use-launchagents-to-monitor-folder-contents-in-os-x/

Then put a marker like ### before the OriginalAirDate, then have a shell script that looks for that marker and renames it: for file in ~/Movies/TivoShows/###.mp4 do mv "$file" "${file//###[0-9][0-9]-[0-9][0-9]-}" done

The only problem might be that I forget what happens if a file is renamed while it's being written; I think it works, but you might need to put a delay in there.

mackworth commented 8 years ago

I believe these discussions are all resolved; if I'm incorrect, please let me know.