These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Correct use of "--subdir-format"

user-318

I'm having trouble getting the "--subdir-format" parameter to behave the way I'd expect. I created a named preset group like so:
Code:
get_iplayer --prefs-add --preset=tv_shows --output="S:\TV Shows" --subdir --subdir-format="<nameshort>\Series <seriesnum>" --file-prefix="<nameshort> - <senum>" --whitespace

Everything is working as I'd expect, except the "--subdir-format" parameter. Using the show Octonauts (series 1, show number 34) as an example, the end result I would like is:


Quote:S:\TV Shows\Octonauts\Series 1\Octonauts - s01e34.mp4

However, what I'm getting is:


Quote:S:\TV Shows\Octonauts_Series 1\Octonauts - s01e34.mp4

Any idea as to whether this is supported?

user-30

This is actually the expected behaviour with regards to how the
Code:
--subdir-format
option actually works.

As you can probably tell, specifying a directory structure within the format itself is not supported, it simply gives you a flattened output.

Being able to specify an output directory structure would be a useful feature to have full stop and I'm starting to want it myself with the number of shows in my PVR and the ensuing organisation required for XBMC.

If you have any coding skills you could make a patch and submit it (my skills are in their infancy with regards to coding) or you could put a feature request in the 'Feature Request' section.

user-2

This appears to be a bug in get_iplayer (sort of). More accurately, it looks like
Code:
--subdir-format
processing was never made Windows-aware when get_iplayer made the transition from Linux. On Linux/Unix/OSX,
Code:
--subdir-format
values with forward slashes will create the desired hierarchy (with
Code:
--whitespace
specified). I'll put it on the list, but no ETA for a fix.

user-30

Ah, that's interesting DP. My main machine is Win 7 and I switched to using get_iplayer on that after some trouble with network drives on my ubuntu server.

I might push the work back to the server to enjoy that output control now.

Certainly a +1 from me on that feature anyway whenever time allows - though I saw there was something about a co-maintainer potentially being interested in joining over on the mailing list today, did you see that?

user-2

Not being a regular Windows user, I never noticed this particular discrepancy. It should be fixable, though. I'll bump this thread when it is done.

That post was related only to the Fedora package. It will be good if someone updates the Fedora RPM, but the 10K lines of Perl tends to make people run screaming from get_iplayer itself.

user-30

Oh I see now, yes Fedora only, my bad.

I've just started out on my coding 'adventure' with Python and php. I did take a quick look at what Perl was like because of get_iplayer and I was prepared to see a keyboard explosion based on what others had said.

It actually didn't look that bad to me, nothing made sense obviously but it didn't seem to make any less sense than php. Maybe in 6 months I'll be of some use to this get_iplayer project!

user-318

Thank you, both, for the info!

Programming is what I do for a living, actually. I stay mostly in the .NET space these days, but I started out in Ruby (which shares some commonalities with Perl). I plan on taking a look at the source code, for curiosity sake, if nothing else. But if you think I can be of any help, just let me know!

Cheers!

user-2

Git HEAD version of get_iplayer now preserves backslashes in
Code:
--subdir-format
(Windows only). See:

https://squarepenguin.co.uk/wiki/install...githeadwin

user-318

I updated with the HEAD version, updated my preset, tried a few downloads, and its working perfectly.

Thanks so much for the quick turnaround!

These forums are archived

See this post for further info