royw-dvdprofiler2xbmc 0.0.6 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,5 +4,4 @@
4
4
  Announcement
5
5
  script/
6
6
  spec/samples/Collection.yaml
7
- test/
8
7
 
@@ -1,3 +1,6 @@
1
+ == 0.0.7 2009-04-13
2
+ added config editor
3
+
1
4
  == 0.0.6 2009-04-08
2
5
  added support for tmdb
3
6
  added caching lookup data with movie (performance boost)
@@ -1,4 +1,5 @@
1
1
  .gitignore
2
+ Announcement
2
3
  History.txt
3
4
  Manifest.txt
4
5
  PostInstall.txt
@@ -23,14 +24,19 @@ lib/dvdprofiler2xbmc/models/tmdb_profile.rb
23
24
  lib/dvdprofiler2xbmc/models/xbmc_info.rb
24
25
  lib/dvdprofiler2xbmc/open_cache_extension.rb
25
26
  lib/dvdprofiler2xbmc/views/cli.rb
27
+ lib/dvdprofiler2xbmc/views/config_editor.rb
28
+ spec/app_spec.rb
26
29
  spec/cache_extensions.rb
30
+ spec/config_editor_spec.rb
27
31
  spec/dvdprofiler2xbmc_spec.rb
28
32
  spec/dvdprofiler_profile_spec.rb
33
+ spec/fanart_controller_spec.rb
29
34
  spec/imdb_profile_spec.rb
35
+ spec/media_spec.rb
30
36
  spec/nfo_controller_spec.rb
31
37
  spec/samples/Collection.xml
32
- spec/samples/Collection.yaml
33
38
  spec/samples/Die Hard - 1988.nfo
39
+ spec/samples/Ma and Pa Kettle.cd1.dummy
34
40
  spec/samples/The Egg and I.dummy
35
41
  spec/spec.opts
36
42
  spec/spec_helper.rb
@@ -1,58 +1,34 @@
1
1
  First check the version by running:
2
2
 
3
- $ bin/dvdprofiler2xbmc -v
4
- INFO dvdprofiler2xbmc: Dvdprofiler2xbmc 0.0.4
5
- INFO dvdprofiler2xbmc: saving: /home/royw/.dvdprofiler2xbmcrc
6
-
7
- Notice that this generated a config file for you
8
- (/home/royw/.dvdprofiler2xbmcrc) in your home directory.
9
-
10
- Now edit the config file. Be sure to change the following fields to match
11
- your system:
12
-
13
- collection_filespec: /home/royw/DVD Profiler/Shared/Collection.xml
14
- images_dir: /home/royw/DVD Profiler/Shared/Images
15
- directories:
16
- - /media/dad-kubuntu/public/data/videos_iso
17
- - /media/dcerouter/public/data/videos_iso
18
- - /media/royw-gentoo/public/data/videos_iso
19
- - /media/royw-gentoo/public/data/movies
20
- genre_maps: !map:Mash
21
- Anime: Animation
22
- Science-Fiction: Science Fiction
23
- SciFi: Science Fiction
24
- Musical: Musicals
25
-
26
- The "collection_filespec" points to the collection.xml file exported by
27
- DVD Profiler.
28
-
29
- The "images_dir" points to the directory containing the images (cover scans)
30
- from DVD Profiler.
31
-
32
- The "directories" are the top level directories of where your media is
33
- stored. Note, may be mount points or symbolic links.
34
-
35
- The "genre_maps" is a list of genres to rename. In the above example,
36
- "Anime" will be renamed "Animation", "Science-Fiction" will be renamed
37
- "Science Fiction", etc.
38
-
39
- You may want to adjust these also:
40
-
41
- file_permissions: 436
42
- dir_permissions: 511
43
-
44
- Note the permissions are the base 10 integer of the octal permission mask.
45
- For example, 436 (base 10) is 664 (base 8) and 511 (base 10) is 777 (base 8).
46
-
47
- Save the .dvdprofiler2xbmcrc file.
48
-
49
- You may want to get the command line help by running:
50
-
51
- dvdprofiler2xbmc --help
52
-
53
- To process your media, simply run:
54
-
55
- dvdprofiler2xbmc
56
-
57
- For more information on dvdprofiler2xbmc, see http://www/github.com/royw/dvdprofiler2xbmc
3
+ Run the program and the CLI config editor will start:
4
+
5
+ # dvdprofiler2xbmc
6
+ saving: /root/.dvdprofiler2xbmcrc
7
+ The following config items are not valid and need to be changed:
8
+ collection_filespec
9
+ directories
10
+ images_dir
11
+ Configuration Editor
12
+
13
+ Field Selection
14
+ 1) quit
15
+ 2) directories []
16
+ 3) subdirs_as_genres true
17
+ 4) collection_filespec "~/DVD Profiler/Databases/Exports/Collection.xml"
18
+ 5) images_dir "~/DVD Profiler/Databases/Exports/Images"
19
+ 6) file_permissions "664"
20
+ 7) dir_permissions "777"
21
+ 8) genre_maps {"Anime"=>"Animation", "Science-Fiction"=>"Science Fictio...
22
+ 9) media_extensions ["iso", "m4v", "mp4", "mpeg", "wmv", "asf", "flv", "mkv",...
23
+ 10) image_extensions ["jpg", "jpeg", "png", "gif", "bmp", "tbn"]
24
+ Please select field: 2
25
+
26
+ Add your media directories and the correct paths to DVD Profiler's
27
+ Collection.xml and images directory. Quit and save. Now run the
28
+ script again to process your media.
29
+
30
+ For help, run: dvdprofiler2xbmc --help
31
+
32
+ For more information on dvdprofiler2xbmc, see
33
+ http://www/github.com/royw/dvdprofiler2xbmc
58
34
 
@@ -5,11 +5,12 @@
5
5
  == STATUS
6
6
 
7
7
  The initial goal of using DVD Profiler data when available along
8
- with IMDB data otherwise is met.
8
+ with IMDB data otherwise is met. Just added the CLI config editor.
9
9
 
10
10
  Near term plans include:
11
11
  * supporting multiple file matching patterns
12
12
  * supporting directory containers
13
+ * maybe scrape posters from MoviePosterDB.com
13
14
 
14
15
  == DESCRIPTION:
15
16
 
@@ -45,7 +46,10 @@ To force regeneration, simply delete these files then run the script again.
45
46
 
46
47
  Then on XBMC, set the source content to none to remove the meta data from the
47
48
  library, then set the source content back to Movies to import the media.
48
- This time, the data in the .nfo files will be used instead of scraping.
49
+ This time, the data in the .nfo files will be used instead of scraping. Note,
50
+ XBMC pre-9.04 r19177 does not successfully scan all media. The work-around
51
+ is after the scan is complete to restart XBMC so it will scan again (if you
52
+ have autoscan enabled).
49
53
 
50
54
  == NOTES:
51
55
 
@@ -65,6 +69,11 @@ include these in the title.
65
69
 
66
70
  Features:
67
71
 
72
+ * On first run will launch the config editor. At a minimum you will
73
+ need to set at least one media directory and the paths to DVD Profiler's
74
+ exported Collection.xml and images directory must me valid. The script
75
+ enforces validity by running the config editor when there is invalid
76
+ data and will not let you scan your media.
68
77
  * Creates .nfo files from exported collection.xml from DVD Profiler and
69
78
  imdb.com.
70
79
  * If .nfo does not have an <id> tag, then tries to find the IMDB ID by
@@ -78,77 +87,264 @@ Features:
78
87
  useful for titles you know are not on imdb.com)
79
88
  * To prevent lookup on tmdb, "touch {moviename}.no_tmdb_lookup" (this is
80
89
  useful for titles you know are not on themovieDb.com)
90
+ * DVD Profiler recently added box set support which this script does handle.
81
91
 
82
92
  Problems:
83
93
 
84
- * IMDB ID scraping doesn't handle boxed sets or multiple movies per media
85
- file. I don't see how to work around this exept to eliminate from media
86
- library.
87
- * Needs a better method to setup AppConfig defaults. Current thinking
88
- is to prompt for required parameters on first run.
89
94
  * Needs to support selectable/multiple regex based naming conventions
90
95
  * Needs to support directory containers
91
- * .dvdprofiler2xbmcrc uses base 10 integers for permissions. Should be
92
- either base 8 or symbolic.
93
96
 
94
97
  == SYNOPSIS:
95
98
 
96
- First check the version by running:
99
+ Run the program and the CLI config editor will start:
97
100
 
98
- $ bin/dvdprofiler2xbmc -v
99
- INFO dvdprofiler2xbmc: Dvdprofiler2xbmc 0.0.4
100
- INFO dvdprofiler2xbmc: saving: /home/royw/.dvdprofiler2xbmcrc
101
-
102
- Notice that this generated a config file for you
103
- (/home/royw/.dvdprofiler2xbmcrc) in your home directory.
104
-
105
- Now edit the config file. Be sure to change the following fields to match
106
- your system:
107
-
108
- collection_filespec: /home/royw/DVD Profiler/Shared/Collection.xml
109
- images_dir: /home/royw/DVD Profiler/Shared/Images
110
- directories:
111
- - /media/dad-kubuntu/public/data/videos_iso
112
- - /media/dcerouter/public/data/videos_iso
113
- - /media/royw-gentoo/public/data/videos_iso
114
- - /media/royw-gentoo/public/data/movies
115
- genre_maps: !map:Mash
116
- Anime: Animation
117
- Science-Fiction: Science Fiction
118
- SciFi: Science Fiction
119
- Musical: Musicals
120
-
121
- The "collection_filespec" points to the collection.xml file exported by
122
- DVD Profiler.
123
-
124
- The "images_dir" points to the directory containing the images (cover scans)
125
- from DVD Profiler.
126
-
127
- The "directories" are the top level directories of where your media is
128
- stored. Note, may be mount points or symbolic links.
129
-
130
- The "genre_maps" is a list of genres to rename. In the above example,
131
- "Anime" will be renamed "Animation", "Science-Fiction" will be renamed
132
- "Science Fiction", etc.
133
-
134
- You may want to adjust these also:
135
-
136
- file_permissions: 436
137
- dir_permissions: 511
138
-
139
- Note the permissions are the base 10 integer of the octal permission mask.
140
- For example, 436 (base 10) is 664 (base 8) and 511 (base 10) is 777 (base 8).
141
-
142
- Save the .dvdprofiler2xbmcrc file.
101
+ # dvdprofiler2xbmc
102
+ saving: /root/.dvdprofiler2xbmcrc
103
+ The following config items are not valid and need to be changed:
104
+ collection_filespec
105
+ directories
106
+ images_dir
107
+ Configuration Editor
108
+
109
+ Field Selection
110
+ 1) quit
111
+ 2) directories []
112
+ 3) subdirs_as_genres true
113
+ 4) collection_filespec "~/DVD Profiler/Databases/Exports/Collection.xml"
114
+ 5) images_dir "~/DVD Profiler/Databases/Exports/Images"
115
+ 6) file_permissions "664"
116
+ 7) dir_permissions "777"
117
+ 8) genre_maps {"Anime"=>"Animation", "Science-Fiction"=>"Science Fictio...
118
+ 9) media_extensions ["iso", "m4v", "mp4", "mpeg", "wmv", "asf", "flv", "mkv",...
119
+ 10) image_extensions ["jpg", "jpeg", "png", "gif", "bmp", "tbn"]
120
+ Please select field: 2
121
+
122
+ -------------------------------
123
+ directories
124
+
125
+ Array of paths to scan for media. Replace with your paths.
126
+
127
+ Default:
128
+ []
129
+
130
+ Current:
131
+ []
132
+
133
+ 1) quit
134
+ 2) default
135
+ 3) add
136
+ 4) delete
137
+ Please select: 3
138
+ New pathspecs or a blank line to quit: /media/royw-gentoo/public/data/movies
139
+
140
+
141
+ -------------------------------
142
+ directories
143
+
144
+ Array of paths to scan for media. Replace with your paths.
145
+
146
+ Default:
147
+ []
148
+
149
+ Current:
150
+ ["/media/royw-gentoo/public/data/movies"]
151
+
152
+ 1) quit
153
+ 2) default
154
+ 3) add
155
+ 4) delete
156
+ Please select: 1
157
+
158
+ Field Selection
159
+ 1) quit
160
+ 2) directories ["/media/royw-gentoo/public/data/movies"]
161
+ 3) subdirs_as_genres true
162
+ 4) collection_filespec "~/DVD Profiler/Databases/Exports/Collection.xml"
163
+ 5) images_dir "~/DVD Profiler/Databases/Exports/Images"
164
+ 6) file_permissions "664"
165
+ 7) dir_permissions "777"
166
+ 8) genre_maps {"Anime"=>"Animation", "Science-Fiction"=>"Science Fictio...
167
+ 9) media_extensions ["iso", "m4v", "mp4", "mpeg", "wmv", "asf", "flv", "mkv",...
168
+ 10) image_extensions ["jpg", "jpeg", "png", "gif", "bmp", "tbn"]
169
+ Please select field: 4
170
+
171
+ -------------------------------
172
+ collection_filespec
173
+
174
+ The location of DVD Profiler's exported Collection.xml
175
+
176
+ Default:
177
+ "~/DVD Profiler/Databases/Exports/Collection.xml"
178
+
179
+ Current:
180
+ "~/DVD Profiler/Databases/Exports/Collection.xml"
181
+
182
+ 1) quit
183
+ 2) default
184
+ 3) edit
185
+ Please select: 3
186
+ New filespec: |~/DVD Profiler/Databases/Exports/Collection.xml| /home/royw/DVD Profiler/Shared/Collection.xml
187
+
188
+ -------------------------------
189
+ collection_filespec
190
+
191
+ The location of DVD Profiler's exported Collection.xml
192
+
193
+ Default:
194
+ "~/DVD Profiler/Databases/Exports/Collection.xml"
195
+
196
+ Current:
197
+ "/home/royw/DVD Profiler/Shared/Collection.xml"
198
+
199
+ 1) quit
200
+ 2) default
201
+ 3) edit
202
+ Please select: 1
203
+
204
+ Field Selection
205
+ 1) quit
206
+ 2) directories ["/media/royw-gentoo/public/data/movies"]
207
+ 3) subdirs_as_genres true
208
+ 4) collection_filespec "/home/royw/DVD Profiler/Shared/Collection.xml"
209
+ 5) images_dir "~/DVD Profiler/Databases/Exports/Images"
210
+ 6) file_permissions "664"
211
+ 7) dir_permissions "777"
212
+ 8) genre_maps {"Anime"=>"Animation", "Science-Fiction"=>"Science Fictio...
213
+ 9) media_extensions ["iso", "m4v", "mp4", "mpeg", "wmv", "asf", "flv", "mkv",...
214
+ 10) image_extensions ["jpg", "jpeg", "png", "gif", "bmp", "tbn"]
215
+ Please select field: 5
216
+
217
+ -------------------------------
218
+ images_dir
219
+
220
+ The location of DVD Profiler's cover scan images.
221
+
222
+ Default:
223
+ "~/DVD Profiler/Databases/Exports/Images"
224
+
225
+ Current:
226
+ "~/DVD Profiler/Databases/Exports/Images"
227
+
228
+ 1) quit
229
+ 2) default
230
+ 3) edit
231
+ Please select: 3
232
+ New pathspec: |~/DVD Profiler/Databases/Exports/Images| /home/royw/DVD Profiler/Shared/Images
233
+
234
+ -------------------------------
235
+ images_dir
236
+
237
+ The location of DVD Profiler's cover scan images.
238
+
239
+ Default:
240
+ "~/DVD Profiler/Databases/Exports/Images"
241
+
242
+ Current:
243
+ "/home/royw/DVD Profiler/Shared/Images"
244
+
245
+ 1) quit
246
+ 2) default
247
+ 3) edit
248
+ Please select: 1
249
+
250
+ Field Selection
251
+ 1) quit
252
+ 2) directories ["/media/royw-gentoo/public/data/movies"]
253
+ 3) subdirs_as_genres true
254
+ 4) collection_filespec "/home/royw/DVD Profiler/Shared/Collection.xml"
255
+ 5) images_dir "/home/royw/DVD Profiler/Shared/Images"
256
+ 6) file_permissions "664"
257
+ 7) dir_permissions "777"
258
+ 8) genre_maps {"Anime"=>"Animation", "Science-Fiction"=>"Science Fictio...
259
+ 9) media_extensions ["iso", "m4v", "mp4", "mpeg", "wmv", "asf", "flv", "mkv",...
260
+ 10) image_extensions ["jpg", "jpeg", "png", "gif", "bmp", "tbn"]
261
+ Please select field: 1
262
+ Save? yes/no |yes|
263
+
264
+ saving: /root/.dvdprofiler2xbmcrc
265
+
266
+ For those really observant, you will have noticed that I run the script
267
+ as root, which I highly recommend against. In my case, my media is still
268
+ shared with LinuxMCE which absolutely insanely requires the media to be
269
+ owned by root. One of the reasons I'm switching to XBMC.
270
+
271
+ Now you can run the program again and it will start scanning your media:
272
+
273
+ # dvdprofiler2xbmc
274
+ saving: /root/.dvdprofiler2xbmcrc
275
+ Media Directories:
276
+ /media/royw-gentoo/public/data/movies
277
+
278
+ The Sand Pebbles
279
+ Loading /home/royw/DVD Profiler/Shared/Collection.yaml
280
+ not saving, yaml file is newer than xml file
281
+ ISBN => 024543013099
282
+ Need to find box set parent's title
283
+ ImdbProfile.all({:titles=>[["The Sand Pebbles"], "The Sand Pebbles"], :imdb_id=>"tt0060934", :media_years=>[1966], :production_years=>["1966"], :filespec=>"/media/royw-gentoo/public/data/movies/War/The Sand Pebbles.imdb.xml", :released_years=>["2001-05-15"]})
284
+ IMDB ID => tt0060934
285
+
286
+ My Super Ex-Girlfriend
287
+ ISBN => 024543380634
288
+ Need to find box set parent's title
289
+ ImdbProfile.all({:titles=>[["My Super Ex-Girlfriend"], "My Super Ex-Girlfriend"], :imdb_id=>"tt0465624", :media_years=>[2006], :production_years=>["2006"], :filespec=>"/media/royw-gentoo/public/data/movies/Comedy/My Super Ex-Girlfriend.imdb.xml", :released_years=>["2006-12-19"]})
290
+ IMDB ID => tt0465624
291
+ updated /media/royw-gentoo/public/data/movies/Comedy/My Super Ex-Girlfriend.nfo
292
+ ^Ccontrol-C detected, finishing current task
293
+
294
+ As you can see above you can press ^C to interrupt at any time, but the
295
+ script will finish processing the current media before terminating.
296
+
297
+ If you let the script run to completion you may see some reports at the end
298
+ that detail some of your problem media. Example:
299
+
300
+ Missing ISBNs
301
+ /media/dcerouter/public/data/videos_iso/Drama/Across The Universe Special Features.iso
302
+ /media/royw-gentoo/public/data/videos_iso/Musicals/Going My Way and Holiday Inn.iso
303
+ /media/royw-gentoo/public/data/movies/Animation/No Time For Nuts.m4v
304
+ /media/dcerouter/public/data/videos_iso/Science Fiction/Riddick Trilogy 3.iso
305
+ /media/dcerouter/public/data/videos_iso/Science Fiction/Riddick Trilogy 1 & 2.iso
306
+ /media/royw-gentoo/public/data/videos_iso/Science Fiction/Aeon Flux [WS] [Special Collector s Edition].iso
307
+ /media/royw-gentoo/public/data/videos_iso/Thriller/Leon The Professional.iso
308
+ /media/dad-kubuntu/public/data/videos_iso/Action/Deja vu.iso
309
+
310
+ Missing IMDB IDs
311
+ Rodeo Racketeers: John Wayne Young Duke Series (1934)
312
+ Across The Universe Special Features
313
+ Going My Way and Holiday Inn
314
+ Pearl Harbor Payback Appointment in Tokyo (2001)
315
+ Riddick Trilogy 1 & 2
316
+ Deja vu
317
+ Seabiscuit: America s Legendary Racehorse (2003)
318
+
319
+ Missing Thumbnails
320
+ /media/dcerouter/public/data/videos_iso/Drama/Across The Universe Special Features.tbn
321
+ /media/royw-gentoo/public/data/videos_iso/Musicals/Going My Way and Holiday Inn.tbn
322
+ /media/royw-gentoo/public/data/movies/Animation/No Time For Nuts.tbn tt0902999
323
+ /media/dcerouter/public/data/videos_iso/Science Fiction/Riddick Trilogy 3.tbn tt0407749
324
+ /media/dcerouter/public/data/videos_iso/Science Fiction/Riddick Trilogy 1 & 2.tbn
325
+ /media/royw-gentoo/public/data/videos_iso/Comedy/The First To Go - 0.tbn tt0119126
326
+
327
+ Usually the Missing ISBNs are letting you know that the media title (from
328
+ the filename) could not be found in the DVD Profiler's Collection.xml. The
329
+ best approach is to check the title in the profile in DVD Profiler.
330
+
331
+ Above, "Aeon Flux", "Deja vu" and "Leon The Professional" are not found
332
+ because the actual titles have accented characters. "Across The Universe
333
+ Special Features" is the special feature disk so is not found. "Going My
334
+ Way and Holiday Inn" is a double feature disk, probably should transcode
335
+ each movie into separate files. "No Time For Nuts" is a cartoon on an Ice
336
+ Age movie. The Riddick Trilogy isos should be transcoded into separate files.
337
+
338
+ The Missing IMDB IDs usually indicate either odd ball movies that are not on
339
+ IMDB, or multiple feature titles, or multiple matches. If it's the later then
340
+ it's best to add the production year to the file name.
341
+
342
+ You should have the idea now.
143
343
 
144
344
  You may want to get the command line help by running:
145
345
 
146
346
  dvdprofiler2xbmc --help
147
347
 
148
- To process your media, simply run:
149
-
150
- dvdprofiler2xbmc
151
-
152
348
 
153
349
  == REQUIREMENTS:
154
350
 
@@ -164,7 +360,7 @@ To process your media, simply run:
164
360
 
165
361
  sudo gem uninstall royw-dvdprofiler2xbmc
166
362
 
167
- optionally
363
+ optionally (shouldn't be necessary)
168
364
 
169
365
  rm ~/.dvdprofiler2xbmcrc
170
366